comparison mercurial/commands.py @ 25255:ad1d2c952889

fileset: pretty print syntax tree in debug output
author Yuya Nishihara <yuya@tcha.org>
date Sun, 26 Apr 2015 22:26:44 +0900
parents ac381dd7a21f
children 701df761aa94
comparison
equal deleted inserted replaced
25254:060bdfef2517 25255:ad1d2c952889
2163 def debugfileset(ui, repo, expr, **opts): 2163 def debugfileset(ui, repo, expr, **opts):
2164 '''parse and apply a fileset specification''' 2164 '''parse and apply a fileset specification'''
2165 ctx = scmutil.revsingle(repo, opts.get('rev'), None) 2165 ctx = scmutil.revsingle(repo, opts.get('rev'), None)
2166 if ui.verbose: 2166 if ui.verbose:
2167 tree = fileset.parse(expr) 2167 tree = fileset.parse(expr)
2168 ui.note(tree, "\n") 2168 ui.note(fileset.prettyformat(tree), "\n")
2169 2169
2170 for f in ctx.getfileset(expr): 2170 for f in ctx.getfileset(expr):
2171 ui.write("%s\n" % f) 2171 ui.write("%s\n" % f)
2172 2172
2173 @command('debugfsinfo', [], _('[PATH]'), norepo=True) 2173 @command('debugfsinfo', [], _('[PATH]'), norepo=True)