diff mercurial/commands.py @ 24458:7d87f672d069

debugrevspec: show nesting structure of smartsets if verbose This shows how smartsets are constructed from the query. It will be somewhat useful to track problems such as stack overflow.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 16 Mar 2015 18:36:53 +0900
parents a05c6b400616
children 0142b59f5743
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Mar 16 18:15:06 2015 +0900
+++ b/mercurial/commands.py	Mon Mar 16 18:36:53 2015 +0900
@@ -2929,7 +2929,10 @@
             weight, optimizedtree = revset.optimize(newtree, True)
             ui.note("* optimized:\n", revset.prettyformat(optimizedtree), "\n")
     func = revset.match(ui, expr)
-    for c in func(repo):
+    revs = func(repo)
+    if ui.verbose:
+        ui.note("* set:\n", revset.prettyformatset(revs), "\n")
+    for c in revs:
         ui.write("%s\n" % c)
 
 @command('debugsetparents', [], _('REV1 [REV2]'))