Patchwork D6236: branchcache: lazily validate nodes in iteritems()

login
register
mail settings
Submitter phabricator
Date April 16, 2019, 2:54 p.m.
Message ID <6044f2490cded3df8597c702d73d54c9@localhost.localdomain>
Download mbox | patch
Permalink /patch/39636/
State Not Applicable
Headers show

Comments

phabricator - April 16, 2019, 2:54 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf0203c3406e7: branchcache: lazily validate nodes in iteritems() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6236?vs=14759&id=14763

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

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -219,8 +219,9 @@ 
         return key in self._entries
 
     def iteritems(self):
-        self._verifyall()
-        return self._entries.iteritems()
+        for k, v in self._entries.iteritems():
+            self._verifybranch(k)
+            yield k, v
 
     def hasbranch(self, label):
         """ checks whether a branch of this name exists or not """