Git repositories and sources/changes files (was Re: [squeak-dev]
[Squeak 4.0] Anyone know much about the format of the sources/changes
ron.spengler at gmail.com
Sat Feb 27 03:57:59 UTC 2010
Wow, really? I was thinking of doing something at least conceptually
similar, but I didn't think I'd ever find the time. How long before
you can put this up somewhere where we can look at it?
On Thursday, February 25, 2010, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 25.02.2010, at 11:08, Tony Garnock-Jones wrote:
>> Bert Freudenberg wrote:
>>> Randal is right. You can not just add something at the beginning of
>>> the sources or changes file. These are *NOT* text files but
>>> databases, the offsets are held in the image (each method knows the
>>> file position of its source code).
>> So, just as an aside, over an idle couple of days this week I
>> implemented the Git repository format in Smalltalk. (This is why I was
>> asking about the SystemChangeNotifier earlier.)
>> So far, it can
>> - initialize repositories
>> - read and write loose objects (blobs, trees, commits, tags)
>> - read packed objects (but not write them, yet)
>> - resolve and update refs (tags and branch heads)
>> I remember hearing something about a bit of good refactoring recently
>> that permitted *switching out the sources implementation* for an image.
>> Perhaps it could be backed onto a Git repository using this code.
>> Methods would then know the sha1 of the blob that holds the source.
> That might work indeed.
> However, the method source pointer is not only used for accessing the current code, but previous versions of the method too. So you would need some more info than just the blob.
>> #condenseSources feels very much like "git pack-objects" or "git gc".
> Not quite, #condenseSources is destructive. It's rather more like pruning history - it deletes all previous versions. With something like git we might never have to do that again. Yay!
>> I haven't done the network protocol yet (in large part because I can't
>> yet build (good) packs) so shelling out to "git fetch" and "git push" is
>> still needed for that.
> Do you have ideas yet for how to map the Smalltalk structure to file names? Possibly you could reuse the mapping from SqueakSVN
> - Bert -
More information about the Squeak-dev