comparison mercurial/commands.py @ 37141:eb4a23382e18

locate: avoid using "rev" variable name for nodeid Also, drop silly "ctx = repo[ctx.node()]". Differential Revision: https://phab.mercurial-scm.org/D2961
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 28 Mar 2018 15:30:09 -0700
parents a2a6755a3def
children bb141aa54728
comparison
equal deleted inserted replaced
37140:1d56c539794e 37141:eb4a23382e18
3256 opts = pycompat.byteskwargs(opts) 3256 opts = pycompat.byteskwargs(opts)
3257 if opts.get('print0'): 3257 if opts.get('print0'):
3258 end = '\0' 3258 end = '\0'
3259 else: 3259 else:
3260 end = '\n' 3260 end = '\n'
3261 rev = scmutil.revsingle(repo, opts.get('rev'), None).node() 3261 ctx = scmutil.revsingle(repo, opts.get('rev'), None)
3262 3262
3263 ret = 1 3263 ret = 1
3264 ctx = repo[rev]
3265 m = scmutil.match(ctx, pats, opts, default='relglob', 3264 m = scmutil.match(ctx, pats, opts, default='relglob',
3266 badfn=lambda x, y: False) 3265 badfn=lambda x, y: False)
3267 3266
3268 ui.pager('locate') 3267 ui.pager('locate')
3269 for abs in ctx.matches(m): 3268 for abs in ctx.matches(m):