Patchwork D1140: localrepo: add a pinnedrevs attribute

login
register
mail settings
Submitter phabricator
Date Oct. 18, 2017, 4:22 p.m.
Message ID <cffea7c1d5c3200a8d88d0a80e0d9d3d@localhost.localdomain>
Download mbox | patch
Permalink /patch/25201/
State Not Applicable
Headers show

Comments

phabricator - Oct. 18, 2017, 4:22 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc6552325b1ea: localrepo: add a pinnedrevs attribute (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1140?vs=2902&id=2990

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

AFFECTED FILES
  mercurial/localrepo.py
  mercurial/repoview.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -33,7 +33,7 @@ 
     """
 
     cl = repo.changelog
-    pinned = set()
+    pinned = repo.pinnedrevs
     pinned.update([par.rev() for par in repo[None].parents()])
     pinned.update([cl.rev(bm) for bm in repo._bookmarks.values()])
 
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -505,6 +505,9 @@ 
         # generic mapping between names and nodes
         self.names = namespaces.namespaces()
 
+        # a set of hidden revisions which should not be filtered
+        self.pinnedrevs = set()
+
         # Key to signature value.
         self._sparsesignaturecache = {}
         # Signature to cached matcher instance.