[Cuis] Time stamp of source code change of a method?

H. Hirzel hannes.hirzel at gmail.com
Sun Jul 19 14:48:04 CDT 2015


If I use this to find out which methods have a time stamp date
indicating a change after the 1st of January 2015 in a pristine Cuis
4.2-2243 (17 April 2015) image I find out that only the

#postCopy method was changed (probably added) in nearly all classes.

If I change the base line date to 1st of January 2014 I get

a Set(#collect: #at:ifPresent: #at:ifPresent:ifAbsent: #postCopy #at:ifAbsent:)
as changed/updated methods (i.e. methods which have a time stamp in
this period).

Of course this assumes that a method gets a time stamp when changed.
Many methods have nil as a time stamp.


Could somebody from the list check this please?


|date coll baseLineDate dt  updatedMethods |

baseLineDate := Date year: 2014 month: 1 day: 1.
coll := OrderedCollection new.

Smalltalk allClasses do: [ :cls |
cls allSelectors do: [ :sel |
dt := VersionsBrowser timeStampFor:  sel class: Dictionary reverseOrdinal:  1.

dt notNil ifTrue: [
date := dt select:  [ :ch | (((ch isDigit) or: [ch = $/ ]) or: [ch = $
]) or: [ch = $:]] .
(date = '') ifFalse:
	[date := Date fromString: date.
		(date > baseLineDate) ifTrue: [coll add: (Association key:
(Association key: cls value: sel) value: date)
]]].

]].

updatedMethods := Set new.
coll do: [ :elem | updatedMethods add: (elem key value)].
coll inspect.
updatedMethods inspect




On 7/17/15, Juan Vuletich <juan at jvuletich.org> wrote:
> On 7/16/2015 11:49 AM, H. Hirzel wrote:
>> Hello
>>
>> I'd like to do a query finding out about the time stamp of  source
>> code changes of all methods in the Cuis image and then do a list with
>> the following four columns
>>
>>
>> ClassTheMethodBelongsTo, PackageTheClassBelongsTo, MethodName,
>> DateOfChange
>>
>> Help is appreciated.
>>
>> Hannes
>
> Check #timeStampFor:class:reverseOrdinal: and in general
> #annotationForSelector:ofClass:
>
> Cheers,
> Juan Vuletich
>




More information about the Cuis mailing list