Patchwork D6156: branchcache: add attributes to track which nodes are verified

login
register
mail settings
Submitter phabricator
Date March 23, 2019, 3:42 p.m.
Message ID <3b1a31e8360cc4931d1a922249c78f31@localhost.localdomain>
Download mbox | patch
Permalink /patch/39372/
State Not Applicable
Headers show

Comments

phabricator - March 23, 2019, 3:42 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG111de135fc76: branchcache: add attributes to track which nodes are verified (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6156?vs=14560&id=14588

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

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
@@ -162,6 +162,10 @@ 
         else:
             self._closednodes = closednodes
         self._entries = dict(entries)
+        # whether closed nodes are verified or not
+        self._closedverified = False
+        # branches for which nodes are verified
+        self._verifiedbranches = set()
 
     def __iter__(self):
         return iter(self._entries)
@@ -231,8 +235,10 @@ 
                 raise ValueError(
                     r'node %s does not exist' % pycompat.sysstr(hex(node)))
             self._entries.setdefault(label, []).append(node)
+            self._verifiedbranches.add(label)
             if state == 'c':
                 self._closednodes.add(node)
+        self._closedverified = True
 
     @staticmethod
     def _filename(repo):