2627 "/ (info includesKey:#directory) ifTrue:[ |
2629 "/ (info includesKey:#directory) ifTrue:[ |
2628 "/ package := (info at:#directory). |
2630 "/ package := (info at:#directory). |
2629 "/ ]. |
2631 "/ ]. |
2630 "/ ]. |
2632 "/ ]. |
2631 fileName := mgr containerFromSourceInfo:info. |
2633 fileName := mgr containerFromSourceInfo:info. |
|
2634 fileName isNil ifTrue:[ fileName := aClass classFilename ]. |
2632 (nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[ |
2635 (nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[ |
2633 nameSpacePrefix := nameSpace name , '::'. |
2636 nameSpacePrefix := nameSpace name , '::'. |
2634 fileName := fileName withoutPrefix:nameSpacePrefix. |
2637 fileName := fileName withoutPrefix:nameSpacePrefix. |
2635 ]. |
2638 ]. |
2636 "/ (info includesKey:#fileName) ifTrue:[ |
2639 "/ (info includesKey:#fileName) ifTrue:[ |
4041 collect:[:assoc | assoc key]) reverse. |
4045 collect:[:assoc | assoc key]) reverse. |
4042 tagList remove:'stable' ifAbsent:[]. |
4046 tagList remove:'stable' ifAbsent:[]. |
4043 tagList notEmpty ifTrue:[tagList addFirst:'-']. |
4047 tagList notEmpty ifTrue:[tagList addFirst:'-']. |
4044 tagList addFirst:'stable'. |
4048 tagList addFirst:'stable'. |
4045 ]. |
4049 ]. |
4046 |
4050 |
4047 items := revisions collect:[:each | |rev date who flag| |
4051 "/ fill in timestamps |
4048 rev := each at:#revision. |
4052 revisions do:[:each | |
4049 date := (each at:#date ifAbsent:nil) ? '?'. |
4053 |timestampString timestamp| |
4050 who := (each at:#author ifAbsent:nil) ? '?'. |
4054 |
4051 rev = stableRevision ifTrue:[ |
4055 timestampString := each at:#date ifAbsent:nil. |
4052 flag := ' Stable' allBold. |
4056 timestampString notNil ifTrue:[ |
4053 ] ifFalse:[rev = releasedRevision ifTrue:[ |
4057 timestamp := Timestamp readFrom:timestampString onError:nil. |
4054 flag := ' Released' allBold. |
4058 timestamp notNil ifTrue:[ |
4055 ] ifFalse:[ |
4059 each at:#timestamp put:timestamp. |
4056 flag := ' ' |
4060 each at:#day put:timestamp asDate. |
4057 ]]. |
4061 ]. |
4058 rev allBold , flag, ' [' , date , ' by ' , who , ']' |
4062 ]. |
4059 ]. |
4063 ]. |
|
4064 |
|
4065 items := revisions |
|
4066 collectWithIndex:[:each :idx| |
|
4067 |rev timestamp date time dateAndTimeString who flag |
|
4068 prevInfo prevDate nextInfo nextDate dateDifferentToPrev dateDifferentToNext| |
|
4069 |
|
4070 rev := each at:#revision. |
|
4071 |
|
4072 timestamp := each at:#timestamp. |
|
4073 timestamp notNil ifTrue:[ |
|
4074 date := each at:#day. |
|
4075 date = Date today ifTrue:[ |
|
4076 dateAndTimeString := timestamp asTime printString. |
|
4077 ] ifFalse:[ |
|
4078 "/ if date is different to both previous AND next, |
|
4079 "/ only show the date |
|
4080 dateDifferentToPrev := dateDifferentToNext := false. |
|
4081 (idx > 1) ifTrue:[ |
|
4082 prevInfo := revisions at:idx-1. |
|
4083 prevDate := prevInfo at:#day ifAbsent:nil. |
|
4084 dateDifferentToPrev := (prevDate notNil and:[prevDate ~= date]). |
|
4085 ]. |
|
4086 (idx < revisions size) ifTrue:[ |
|
4087 nextInfo := revisions at:idx+1. |
|
4088 nextDate := nextInfo at:#day ifAbsent:nil. |
|
4089 dateDifferentToNext := (nextDate notNil and:[nextDate ~= date]). |
|
4090 ]. |
|
4091 (dateDifferentToPrev and:[dateDifferentToPrev]) ifTrue:[ |
|
4092 dateAndTimeString := date printString. |
|
4093 ] ifFalse:[ |
|
4094 dateAndTimeString := date printString,' ',(timestamp asTime printString). |
|
4095 ] |
|
4096 ]. |
|
4097 ] ifFalse:[ |
|
4098 dateAndTimeString := (each at:#date ifAbsent:nil) ? '(unknown time)'. |
|
4099 ]. |
|
4100 who := (each at:#author ifAbsent:nil) ? '?'. |
|
4101 rev = stableRevision ifTrue:[ |
|
4102 flag := ' Stable' allBold. |
|
4103 ] ifFalse:[rev = releasedRevision ifTrue:[ |
|
4104 flag := ' Released' allBold. |
|
4105 ] ifFalse:[ |
|
4106 flag := '' |
|
4107 ]]. |
|
4108 '%1%2 [%3 by %4]' bindWith:rev allBold with:flag with:dateAndTimeString with:who |
|
4109 ]. |
|
4110 |
4060 revisions := revisions collect:[:each | each at:#revision]. |
4111 revisions := revisions collect:[:each | each at:#revision]. |
4061 ] ifFalse:[ |
4112 ] ifFalse:[ |
4062 newestRev := aSourceCodeManager newestRevisionInFile:fileName directory:directory module:module. |
4113 newestRev := aSourceCodeManager newestRevisionInFile:fileName directory:directory module:module. |
4063 revisions := items := nil. |
4114 revisions := items := nil. |
4064 |
4115 |