comparison mercurial/commands.py @ 41652:6a447a3d1bd0

addremove: pass around uipathfn and use instead of m.uipath() (API) Differential Revision: https://phab.mercurial-scm.org/D5903
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 07 Feb 2019 23:25:39 -0800
parents b2df5dc3ebfb
children 16a49c778bde
comparison
equal deleted inserted replaced
41651:b2df5dc3ebfb 41652:6a447a3d1bd0
253 """ 253 """
254 opts = pycompat.byteskwargs(opts) 254 opts = pycompat.byteskwargs(opts)
255 if not opts.get('similarity'): 255 if not opts.get('similarity'):
256 opts['similarity'] = '100' 256 opts['similarity'] = '100'
257 matcher = scmutil.match(repo[None], pats, opts) 257 matcher = scmutil.match(repo[None], pats, opts)
258 return scmutil.addremove(repo, matcher, "", opts) 258 relative = scmutil.anypats(pats, opts)
259 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
260 return scmutil.addremove(repo, matcher, "", uipathfn, opts)
259 261
260 @command('annotate|blame', 262 @command('annotate|blame',
261 [('r', 'rev', '', _('annotate the specified revision'), _('REV')), 263 [('r', 'rev', '', _('annotate the specified revision'), _('REV')),
262 ('', 'follow', None, 264 ('', 'follow', None,
263 _('follow copies/renames and list the filename (DEPRECATED)')), 265 _('follow copies/renames and list the filename (DEPRECATED)')),