revfile developments
Martin Pool
mbp at sourcefrog.net
Sun Apr 10 00:55:01 BST 2005
Hi Matt,
Thanks for letting me use your revfile code.
Here are the changes I made:
http://bazaar-ng.org/bzr/bzr.revfile/bzrlib/mdiff.py
http://bazaar-ng.org/bzr/bzr.revfile/bzrlib/revfile.py
At first I tried doing a byte-by-byte diff, but that turns out to be too
slow, as you probably know. I fixed a bug in the linesplit()
function.
There are two small optimizations to avoid storing a diff or avoid doing
gzip if they wouldn't win.
I think it's important to be able to have branching within the storage
of a single file, so I added that.
Although I index by SHA-1, I don't make the mistake of Monotone of
assuming that two objects with the same content are the same thing.
There is a higher-level inventory and revision object that just uses
revfile as a content-addressible store. I need to use something more
than just an integer to identify revisions because it's too hard to keep
simple integers in sync in a distributed system. A nice side effect is
that we can easily check we're getting out the text we meant to put in.
Each delta has a "base" pointer saying which previous text it's stored
relative to. The base pointer doesn't have any meaning to the revision
control layer; it's just for delta compression. This could be
manipulated to do some kind of skip-deltas to avoid ever needing to
store the full text, but I don't do that for now.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050410/3bdcaef4/attachment.pgp
More information about the bazaar
mailing list