Conditionnaly add the `hidden` revset symbol
Mercurial Core#default now have it (but 2.3 don't)
--- a/hgext/evolve.py Sat Aug 25 14:43:34 2012 +0200
+++ b/hgext/evolve.py Sun Aug 26 12:04:16 2012 +0200
@@ -787,15 +787,16 @@
# this section add several useful revset symbol not yet in core.
# they are subject to changes
-### hidden revset is not in core yet
-@eh.revset('hidden')
-def revsethidden(repo, subset, x):
- """``hidden()``
- Changeset is hidden.
- """
- args = revset.getargs(x, 0, 0, 'hidden takes no argument')
- return [r for r in subset if r in repo.hiddenrevs]
+if 'hidden' not in revset.symbols:
+ # in 2.3+
+ @eh.revset('hidden')
+ def revsethidden(repo, subset, x):
+ """``hidden()``
+ Changeset is hidden.
+ """
+ args = revset.getargs(x, 0, 0, 'hidden takes no argument')
+ return [r for r in subset if r in repo.hiddenrevs]
### XXX I'm not sure this revset is useful
@eh.revset('suspended')