changeset 28629:d6f8a1535224

debugrevspec: show expanded/concatenated states before printing trees The debugrevspec command prints at most 4 parsed trees. It wasn't easy to tell which tree belongs to which state.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 26 Mar 2016 19:01:12 +0900
parents ed1d90f6e921
children bf35644b9f3a
files mercurial/commands.py tests/test-revset.t
diffstat 2 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Mar 26 18:01:04 2016 +0900
+++ b/mercurial/commands.py	Sat Mar 26 19:01:12 2016 +0900
@@ -3463,11 +3463,11 @@
         ui.note(revset.prettyformat(tree), "\n")
         newtree = revset.findaliases(ui, tree)
         if newtree != tree:
-            ui.note(revset.prettyformat(newtree), "\n")
+            ui.note("* expanded:\n", revset.prettyformat(newtree), "\n")
         tree = newtree
         newtree = revset.foldconcat(tree)
         if newtree != tree:
-            ui.note(revset.prettyformat(newtree), "\n")
+            ui.note("* concatenated:\n", revset.prettyformat(newtree), "\n")
         if opts["optimize"]:
             weight, optimizedtree = revset.optimize(newtree, True)
             ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n")
--- a/tests/test-revset.t	Sat Mar 26 18:01:04 2016 +0900
+++ b/tests/test-revset.t	Sat Mar 26 19:01:12 2016 +0900
@@ -1590,6 +1590,7 @@
 
   $ try m
   ('symbol', 'm')
+  * expanded:
   (func
     ('symbol', 'merge')
     None)
@@ -1610,6 +1611,7 @@
   $ export HGPLAINEXCEPT
   $ try m
   ('symbol', 'm')
+  * expanded:
   (func
     ('symbol', 'merge')
     None)
@@ -1626,6 +1628,7 @@
   (func
     ('symbol', 'p2')
     ('symbol', '.'))
+  * expanded:
   (func
     ('symbol', 'p1')
     ('symbol', '.'))
@@ -1648,6 +1651,7 @@
   (func
     ('symbol', 'p2')
     ('symbol', '.'))
+  * expanded:
   (func
     ('symbol', 'p1')
     ('symbol', '.'))
@@ -1662,6 +1666,7 @@
 
   $ try sincem
   ('symbol', 'sincem')
+  * expanded:
   (func
     ('symbol', 'descendants')
     (func
@@ -1697,6 +1702,7 @@
           ('symbol', '1')
           ('symbol', '2')))
       ('symbol', '3')))
+  * expanded:
   (or
     ('symbol', '3')
     (or
@@ -1721,6 +1727,7 @@
     (range
       ('symbol', '2')
       ('symbol', '5')))
+  * expanded:
   (func
     ('symbol', 'max')
     (range
@@ -1749,6 +1756,7 @@
       (range
         ('symbol', '2')
         ('symbol', '3'))))
+  * expanded:
   (or
     (range
       ('symbol', '0')
@@ -1782,6 +1790,7 @@
     (range
       ('symbol', '2')
       ('symbol', '5')))
+  * expanded:
   (func
     ('symbol', 'descendants')
     (func
@@ -1829,6 +1838,7 @@
     (list
       ('string', 'foo')
       ('symbol', 'tip')))
+  * expanded:
   (or
     ('symbol', 'tip')
     (func
@@ -1848,6 +1858,7 @@
     (range
       ('symbol', '2')
       ('symbol', '5')))
+  * expanded:
   (func
     ('symbol', 'reverse')
     (func
@@ -1871,6 +1882,7 @@
         ('symbol', '2')
         ('symbol', '3'))
       ('symbol', 'date')))
+  * expanded:
   (func
     ('symbol', 'reverse')
     (func
@@ -1915,6 +1927,7 @@
       ('symbol', 'x')
       ('symbol', 'x')
       ('symbol', 'date')))
+  * expanded:
   (func
     ('symbol', 'reverse')
     (func
@@ -2134,6 +2147,7 @@
         ('string', '5f5'))
       ('symbol', '1ee'))
     ('string', 'ce5'))
+  * concatenated:
   ('string', '2785f51eece5')
   * set:
   <baseset [0]>
@@ -2148,6 +2162,7 @@
       ('string', '5f5')
       ('symbol', '1ee')
       ('string', 'ce5')))
+  * expanded:
   (_concat
     (_concat
       (_concat
@@ -2155,6 +2170,7 @@
         ('string', '5f5'))
       ('symbol', '1ee'))
     ('string', 'ce5'))
+  * concatenated:
   ('string', '2785f51eece5')
   * set:
   <baseset [0]>