bundlerepo: don't write branch cache to disk stable
authorSune Foldager <cryo@cyanite.org>
Thu, 01 Dec 2011 14:17:17 +0100
branchstable
changeset 15597 bc0778f5619a
parent 15595 a585d78e7b2f
child 15598 a77ce45584ef
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.
mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Wed Nov 30 22:43:24 2011 -0600
+++ b/mercurial/bundlerepo.py	Thu Dec 01 14:17:17 2011 +0100
@@ -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'))