[PATCH] bundlerepo: don't write branch cache to disk

Sune Foldager cryo at cyanite.org
Thu Dec 1 13:19:16 UTC 2011


# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1322745437 -3600
# Branch stable
# Node ID 239940e1075e9540ca83853fa43a23bf5c421cf6
# Parent  e387e760b207383c961ed8accd35583791a33bb0
bundlerepo: don't write branch cache to disk

Calling branchmap() or similar on a bundlerepo would write the bundle-augmented
branch cache to disk, requiring a subsequent expensive rebuild when the repo
is used without the bundle.

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -266,6 +266,10 @@
     def getcwd(self):
         return os.getcwd() # always outside the repo
 
+    def _writebranchcache(self, branches, tip, tiprev):
+        # don't overwrite the disk cache with bundle-augmented data
+        pass
+
 def instance(ui, path, create):
     if create:
         raise util.Abort(_('cannot create new bundle repository'))



More information about the Mercurial-devel mailing list