diff mercurial/debugcommands.py @ 38263:dbf31732ef64

debugwalk: pretty-print nested matcher While porting filesets to composition of matchers, I found the original one-liner was hard to read.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Jun 2018 11:55:52 +0900
parents 7c3a59e2971b
children 275cc461b854
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Sun Jun 10 11:53:56 2018 +0900
+++ b/mercurial/debugcommands.py	Sun Jun 10 11:55:52 2018 +0900
@@ -2543,7 +2543,7 @@
     opts = pycompat.byteskwargs(opts)
     m = scmutil.match(repo[None], pats, opts)
     if ui.verbose:
-        ui.write(('matcher: %r\n' % m))
+        ui.write(('* matcher:\n'), stringutil.prettyrepr(m), '\n')
     items = list(repo[None].walk(m))
     if not items:
         return