Rev 48: Make sure we don't inter-pack to GCCHKBig repos. in http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/internal_index

John Arbash Meinel john at arbash-meinel.com
Thu Mar 5 16:53:20 GMT 2009


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

------------------------------------------------------------
revno: 48
revision-id: john at arbash-meinel.com-20090305165238-o5be2o7v8wzewnlk
parent: john at arbash-meinel.com-20090305154227-41elarat0xs75c1p
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: internal_index
timestamp: Thu 2009-03-05 10:52:38 -0600
message:
  Make sure we don't inter-pack to GCCHKBig repos.
  Change the code so that we can branch from a source that has no labels
  even if we don't have _NO_LABELS set locally.
  Restore labels and slow as the default.
-------------- next part --------------
=== modified file 'groupcompress.py'
--- a/groupcompress.py	2009-03-05 15:42:27 +0000
+++ b/groupcompress.py	2009-03-05 16:52:38 +0000
@@ -53,8 +53,8 @@
     )
 from bzrlib.plugins.groupcompress import errors as gc_errors
 
-_NO_LABELS = True
-_FAST = True
+_NO_LABELS = False
+_FAST = False
 
 def encode_base128_int(val):
     """Convert an integer into a 7-bit lsb encoding."""
@@ -209,7 +209,7 @@
         :param sha1: TODO (should we validate only when sha1 is supplied?)
         :return: The bytes for the content
         """
-        if _NO_LABELS:
+        if _NO_LABELS or not self._entries:
             start, end = index_memo[3:5]
             c = self._content[start]
             if c == 'f':

=== modified file 'repofmt.py'
--- a/repofmt.py	2009-03-05 15:42:27 +0000
+++ b/repofmt.py	2009-03-05 16:52:38 +0000
@@ -630,7 +630,7 @@
         repository_class = GCCHKPackRepository
         # For right now, setting this to True gives us InterModel1And2 rather
         # than InterDifferingSerializer
-        rich_root_data = True
+        rich_root_data = False
 
         def get_format_string(self):
             """See RepositoryFormat.get_format_string()."""
@@ -643,7 +643,7 @@
 
 
     chk_serializer_255_bigpage = chk_serializer.CHKSerializer(65536, True, 'hash-255-way')
-    class RepositoryFormatPackGCCHK255Big(RepositoryFormatPackDevelopment5Hash255):
+    class RepositoryFormatPackGCCHK255Big(RepositoryFormatPackGCCHK255):
         """A hashed CHK+group compress pack repository."""
 
         repository_class = GCCHKPackRepository
@@ -667,7 +667,8 @@
     formats = (RepositoryFormatPackGCPlain,)
     if chk_support:
         formats = formats + (RepositoryFormatPackGCCHK16,
-                             RepositoryFormatPackGCCHK255)
+                             RepositoryFormatPackGCCHK255,
+                             RepositoryFormatPackGCCHK255Big)
     if isinstance(source._format, formats) or isinstance(target._format, formats):
         return False
     else:



More information about the bazaar-commits mailing list