--- a/SourceCodeManagerUtilities.st Tue Feb 02 07:03:50 2016 +0100
+++ b/SourceCodeManagerUtilities.st Thu Feb 18 07:02:05 2016 +0100
@@ -2177,7 +2177,7 @@
against the newest or an asked-for version found in the repository."
|classToCompare brwsr comparedSource currentSource rev revString thisRevString
- scmManager revisionInClass versionsAreTheSame|
+ scmManager revisionInClass versionsAreTheSame revInfo revAuthor revDate revLabel |
classToCompare := aClass theNonMetaclass.
@@ -2312,8 +2312,31 @@
|newestRev|
(newestRev := scmManager newestRevisionOf:classToCompare) notNil ifTrue:[
- revString := '(newest is ' , newestRev , ')'
+ revString := '(newest is ' , newestRev , ')'.
+ rev := newestRev.
]
+ ] ifFalse:[
+ rev := revString
+ ].
+
+ revLabel := revString.
+
+ rev notNil ifTrue:[
+ revInfo := scmManager revisionLogOf:classToCompare fromRevision:rev toRevision:rev.
+ revInfo notNil ifTrue:[
+ revInfo := (revInfo at:#revisions) first.
+ revAuthor := revInfo at:#author ifAbsent:[nil].
+ revDate := revInfo at:#date ifAbsent:[nil].
+ revDate notNil ifTrue:[
+ revDate := Timestamp readFrom:revDate onError:nil.
+ ].
+ revLabel := revString , ' ('.
+ revDate notNil ifTrue:[
+ revLabel := revLabel , revDate asDate printString.
+ ].
+ revLabel := revLabel , ' by ', revAuthor.
+ revLabel := revLabel , ')'.
+ ].
].
self activityNotification:'comparing...'.
@@ -2333,7 +2356,7 @@
] do:[
brwsr := (UserPreferences versionDiffViewerClass)
openOnClass:classToCompare
- labelA:('Repository: ' , revString)
+ labelA:('Repository: ' , revLabel)
sourceA:comparedSource
labelB:('Current: (based on: ' , thisRevString , ')')
sourceB:currentSource