At http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/trunk
------------------------------------------------------------
revno: 50
revision-id: [email protected]
parent: [email protected]
committer: John Arbash Meinel <[email protected]>
branch nick: trunk
timestamp: Thu 2009-02-26 21:34:45 -0600
message:
Make it clear that the bits you get from 'apply_delta' are chunks, not lines.
=== modified file 'groupcompress.py'
--- a/groupcompress.py 2009-02-27 03:28:10 +0000
+++ b/groupcompress.py 2009-02-27 03:34:45 +0000
@@ -282,9 +282,9 @@
if label != key:
raise AssertionError("wrong key: %r, wanted %r" % (label, key))
# Perhaps we want to keep the line offsets too in memory at least?
- lines = apply_delta(''.join(self.lines), delta)
- sha1 = sha_strings(lines)
- return lines, sha1
+ chunks = apply_delta(''.join(self.lines), delta)
+ sha1 = sha_strings(chunks)
+ return chunks, sha1
def flush_multi(self, instructions, lines, new_lines, index_lines):
"""Flush a bunch of different ranges out.
@@ -639,11 +639,11 @@
label, sha1, delta = parse(delta_lines)
if label != key:
raise AssertionError("wrong key: %r, wanted %r" % (label,
key))
- lines = apply_delta(plain, delta)
+ chunks = apply_delta(plain, delta)
## sha1 = sha_strings(lines)
- if sha_strings(lines) != sha1:
+ if sha_strings(chunks) != sha1:
raise AssertionError('sha1 sum did not match')
- yield ChunkedContentFactory(key, parents, sha1, lines)
+ yield ChunkedContentFactory(key, parents, sha1, chunks)
def get_sha1s(self, keys):
"""See VersionedFiles.get_sha1s()."""
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits