[squeak-dev] Diff

Juan Vuletich juan at jvuletich.org
Thu Jun 2 14:55:58 UTC 2011


Hi Casey,

Casey Ransberger wrote:
> ...
> I need a way to diff two images. I need to be able to roll some metrics around "how different are these two images."
>
> By "mutually missing," I mean specifically any case were one image needs a selector the other hasn't got. This merged list is what I mean by "mutually missing."
>
> For a first stab, I will be glad to ignore mutable state in the images and focus entirely on source code. I'd like to simply know:
>
> 1) how many selectors are mutually missing
>
> 2) how many methods are different (it might make sense to compare compiled methods, rather than source methods in this particular case if it will ignore stylistic differences to any extent)
>
> 3) How many classes are mutually missing 
>
> ....and certainly many, many other things I'll learn that I need later. My plan is to just iterate over and enumerate these objects. It will probably take some time to do, no doubt. 
>
> Could be a fool's errand, but at least from a technical perspective, I want to understand our differences better than I do now, and this is the best way that I know how. 
> ...

What I do in such cases (did it several times) is to fileOut all the 
code in both images. Then, in each image, I open it with the ChangeList 
browser the file with the code from the other image. First step, is 
'remove all up-to-date'. Then, on each image, you have as new methods 
those that are missing and as changed methods those that changed. This 
is good for taking statistics, studying, merging, etc.

HTH.

Cheers,
Juan Vuletich



More information about the Squeak-dev mailing list