Rev 101: Remove the temporary adjustment for handling multiple formats of labels. in http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/rabin

John Arbash Meinel john at arbash-meinel.com
Tue Mar 3 22:20:37 GMT 2009


At http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/rabin

------------------------------------------------------------
revno: 101
revision-id: john at arbash-meinel.com-20090303221259-ghe53xhqu8igvz03
parent: john at arbash-meinel.com-20090303220215-1luhz4zfr9vrdmud
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: rabin
timestamp: Tue 2009-03-03 16:12:59 -0600
message:
  Remove the temporary adjustment for handling multiple formats of labels.
  Update the maximum size source array.
  I was hitting 16k sources in a single group, and I didn't want to write the code
  that resizes sources and then adjusts the existing index pointers.
  That should be done, though.
-------------- next part --------------
=== modified file '_groupcompress_pyx.pyx'
--- a/_groupcompress_pyx.pyx	2009-03-03 21:07:21 +0000
+++ b/_groupcompress_pyx.pyx	2009-03-03 22:12:59 +0000
@@ -96,7 +96,7 @@
     def __init__(self, source=None):
         self._sources = []
         self._index = NULL
-        self._max_num_sources = 4096
+        self._max_num_sources = 65000
         self._source_infos = <source_info *>safe_malloc(sizeof(source_info)
                                                         * self._max_num_sources)
         self._source_offset = 0

=== modified file 'groupcompress.py'
--- a/groupcompress.py	2009-03-03 22:02:15 +0000
+++ b/groupcompress.py	2009-03-03 22:12:59 +0000
@@ -68,8 +68,8 @@
         or not len_line.startswith('len:')
         ):
         raise AssertionError("bad text record %r" % (bytes,))
-    label = tuple(label_line[6:].lstrip(' ').split('\x00'))
-    sha1 = sha1_line[5:].lstrip(' ')
+    label = tuple(label_line[6:].split('\x00'))
+    sha1 = sha1_line[5:]
     length = int(len_line[4:])
     if not len(delta_bytes) == length:
         raise AssertionError("bad length record %r" % (bytes,))



More information about the bazaar-commits mailing list