Time stamp of source code change of a method?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Time stamp of source code change of a method?

Hannes Hirzel
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

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Time stamp of source code change of a method?

Hannes Hirzel
P.S. I'd like to do this on a Cuis image of January 1st and then on a
Cuis image 30th June 2015.

And then do a bar chart


Package
NumberOfMethodsChanged

On 7/16/15, H. Hirzel <[hidden email]> 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
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Time stamp of source code change of a method?

Juan Vuletich-4
In reply to this post by Hannes Hirzel
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

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Time stamp of source code change of a method?

Hannes Hirzel
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 <[hidden email]> 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
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Time stamp of source code change of a method?

Hannes Hirzel
If I take a current image (18 Jul 2015, 4.2-2424)  I get the same result


a Set(#collect: #at:ifPresent: #at:ifPresent:ifAbsent: #postCopy #at:ifAbsent:)

All the FileMan additions are not listed. Maybe because they keep
their original time stamp, not the time stamp of the addition to
Squeak.

And the recent change on #compilerClass does not show up.

--HH

On 7/19/15, H. Hirzel <[hidden email]> wrote:

> 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 <[hidden email]> 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
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

Cuis compilerClass Screenshot from 2015-07-19 20:18:32.png (45K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Time stamp of source code change of a method?

Phil B
On Sun, 2015-07-19 at 20:21 +0000, H. Hirzel wrote:
> If I take a current image (18 Jul 2015, 4.2-2424)  I get the same result
>
>
> a Set(#collect: #at:ifPresent: #at:ifPresent:ifAbsent: #postCopy #at:ifAbsent:)
>
> All the FileMan additions are not listed. Maybe because they keep
> their original time stamp, not the time stamp of the addition to
> Squeak.
>

Right, the timestamp will reflect when they were last edited rather than
when they were loaded into the image.

> And the recent change on #compilerClass does not show up.
>

Same situation: #compilerClass while only recently re-added to the
image, hasn't actually been changed since it was removed and added back
so it still shows an older timestamp.

It sounds like you're looking for more of an image diff to see what
classes/methods changed between timer period X and Y?  This isn't
something that currently exists in an easy to use form that I'm aware
of.
 

> --HH
>
> On 7/19/15, H. Hirzel <[hidden email]> wrote:
> > 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 <[hidden email]> 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
> >>
> >
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Time stamp of source code change of a method?

Hannes Hirzel
Yes,

an image diff to see what classes/methods changed between timer period X and Y

is what I am looking for.

--Hannes

On 7/20/15, Phil (list) <[hidden email]> wrote:

> On Sun, 2015-07-19 at 20:21 +0000, H. Hirzel wrote:
>> If I take a current image (18 Jul 2015, 4.2-2424)  I get the same result
>>
>>
>> a Set(#collect: #at:ifPresent: #at:ifPresent:ifAbsent: #postCopy
>> #at:ifAbsent:)
>>
>> All the FileMan additions are not listed. Maybe because they keep
>> their original time stamp, not the time stamp of the addition to
>> Squeak.
>>
>
> Right, the timestamp will reflect when they were last edited rather than
> when they were loaded into the image.
>
>> And the recent change on #compilerClass does not show up.
>>
>
> Same situation: #compilerClass while only recently re-added to the
> image, hasn't actually been changed since it was removed and added back
> so it still shows an older timestamp.
>
> It sounds like you're looking for more of an image diff to see what
> classes/methods changed between timer period X and Y?  This isn't
> something that currently exists in an easy to use form that I'm aware
> of.
>
>> --HH
>>
>> On 7/19/15, H. Hirzel <[hidden email]> wrote:
>> > 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 <[hidden email]> 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
>> >>
>> >
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Time stamp of source code change of a method?

Juan Vuletich-4
Hi Hannes,

On 7/20/2015 9:55 AM, H. Hirzel wrote:
> Yes,
>
> an image diff to see what classes/methods changed between timer period X and Y
>
> is what I am looking for.
>
> --Hannes

That is easy.

In the newer image, evaluate: SystemOrganization fileOutAllCategories.

Now start the older image. (you might need to file in the attach if you
get a walkback) Open a File list. Click on the *AllCode.st file
generated in the newer image. Click on [contents]. Select "No".

Right click on the change list. 'remove up-to-date versions'.

"Right click again. Select methods equivalent to current". "Remove
selected items".

You can study them right there. Or you can "select all" "file out
selections". Then select this file in the file list and click on [code]
and use this view instead. In any of these ways, it is reasonable easy
to see how much changed, and check each change if desired.

Or you can come up with your own new and creative ways to use the tools
in the system :)

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

2425-privateReadSelector-fix-JuanVuletich-2015Jul20-19h44m-jmv.1.cs.zip (908 bytes) Download Attachment