Patchwork [5,of,7,Series-A] revset: retrieve hidden from filteredrevs

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 7, 2013, 6:30 p.m.
Message ID <51bdd7bbd106d8a30aca.1357583437@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/493/
State Accepted
Commit a6483f827512b022ebf02d5516c3558ab0f0f038
Headers show

Comments

Pierre-Yves David - Jan. 7, 2013, 6:30 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1357235294 -3600
# Node ID 51bdd7bbd106d8a30acac288cdb9e75e531c9b25
# Parent  dc09a6fbb82e5688b45048eea91c28e91771f5be
revset: retrieve hidden from filteredrevs

This prepare the dropping of the `repo.hiddenrevs` property

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -11,10 +11,11 @@  import node
 import bookmarks as bookmarksmod
 import match as matchmod
 from i18n import _
 import encoding
 import obsolete as obsmod
+import repoview
 
 def _revancestors(repo, revs, followfirst):
     """Like revlog.ancestors(), but supports followfirst."""
     cut = followfirst and 1 or None
     cl = repo.changelog
@@ -890,11 +891,12 @@  def hidden(repo, subset, x):
     """``hidden()``
     Hidden changesets.
     """
     # i18n: "hidden" is a keyword
     getargs(x, 0, 0, _("hidden takes no arguments"))
-    return [r for r in subset if r in repo.hiddenrevs]
+    hiddenrevs = repoview.filteredrevs(repo, 'hidden')
+    return [r for r in subset if r in hiddenrevs]
 
 def keyword(repo, subset, x):
     """``keyword(string)``
     Search commit message, user name, and names of changed files for
     string. The match is case-insensitive.