--- a/Tools__NewSystemBrowser.st Thu Dec 11 19:38:14 2014 +0100
+++ b/Tools__NewSystemBrowser.st Thu Dec 11 20:28:45 2014 +0100
@@ -45656,7 +45656,7 @@
selectorMenuBrowseRepositoryVersionsUsingManager: manager
|method mclass mselector className mgr revisions previousMethods browser
- lastSource currentSource lastRevision lastDate lastChange thisIsAnExtensionMethod
+ lastSource currentSource lastRevision lastDate lastChange lastAuthor thisIsAnExtensionMethod
packageId directory module|
method := self theSingleSelectedMethod.
@@ -45666,198 +45666,200 @@
mselector := method selector.
className := mclass name.
[
- |set|
-
- set := ChangeSet forExistingMethods:(Array with:method).
- set := set select:[:c | c isMethodChange].
- lastChange := set first.
+ |set|
+
+ set := ChangeSet forExistingMethods:(Array with:method).
+ set := set select:[:c | c isMethodChange].
+ lastChange := set first.
] value.
thisIsAnExtensionMethod := (method isExtension).
thisIsAnExtensionMethod ifTrue:[
- packageId := method package asPackageId.
- mgr := manager
- ] ifFalse:[
- packageId := mclass package asPackageId.
- "/ mgr := packageId projectDefinitionClass sourceCodeManager.
- mgr := manager.
- "/self assert:(mgr = packageId projectDefinitionClass sourceCodeManager).
+ packageId := method package asPackageId.
+ mgr := manager
+ ] ifFalse:[
+ packageId := mclass package asPackageId.
+ "/ mgr := packageId projectDefinitionClass sourceCodeManager.
+ mgr := manager.
+ "/self assert:(mgr = packageId projectDefinitionClass sourceCodeManager).
].
directory := packageId directory.
module := packageId module.
self withWaitCursorDo:[
- |revisionLog start stop answer t tS list msg first|
-
- thisIsAnExtensionMethod ifTrue:[
- revisionLog := mgr
- revisionLogOf:nil
- fromRevision:nil
- toRevision:nil
- numberOfRevisions:nil
- fileName:'extensions.st'
- directory:directory
- module:module.
- ] ifFalse:[
- revisionLog := mgr revisionLogOf:mclass.
- ].
- revisions := revisionLog at:#revisions.
-
- start := 1.
- stop := revisions size.
- stop > 20 ifTrue:[
- thisIsAnExtensionMethod ifTrue:[
- t := 500. "/ fake time
- ] ifFalse:[
- "/ measure the time it takes to checkout a version...
- t := Time millisecondsToRun:[
- |revSourceStream|
-
- revSourceStream := mgr getSourceStreamFor:mclass revision:((revisions at:10) at:#revision).
- ChangeSet fromStream:revSourceStream.
- revSourceStream close.
- ].
- ].
-
- list := revisions collect:[:entry |
- |rev author dateString date msg|
-
- rev := entry at:#revision.
- author := entry at:#author.
- dateString := entry at:#date.
- date := Timestamp readGeneralizedFrom:dateString.
- dateString := date printStringFormat:'%(year)-%(mon)-%(day) %h:%m:%s'.
- entry at:#date put:dateString.
- msg := ((entry at:#logMessage) asStringCollection firstIfEmpty:'') asString.
- rev,' ',author,' ',dateString,' ',msg
- ].
- msg := 'There are %1 revisions to extract from the repository'.
- t := (t * revisions size / 1000) rounded.
- t < 10 ifTrue:[
- msg := msg,'\(this will take a few seconds).'.
- tS := t.
- ] ifFalse:[
- t := t * revisions size // 1000 // 10 * 10.
- tS := (TimeDuration fromSeconds:t) printStringForApproximation.
- msg := msg,'\(this will take roughly %2).'
- ].
- msg := msg,'\\Do you want to see all or only some of the revisions ?'.
-
- answer := Dialog
- choose:(resources stringWithCRs:msg
- with:revisions size
- with:tS)
- fromList:list values:revisions initialSelection:nil
- buttons:nil
- values:nil
- default:nil
- lines:20
- cancel:[^ self]
- multiple:false
- title:(resources string:'Confirmation')
- postBuildBlock:[:dialog |
- |b|
-
- b := Button label:(resources string:'Browse Newer than Selected').
- b action:[ stop := (dialog componentAt:#ListView) selection. dialog okPressed].
- b := dialog addButton:b before:dialog okButton.
-
- dialog okButton label:(resources string:'Browse All').
- dialog okButton action:[ stop := revisions size. dialog okPressed].
- ].
-
- stop isNil ifTrue:[^ self ].
- ].
+ |revisionLog start stop answer t tS list msg first|
+
+ thisIsAnExtensionMethod ifTrue:[
+ revisionLog := mgr
+ revisionLogOf:nil
+ fromRevision:nil
+ toRevision:nil
+ numberOfRevisions:nil
+ fileName:'extensions.st'
+ directory:directory
+ module:module.
+ ] ifFalse:[
+ revisionLog := mgr revisionLogOf:mclass.
+ ].
+ revisions := revisionLog at:#revisions.
+
+ start := 1.
+ stop := revisions size.
+ stop > 20 ifTrue:[
+ thisIsAnExtensionMethod ifTrue:[
+ t := 500. "/ fake time
+ ] ifFalse:[
+ "/ measure the time it takes to checkout a version...
+ t := Time millisecondsToRun:[
+ |revSourceStream|
+
+ revSourceStream := mgr getSourceStreamFor:mclass revision:((revisions at:10) at:#revision).
+ ChangeSet fromStream:revSourceStream.
+ revSourceStream close.
+ ].
+ ].
+
+ list := revisions collect:[:entry |
+ |rev author dateString date msg|
+
+ rev := entry at:#revision.
+ author := entry at:#author.
+ dateString := entry at:#date.
+ date := Timestamp readGeneralizedFrom:dateString.
+ dateString := date printStringFormat:'%(year)-%(mon)-%(day) %h:%m:%s'.
+ entry at:#date put:dateString.
+ msg := ((entry at:#logMessage) asStringCollection firstIfEmpty:'') asString.
+ rev,' ',author,' ',dateString,' ',msg
+ ].
+ msg := 'There are %1 revisions to extract from the repository'.
+ t := (t * revisions size / 1000) rounded.
+ t < 10 ifTrue:[
+ msg := msg,'\(this will take a few seconds).'.
+ tS := t.
+ ] ifFalse:[
+ t := t * revisions size // 1000 // 10 * 10.
+ tS := (TimeDuration fromSeconds:t) printStringForApproximation.
+ msg := msg,'\(this will take roughly %2).'
+ ].
+ msg := msg,'\\Do you want to see all or only some of the revisions ?'.
+
+ answer := Dialog
+ choose:(resources stringWithCRs:msg
+ with:revisions size
+ with:tS)
+ fromList:list values:revisions initialSelection:nil
+ buttons:nil
+ values:nil
+ default:nil
+ lines:20
+ cancel:[^ self]
+ multiple:false
+ title:(resources string:'Confirmation')
+ postBuildBlock:[:dialog |
+ |b|
+
+ b := Button label:(resources string:'Browse Newer than Selected').
+ b action:[ stop := (dialog componentAt:#ListView) selection. dialog okPressed].
+ b := dialog addButton:b before:dialog okButton.
+
+ dialog okButton label:(resources string:'Browse All').
+ dialog okButton action:[ stop := revisions size. dialog okPressed].
+ ].
+
+ stop isNil ifTrue:[^ self ].
+ ].
t := Time millisecondsToRun:[
- previousMethods := ChangeSet new.
- lastSource := currentSource := method source.
- lastRevision := lastDate := nil.
- first := true.
-
- revisions from:start to:stop do:[:eachLogEntry |
- |revision date revSourceStream|
-
- revision := eachLogEntry at:#revision.
- date := eachLogEntry at:#date.
-
- [
- |chg nChg classChangeSet changeSource changeName|
-
- self activityNotification:('Fetching revision ',revision,'...').
- thisIsAnExtensionMethod ifTrue:[
- revSourceStream := mgr
- streamForClass:nil
- fileName:'extensions.st'
- revision:revision
- directory:directory
- module:module
- cache:true.
- ] ifFalse:[
- revSourceStream := mgr getSourceStreamFor:mclass revision:revision.
- ].
- revSourceStream isNil ifTrue:[
- self warn:'could not load source for ' , mclass name , ' revision ', revision, ' from repository'.
- chg := nil.
- ] ifFalse:[
- classChangeSet := ChangeSet fromStream:revSourceStream.
-
- chg := classChangeSet
- detect:[:chg | chg isMethodChange
- and:[chg selector = mselector
- and:[chg className = className]]]
- ifNone:nil.
- ].
-
- chg isNil ifTrue:[
- "the method was created in the next version (previous one processed)"
- ] ifFalse:[
- changeSource := chg source.
- ].
- ((changeSource isNil and:[lastSource isNil])
- or:[ changeSource asString = lastSource asString ]) ifTrue:[
- ] ifFalse:[
- lastChange isNil ifTrue:[
- "/ mhm - was not in the previous version
- ] ifFalse:[
- nChg := lastChange asNamedMethodChange
- ].
- lastRevision isNil ifTrue:[
- (stop = revisions size) ifTrue:[
- changeName := 'current (not in the repository)'.
- ] ifFalse:[
- "/ not showing all - dont really know
- changeName := 'current'.
- ].
- ] ifFalse:[
- changeName := lastRevision,' [',lastDate,']'.
- first ifTrue:[
- changeName := changeName,' (= current)'.
- ]
- ].
- nChg notNil ifTrue:[
- nChg changeName:changeName.
- previousMethods add:nChg.
- ].
- lastSource := changeSource.
- lastChange := chg.
-
- first := false.
- ].
- lastRevision := revision.
- lastDate := date.
- ] ensure:[
- revSourceStream notNil ifTrue:[revSourceStream close].
- ].
- ].
+ previousMethods := ChangeSet new.
+ lastSource := currentSource := method source.
+ lastRevision := lastDate := lastAuthor := nil.
+ first := true.
+
+ revisions from:start to:stop do:[:eachLogEntry |
+ |revision date author revSourceStream|
+
+ revision := eachLogEntry at:#revision.
+ date := eachLogEntry at:#date.
+ author := eachLogEntry at:#author ifAbsent:'?'.
+
+ [
+ |chg nChg classChangeSet changeSource changeName|
+
+ self activityNotification:('Fetching revision ',revision,'...').
+ thisIsAnExtensionMethod ifTrue:[
+ revSourceStream := mgr
+ streamForClass:nil
+ fileName:'extensions.st'
+ revision:revision
+ directory:directory
+ module:module
+ cache:true.
+ ] ifFalse:[
+ revSourceStream := mgr getSourceStreamFor:mclass revision:revision.
+ ].
+ revSourceStream isNil ifTrue:[
+ self warn:'could not load source for ' , mclass name , ' revision ', revision, ' from repository'.
+ chg := nil.
+ ] ifFalse:[
+ classChangeSet := ChangeSet fromStream:revSourceStream.
+
+ chg := classChangeSet
+ detect:[:chg | chg isMethodChange
+ and:[chg selector = mselector
+ and:[chg className = className]]]
+ ifNone:nil.
+ ].
+
+ chg isNil ifTrue:[
+ "the method was created in the next version (previous one processed)"
+ ] ifFalse:[
+ changeSource := chg source.
+ ].
+ ((changeSource isNil and:[lastSource isNil])
+ or:[ changeSource asString = lastSource asString ]) ifTrue:[
+ ] ifFalse:[
+ lastChange isNil ifTrue:[
+ "/ mhm - was not in the previous version
+ ] ifFalse:[
+ nChg := lastChange asNamedMethodChange
+ ].
+ lastRevision isNil ifTrue:[
+ (stop = revisions size) ifTrue:[
+ changeName := 'current (not in the repository)'.
+ ] ifFalse:[
+ "/ not showing all - dont really know
+ changeName := 'current'.
+ ].
+ ] ifFalse:[
+ changeName := lastRevision,' [',lastDate,' by ',lastAuthor,']'.
+ first ifTrue:[
+ changeName := changeName,' (= current)'.
+ ]
+ ].
+ nChg notNil ifTrue:[
+ nChg changeName:changeName.
+ previousMethods add:nChg.
+ ].
+ lastSource := changeSource.
+ lastChange := chg.
+
+ first := false.
+ ].
+ lastRevision := revision.
+ lastDate := date.
+ lastAuthor := author.
+ ] ensure:[
+ revSourceStream notNil ifTrue:[revSourceStream close].
+ ].
+ ].
].
"/ Transcript showCR:('it took %1 seconds' bindWith:(t /1000)printString).
- self activityNotification:nil.
- browser := (UserPreferences current changeSetBrowserClass) openOn:previousMethods.
- browser window label:('Revisions of ' , mclass name , ' ' , mselector).
- browser readOnly:true.
+ self activityNotification:nil.
+ browser := (UserPreferences current changeSetBrowserClass) openOn:previousMethods.
+ browser window label:('Revisions of ' , mclass name , ' ' , mselector).
+ browser readOnly:true.
].
"Modified: / 01-07-2011 / 16:34:29 / cg"
@@ -61920,11 +61922,11 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2146 2014-12-11 16:56:25 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2147 2014-12-11 19:28:45 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2146 2014-12-11 16:56:25 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2147 2014-12-11 19:28:45 cg Exp $'
!
version_HG
@@ -61933,7 +61935,7 @@
!
version_SVN
- ^ '$Id: Tools__NewSystemBrowser.st,v 1.2146 2014-12-11 16:56:25 cg Exp $'
+ ^ '$Id: Tools__NewSystemBrowser.st,v 1.2147 2014-12-11 19:28:45 cg Exp $'
! !