revset: allow bypassing alias expansion
authorMatt Mackall <mpm@selenic.com>
Thu, 21 Jul 2011 14:04:57 -0500
changeset 14900 fc3d6f300d7d
parent 14899 6d1d0b9c4ecc
child 14901 a773119f30ba
revset: allow bypassing alias expansion For internal usage of revset queries, we don't want aliases breaking things.
mercurial/revset.py
--- 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)