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

login
register
mail settings
Submitter phabricator
Date April 19, 2019, 9 p.m.
Message ID <differential-rev-PHID-DREV-mabbj2udmjycken7lopf-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39771/
State Superseded
Headers show

Comments

phabricator - April 19, 2019, 9 p.m.
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




To: pulkit, #hg-reviewers
Cc: mercurial-devel
Yuya Nishihara - April 21, 2019, 9:41 a.m.
>   However before this patch, writing the branchmap was validating all the nodes
>   whereas it should not. This patch fixes that.

Queued for stable as it smells like a regression, thanks.
phabricator - April 21, 2019, 9:47 a.m.
yuja added a comment.


  >   However before this patch, writing the branchmap was validating all the nodes
  >   whereas it should not. This patch fixes that.
  
  Queued for stable as it smells like a regression, thanks.

REPOSITORY
  rHG Mercurial

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

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

Patch

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