Tool for: Image2 - Image1 > FileOut?

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

Tool for: Image2 - Image1 > FileOut?

Stefan Marr
Hello:

I got here two images without sufficient development history, source code management, or change sets.

One of the images is the basis point and the other contains all the relevant code I need to file out somehow so that it represents a diff which can be filed into the base point image easily.

I am only interested in classes, methods, and their meta infos, so general state in the image is not a problem at the moment.

If it would be only about methods, that would be easy, since I can find out whether it is a changed/new method by locking at the fileIndex.

However, for classes that does not work out. How can I find out whether they changed or were added?
That seems to be only possible if they were actually commented...

Is there any known tool which could produce me a diff/fileOut/changeSet from two given images?
Or might there be any other information in the image I could use to create one myself?

Thanks and best regards
Stefan


--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


Reply | Threaded
Open this post in threaded view
|

Re: Tool for: Image2 - Image1 > FileOut?

K K Subbu
On Wednesday 06 Oct 2010 2:01:56 pm Stefan Marr wrote:
> Hello:
>
> I got here two images without sufficient development history, source code
> management, or change sets.
>
> One of the images is the basis point and the other contains all the
> relevant code I need to file out somehow so that it represents a diff
> which can be filed into the base point image easily.
If the two images shared a common image sometime in the past and you have all
the changes that went into each one of them, then you can open a changelist
list:

   ChangeList browseFile: 'path/newimage.changes'.

> I am only interested in classes, methods, and their meta infos, so general
> state in the image is not a problem at the moment.

Classes are global variables, so they are part of the state:
   Smalltalk allClasses
will yield an ordered list of all classes in the image.

> If it would be only about methods, that would be easy, since I can find out
> whether it is a changed/new method by locking at the fileIndex.
> However, for classes that does not work out. How can I find out whether
> they changed or were added? That seems to be only possible if they were
> actually commented...
If you have the cs update files that went into the image, you could extract the
doIts with subclass: messages or method records with class side methods.

> Is there any known tool which could produce me a diff/fileOut/changeSet
> from two given images?
Sorry, I don't know of any :-(.

