comparison mercurial/debugcommands.py @ 32457:2def402bd16d

debugwalk: also print matcher representation This will make the effect of coming patches clearer.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 22 May 2017 11:08:52 -0700
parents 08d02c1d7e67
children b62b2b373bce
comparison
equal deleted inserted replaced
32452:b647b923486f 32457:2def402bd16d
2123 @command('debugwalk', cmdutil.walkopts, _('[OPTION]... [FILE]...'), 2123 @command('debugwalk', cmdutil.walkopts, _('[OPTION]... [FILE]...'),
2124 inferrepo=True) 2124 inferrepo=True)
2125 def debugwalk(ui, repo, *pats, **opts): 2125 def debugwalk(ui, repo, *pats, **opts):
2126 """show how files match on given patterns""" 2126 """show how files match on given patterns"""
2127 m = scmutil.match(repo[None], pats, opts) 2127 m = scmutil.match(repo[None], pats, opts)
2128 ui.write(('matcher: %r\n' % m))
2128 items = list(repo[None].walk(m)) 2129 items = list(repo[None].walk(m))
2129 if not items: 2130 if not items:
2130 return 2131 return
2131 f = lambda fn: fn 2132 f = lambda fn: fn
2132 if ui.configbool('ui', 'slash') and pycompat.ossep != '/': 2133 if ui.configbool('ui', 'slash') and pycompat.ossep != '/':