Finding Pundles changed in a specific time interval

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

Finding Pundles changed in a specific time interval

Andres Fortier-2
Hi list,
         I need to find all the pundles that have been changed in a
specific period of time. I imagined that I would find something like a
modification timestamp in PundleModel, Store.Change or Store.Changes but
I don't seem to be able find it. Any hints where to look for?

Thanks in advance.

Andrés

Reply | Threaded
Open this post in threaded view
|

Re: Finding Pundles changed in a specific time interval

Reinout Heeck-2
Andres Fortier wrote:
> Hi list,
>         I need to find all the pundles that have been changed in a
> specific period of time. I imagined that I would find something like a
> modification timestamp in PundleModel, Store.Change or Store.Changes
> but I don't seem to be able find it. Any hints where to look for?
>
>

It is messy because there is no API for that in Store.

Here's the assembly code:

| dbRecord |
dbRecord := (Store.Registry packageNamed: 'Kernel-Objects') parentRecord.
Timestamp fromSeconds: dbRecord timeStamp + DBObject timeOffset.




R
-

Reply | Threaded
Open this post in threaded view
|

Re: Finding Pundles changed in a specific time interval

Alan Knight-2
At 05:02 AM 8/10/2007, Reinout Heeck wrote:
Andres Fortier wrote:
Hi list,
        I need to find all the pundles that have been changed in a specific period of time. I imagined that I would find something like a modification timestamp in PundleModel, Store.Change or Store.Changes but I don't seem to be able find it. Any hints where to look for?


It is messy because there is no API for that in Store.

Here's the assembly code:

| dbRecord |
dbRecord := (Store.Registry packageNamed: 'Kernel-Objects') parentRecord.
Timestamp fromSeconds: dbRecord timeStamp + DBObject timeOffset.

Actually I think he meant within the image. Unfortunately, I don't think the change sets keep track of modification times. I suspect the only way to do that might be to read the change log, which does have time stamps, and check for the package associated with code changes. And if someone made changes, then quit the image without saving, you'd get false positives.

If it is within the database, I'd suggest that the StoreGlorp bundle might be useful, which provides some more convenient querying facilities for Store entities.

--
Alan Knight [|], Cincom Smalltalk Development
Reply | Threaded
Open this post in threaded view
|

Re: Finding Pundles changed in a specific time interval

Andres Fortier-2
Alan, Reinout:
               thanks for your responses! I'll give some context in
order to see if I can get a workaround: I'm trying to add some
task-oriented support for the development in VW. So, the idea is that
there is a list of pending task, I choose one and start it, develop some
code and finish it. The idea is that, when a task is finished, all the
changes that have been done in that period of time are somehow recorded
(right now the idea is to find all the pundles that are affected by
those changes and prompt the developer to publish a new version of the
affected pundles).

Since I didn't find any straightforward support in the pundlemodel, I've
been looking around the CompiledMethod class and found out that
annotated methods have a dictionary of attributes; is it legal to use
these attributes to add a timestamp that records when a method is compiled?

Thanks again,
              andrés

Alan Knight escribió:

> At 05:02 AM 8/10/2007, Reinout Heeck wrote:
>> Andres Fortier wrote:
>>> Hi list,
>>>        I need to find all the pundles that have been changed in a specific period of time. I imagined that I would find something like a modification timestamp in PundleModel, Store.Change or Store.Changes but I don't seem to be able find it. Any hints where to look for?
>>>
>> It is messy because there is no API for that in Store.
>>
>> Here's the assembly code:
>>
>> | dbRecord |
>> dbRecord := (Store.Registry packageNamed: 'Kernel-Objects') parentRecord.
>> Timestamp fromSeconds: dbRecord timeStamp + DBObject timeOffset.
>
> Actually I think he meant within the image. Unfortunately, I don't think the change sets keep track of modification times. I suspect the only way to do that might be to read the change log, which does have time stamps, and check for the package associated with code changes. And if someone made changes, then quit the image without saving, you'd get false positives.
>
> If it is within the database, I'd suggest that the StoreGlorp bundle might be useful, which provides some more convenient querying facilities for Store entities.
>
> --
> Alan Knight [|], Cincom Smalltalk Development
> [hidden email]
> [hidden email]
> http://www.cincom.com/smalltalk
>

