Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.py @ 41663: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 | 328ca3b9e545 |
children | dbca2e5563c3 |
line wrap: on
line diff
--- a/contrib/perf.py Thu Feb 07 23:19:33 2019 -0800 +++ b/contrib/perf.py Thu Feb 07 23:25:39 2019 -0800 @@ -519,7 +519,11 @@ repo.ui.quiet = True matcher = scmutil.match(repo[None]) opts[b'dry_run'] = True - timer(lambda: scmutil.addremove(repo, matcher, b"", opts)) + if b'uipathfn' in getargspec(scmutil.addremove).args: + uipathfn = scmutil.getuipathfn(repo) + timer(lambda: scmutil.addremove(repo, matcher, b"", uipathfn, opts)) + else: + timer(lambda: scmutil.addremove(repo, matcher, b"", opts)) finally: repo.ui.quiet = oldquiet fm.end()