changeset 29921:a82e138d5249

debugrevspec: evaluate tree built by itself Prepares for new option to evaluate an unoptimized tree. Since a revset expression is no longer parsed twice, alias warnings should be displayed at the first parsing stages. That's why showwarning=ui.warn is added.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 21 Aug 2016 12:45:43 +0900
parents e35a83cedde1
children ae933e3e2226
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Sep 12 03:06:29 2016 +0900
+++ b/mercurial/commands.py	Sun Aug 21 12:45:43 2016 +0900
@@ -3525,7 +3525,8 @@
     """
     stages = [
         ('parsed', lambda tree: tree),
-        ('expanded', lambda tree: revset.expandaliases(ui, tree)),
+        ('expanded',
+         lambda tree: revset.expandaliases(ui, tree, showwarning=ui.warn)),
         ('concatenated', revset.foldconcat),
         ('analyzed', revset.analyze),
         ('optimized', revset.optimize),
@@ -3560,7 +3561,7 @@
             ui.write(revset.prettyformat(tree), "\n")
             printedtree = tree
 
-    func = revset.match(ui, expr, repo)
+    func = revset.makematcher(tree)
     revs = func(repo)
     if ui.verbose:
         ui.note(("* set:\n"), revset.prettyformatset(revs), "\n")