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

login
register
mail settings
Submitter phabricator
Date April 16, 2019, 12:28 p.m.
Message ID <71d306d54da5a931cac5a9467583ec15@localhost.localdomain>
Download mbox | patch
Permalink /patch/39629/
State Not Applicable
Headers show

Comments

phabricator - April 16, 2019, 12:28 p.m.
pulkit updated this revision to Diff 14759.

REPOSITORY
  rHG Mercurial

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

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 """