Cheap hack to get gc formats working

John Arbash Meinel john at arbash-meinel.com
Tue Feb 17 22:29:33 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So a quick fix to get the chk + gc stuff working is this diff:
=== modified file 'repofmt.py'
- --- repofmt.py  2009-02-17 19:35:38 +0000
+++ repofmt.py  2009-02-17 22:25:00 +0000
@@ -229,6 +229,9 @@
         self.repo.signatures._index._add_callback =
self.signature_index.add_callback
         self.repo.texts._index._add_callback = self.text_index.add_callback

+    def _do_autopack(self):
+        return False
+


 class GCPackRepository(KnitPackRepository):
@@ -301,6 +304,7 @@
         self._reconcile_does_inventory_gc = True
         self._reconcile_fixes_text_parents = True
         self._reconcile_backsup_inventory = False
+        self._fetch_uses_deltas = False


 if chk_support:
@@ -362,6 +366,7 @@
             self._reconcile_does_inventory_gc = True
             self._reconcile_fixes_text_parents = True
             self._reconcile_backsup_inventory = False
+            self._fetch_uses_deltas = False


 class RepositoryFormatPackGCPlain(RepositoryFormatPackDevelopment2):

Basically, it forces the generic fetching to work in terms of fulltexts,
and turns 'autopack' into a no-op. (It currently fails because GC
repositories hold different info in the index than other repos, and the
auto-pack code makes assumptions.)

- From what I can tell, if I don't set fetch_uses_deltas, there is
something about my repo which causes a delta to be transmitted before
its compression parent, which means that the GC repository cannot adapt
it into a fulltext for insertion. I assume it has something to do with
newer sort orderings for transmitting deltas, etc. (Remembering that
adapters running inside "insert_record_stream()" adapt based on what is
already present in the target repo, not based on requesting more data
from the source repository.)

There are certainly other/better fixes, but this at least gets things
*working* again, and we can move on from here.

Robert, do you want to have this patch, or wait until a more-correct fix
is written?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmbOk0ACgkQJdeBCYSNAANAQwCeO76f72xekU3+JGFtWWVwJTXl
8XUAoItX3U3IrD6DSKLLxi2DL6UkxlTG
=Nrss
-----END PGP SIGNATURE-----



More information about the bazaar mailing list