changeset 321:41ba89f0caa5

obsolete: add an hidden revset
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 27 Jun 2012 12:30:10 +0200
parents 63f267bd2176
children f4a00b2d8bfb
files hgext/obsolete.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/obsolete.py	Wed Jun 27 12:30:16 2012 +0200
+++ b/hgext/obsolete.py	Wed Jun 27 12:30:10 2012 +0200
@@ -150,6 +150,10 @@
 ### revset
 #############################
 
+def revsethidden(repo, subset, x):
+    """hidden changesets"""
+    args = revset.getargs(x, 0, 0, 'hidden takes no argument')
+    return [r for r in subset if r in repo.changelog.hiddenrevs]
 
 def revsetobsolete(repo, subset, x):
     """obsolete changesets"""
@@ -375,6 +379,7 @@
 
 def extsetup(ui):
 
+    revset.symbols["hidden"] = revsethidden
     revset.symbols["obsolete"] = revsetobsolete
     revset.symbols["unstable"] = revsetunstable
     revset.symbols["suspended"] = revsetsuspended