revset: allow bypassing alias expansion
For internal usage of revset queries, we don't want aliases breaking things.
--- a/mercurial/revset.py Tue Jul 19 17:51:45 2011 -0500
+++ b/mercurial/revset.py Thu Jul 21 14:04:57 2011 -0500
@@ -1019,7 +1019,8 @@
tree, pos = parse(spec)
if (pos != len(spec)):
raise error.ParseError(_("invalid token"), pos)
- tree = findaliases(ui, tree)
+ if ui:
+ tree = findaliases(ui, tree)
weight, tree = optimize(tree, True)
def mfunc(repo, subset):
return getset(repo, subset, tree)