Reply | Threaded
Open this post in threaded view
|

Re: Finding Pundles changed in a specific time interval

Reinout Heeck-2
Andres Fortier wrote:

> Alan, Reinout:
>               thanks for your responses! I'll give some context in
> order to see if I can get a workaround: I'm trying to add some
> task-oriented support for the development in VW. So, the idea is that
> there is a list of pending task, I choose one and start it, develop
> some code and finish it. The idea is that, when a task is finished,
> all the changes that have been done in that period of time are somehow
> recorded (right now the idea is to find all the pundles that are
> affected by those changes and prompt the developer to publish a new
> version of the affected pundles).
>

You don't need tomuck with timestamps:
 we already have most of the tracking you need in the form of the
changeset manager (bottom left in the visual launcher).

Create a new changeset for each task, you add the code to find the
pundles affected by a changeset.


> Since I didn't find any straightforward support in the pundlemodel,
> I've been looking around the CompiledMethod class and found out that
> annotated methods have a dictionary of attributes; is it legal to use
> these attributes to add a timestamp that records when a method is
> compiled?

Yes that is legal but may have repercussions for the storage size of all
compiled methods.

I have roughly 180000 compiled methods in the image I worked on today.
Assuming they are all not annotated, changing them to annotated methods
would add some 0.7 Mb for the extra ivar slot alone. I don't know what
you are going to store in that ivar but that may well be many Mb if you
don't give it adequate thought.


R
-

Reply | Threaded
Open this post in threaded view
|

Re: Finding Pundles changed in a specific time interval

Alan Knight-2
At 12:15 PM 8/10/2007, Reinout Heeck wrote:
Andres Fortier wrote:
Alan, Reinout:
              thanks for your responses! I'll give some context in order to see if I can get a workaround: I'm trying to add some task-oriented support for the development in VW. So, the idea is that there is a list of pending task, I choose one and start it, develop some code and finish it. The idea is that, when a task is finished, all the changes that have been done in that period of time are somehow recorded (right now the idea is to find all the pundles that are affected by those changes and prompt the developer to publish a new version of the affected pundles).

You don't need tomuck with timestamps:
we already have most of the tracking you need in the form of the changeset manager (bottom left in the visual launcher).

Create a new changeset for each task, you add the code to find the pundles affected by a changeset.

Yes, if you know in advance that your task is active, you can just put in code to create/activate a particular change set when that task is progress. Or alternatively, you can register for notification when any change occurs, and just note whatever you're interested in in an object of your own. It would be fairly easy to find out either way which packages were affected, and even exactly which code changed.


--
Alan Knight [|], Cincom Smalltalk Development
Reply | Threaded
Open this post in threaded view
|

Re: Finding Pundles changed in a specific time interval

Andres Fortier-2
Reinout, Alan:
                thanks for your help! I will definitely go in the changeset direction
(just for the record, I wasn't planning to add timestamps to all
compiled methods -i.e. annotate all methods in the image-, only to those
that get modified inside a task).

Thanks again,
              Andrés

Alan Knight escribió:

> At 12:15 PM 8/10/2007, Reinout Heeck wrote:
>> Andres Fortier wrote:
>>> Alan, Reinout:
>>>              thanks for your responses! I'll give some context in order to see if I can get a workaround: I'm trying to add some task-oriented support for the development in VW. So, the idea is that there is a list of pending task, I choose one and start it, develop some code and finish it. The idea is that, when a task is finished, all the changes that have been done in that period of time are somehow recorded (right now the idea is to find all the pundles that are affected by those changes and prompt the developer to publish a new version of the affected pundles).
>> You don't need tomuck with timestamps:
>> we already have most of the tracking you need in the form of the changeset manager (bottom left in the visual launcher).
>>
>> Create a new changeset for each task, you add the code to find the pundles affected by a changeset.
>
> Yes, if you know in advance that your task is active, you can just put in code to create/activate a particular change set when that task is progress. Or alternatively, you can register for notification when any change occurs, and just note whatever you're interested in in an object of your own. It would be fairly easy to find out either way which packages were affected, and even exactly which code changed.
>
>
> --
> Alan Knight [|], Cincom Smalltalk Development
> [hidden email]
> [hidden email]
> http://www.cincom.com/smalltalk
>