Mercurial > public > mercurial-scm > hg-stable
diff mercurial/scmutil.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 | d29f6fbd1181 |
children | 0194dac77c93 |
line wrap: on
line diff
--- a/mercurial/scmutil.py Tue Apr 03 12:16:19 2018 +0530 +++ b/mercurial/scmutil.py Sat Mar 31 23:49:58 2018 +0530 @@ -736,14 +736,12 @@ if tostrip: repair.delayedstrip(repo.ui, repo, tostrip, operation) -def addremove(repo, matcher, prefix, opts=None, dry_run=None, similarity=None): +def addremove(repo, matcher, prefix, opts=None): if opts is None: opts = {} m = matcher - if dry_run is None: - dry_run = opts.get('dry_run') - if similarity is None: - similarity = float(opts.get('similarity') or 0) + dry_run = opts.get('dry_run') + similarity = float(opts.get('similarity') or 0) ret = 0 join = lambda f: os.path.join(prefix, f) @@ -754,7 +752,7 @@ if opts.get('subrepos') or m.exact(subpath) or any(submatch.files()): sub = wctx.sub(subpath) try: - if sub.addremove(submatch, prefix, opts, dry_run, similarity): + if sub.addremove(submatch, prefix, opts): ret = 1 except error.LookupError: repo.ui.status(_("skipping missing subrepository: %s\n")