D6290: branchcache: don't verify all nodes while writing

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Apr 19 21:00:15 UTC 2019


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  nodes are verified either when they are added or used. In case of commits. we
  will load the whole branchmap, only verify nodes for the branch on which we are
  committing and then we write.
  
  However before this patch, writing the branchmap was validating all the nodes
  whereas it should not. This patch fixes that.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6290

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -341,7 +341,7 @@
                 cachekey.append(hex(self.filteredhash))
             f.write(" ".join(cachekey) + '\n')
             nodecount = 0
-            for label, nodes in sorted(self.iteritems()):
+            for label, nodes in sorted(self._entries.iteritems()):
                 label = encoding.fromlocal(label)
                 for node in nodes:
                     nodecount += 1



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list