comparison mercurial/commands.py @ 37271:14cd5290c4e6

addremove: remove dry_run, similarity from scmutil.addremove (API) Differential Revision: https://phab.mercurial-scm.org/D3000
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sat, 31 Mar 2018 23:49:58 +0530
parents 54435fd09f1d
children 6942c73f0733
comparison
equal deleted inserted replaced
37270:a53b87e20132 37271:14cd5290c4e6
251 sim = float(opts.get('similarity') or 100) 251 sim = float(opts.get('similarity') or 100)
252 except ValueError: 252 except ValueError:
253 raise error.Abort(_('similarity must be a number')) 253 raise error.Abort(_('similarity must be a number'))
254 if sim < 0 or sim > 100: 254 if sim < 0 or sim > 100:
255 raise error.Abort(_('similarity must be between 0 and 100')) 255 raise error.Abort(_('similarity must be between 0 and 100'))
256 opts['similarity'] = sim / 100.0
256 matcher = scmutil.match(repo[None], pats, opts) 257 matcher = scmutil.match(repo[None], pats, opts)
257 return scmutil.addremove(repo, matcher, "", opts, similarity=sim / 100.0) 258 return scmutil.addremove(repo, matcher, "", opts)
258 259
259 @command('^annotate|blame', 260 @command('^annotate|blame',
260 [('r', 'rev', '', _('annotate the specified revision'), _('REV')), 261 [('r', 'rev', '', _('annotate the specified revision'), _('REV')),
261 ('', 'follow', None, 262 ('', 'follow', None,
262 _('follow copies/renames and list the filename (DEPRECATED)')), 263 _('follow copies/renames and list the filename (DEPRECATED)')),