> Or might there be any other information in the
> image I could use to create one myself?
Compiled methods in development images may have a timeStamp. E.g.

 CompiledMethod someInstance dateMethodLastSubmitted
 CompiledMethod someInstance timeStamp
 (Morph class compiledMethodAt: #initialize) timeStamp

etc.

Subbu

Reply | Threaded
Open this post in threaded view
|

Re: Tool for: Image2 - Image1 > FileOut?

Bert Freudenberg
In reply to this post by Stefan Marr

On 06.10.2010, at 01:31, Stefan Marr wrote:

> Hello:
>
> I got here two images without sufficient development history, source code management, or change sets.
>
> One of the images is the basis point and the other contains all the relevant code I need to file out somehow so that it represents a diff which can be filed into the base point image easily.
>
> I am only interested in classes, methods, and their meta infos, so general state in the image is not a problem at the moment.
>
> If it would be only about methods, that would be easy, since I can find out whether it is a changed/new method by locking at the fileIndex.
>
> However, for classes that does not work out. How can I find out whether they changed or were added?
> That seems to be only possible if they were actually commented...
>
> Is there any known tool which could produce me a diff/fileOut/changeSet from two given images?
> Or might there be any other information in the image I could use to create one myself?
>
> Thanks and best regards
> Stefan

Monticello can do that.

http://www.mail-archive.com/beginners@.../msg07085.html

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Tool for: Image2 - Image1 > FileOut?

Stefan Marr
Hi Bert:

On 06 Oct 2010, at 15:27, Bert Freudenberg wrote:

>
> On 06.10.2010, at 01:31, Stefan Marr wrote:
>> Is there any known tool which could produce me a diff/fileOut/changeSet from two given images?
>> Or might there be any other information in the image I could use to create one myself?
>>
>> Thanks and best regards
>> Stefan
>
> Monticello can do that.
>
> http://www.mail-archive.com/beginners@.../msg07085.html
That looks nice, thanks.
I loaded the All-info.st and saved the All package afterwards.

In the second image I can now open the repo and inspect the changes with the changes button.
Don't know what the diff button is supposed to do, but it does not do anything (at least visually).

Is there away to fileOut what I see in the 'Changes from All-sm.1' window?

Thanks a lot
Stefan



--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


Reply | Threaded
Open this post in threaded view
|

Re: Tool for: Image2 - Image1 > FileOut?

Bert Freudenberg

On 06.10.2010, at 07:05, Stefan Marr wrote:

> Hi Bert:
>
> On 06 Oct 2010, at 15:27, Bert Freudenberg wrote:
>
>>
>> On 06.10.2010, at 01:31, Stefan Marr wrote:
>>> Is there any known tool which could produce me a diff/fileOut/changeSet from two given images?
>>> Or might there be any other information in the image I could use to create one myself?
>>>
>>> Thanks and best regards
>>> Stefan
>>
>> Monticello can do that.
>>
>> http://www.mail-archive.com/beginners@.../msg07085.html
> That looks nice, thanks.
> I loaded the All-info.st and saved the All package afterwards.
>
> In the second image I can now open the repo and inspect the changes with the changes button.
> Don't know what the diff button is supposed to do, but it does not do anything (at least visually).
>
> Is there away to fileOut what I see in the 'Changes from All-sm.1' window?

Right-click in the list, choose "file out (o)". This is a recent MC addition though.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Tool for: Image2 - Image1 > FileOut?

Stefan Marr
Hi Bert:

On 06 Oct 2010, at 16:11, Bert Freudenberg wrote:

>
> On 06.10.2010, at 07:05, Stefan Marr wrote:
>>> Monticello can do that.
>>>
>>> http://www.mail-archive.com/beginners@.../msg07085.html
>> That looks nice, thanks.
>> I loaded the All-info.st and saved the All package afterwards.
>>
>> In the second image I can now open the repo and inspect the changes with the changes button.
>> Don't know what the diff button is supposed to do, but it does not do anything (at least visually).
>>
>> Is there away to fileOut what I see in the 'Changes from All-sm.1' window?
>
> Right-click in the list, choose "file out (o)". This is a recent MC addition though.
Ok, what I did was first creating the MCZ in the base image.
Then I opened the image with all the stuff in it what I would like in a diff/fileOut.

But then the 'Changes' window report all additions as being 'removed'.
So, I tried it the other way around, having now a MCZ that contains all the relevant new code.

I opened that one in the base image, and opened the 'changes' window.
Now it shows me the changes correctly as additions.

However, now the next problems start to appear:

First, the 'file out (o)' fails, because the methods are not actually filed in to the image. (Thats how I understand the error message, complaining about a missing selector.)
And second, I can only file out one item at a time from the window.

Is there a way to work around the first problem?
And for the second problem, at which classes/methods could I look to actually able to file out all changes at once?

BTW: just in case it would make a difference, I update the Monticello package to trunk/Monticello-nice.405.

Thanks a lot
Stefan



>
> - Bert -
>
>
>

--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


Reply | Threaded
Open this post in threaded view
|

Re: Tool for: Image2 - Image1 > FileOut?

Bert Freudenberg

On 06.10.2010, at 07:44, Stefan Marr wrote:

> Hi Bert:
>
> On 06 Oct 2010, at 16:11, Bert Freudenberg wrote:
>
>>
>> On 06.10.2010, at 07:05, Stefan Marr wrote:
>>>> Monticello can do that.
>>>>
>>>> http://www.mail-archive.com/beginners@.../msg07085.html
>>> That looks nice, thanks.
>>> I loaded the All-info.st and saved the All package afterwards.
>>>
>>> In the second image I can now open the repo and inspect the changes with the changes button.
>>> Don't know what the diff button is supposed to do, but it does not do anything (at least visually).
>>>
>>> Is there away to fileOut what I see in the 'Changes from All-sm.1' window?
>>
>> Right-click in the list, choose "file out (o)". This is a recent MC addition though.
> Ok, what I did was first creating the MCZ in the base image.
> Then I opened the image with all the stuff in it what I would like in a diff/fileOut.
>
> But then the 'Changes' window report all additions as being 'removed'.
> So, I tried it the other way around, having now a MCZ that contains all the relevant new code.
>
> I opened that one in the base image, and opened the 'changes' window.
> Now it shows me the changes correctly as additions.
>
> However, now the next problems start to appear:
>
> First, the 'file out (o)' fails, because the methods are not actually filed in to the image. (Thats how I understand the error message, complaining about a missing selector.)

There should be no error. You could attach the debug log so someone else can take a look. Possibly this MC extension requires some new support in the base system too, I don't know.

> And second, I can only file out one item at a time from the window.
>
> Is there a way to work around the first problem?
> And for the second problem, at which classes/methods could I look to actually able to file out all changes at once?

Deselect any item, then file out.

- Bert -