# HG changeset patch # User Pierre-Yves David # Date 1340793010 -7200 # Node ID 41ba89f0caa5861b64bb17712f75e8b7f3016200 # Parent 63f267bd217626cc92428ab08d1742fd55ab8860 obsolete: add an hidden revset diff -r 63f267bd2176 -r 41ba89f0caa5 hgext/obsolete.py --- 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