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

mail settings
Submitter Pierre-Yves David
Date Jan. 7, 2013, 6:30 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/493/
State Accepted
Commit a6483f827512b022ebf02d5516c3558ab0f0f038
Headers show


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

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


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -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 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):
     Search commit message, user name, and names of changed files for
     string. The match is case-insensitive.