Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.py @ 46733:66fb04552122
ui: pass a `ui` object to `paths.getpath`
I want to introduce more path's suboption and make it possible to use default
value for them. Processing theses sub-options might result in warnings. We
need a `ui` object to issue such warnings.
To make things simpler, we add an helper method on the `ui` object.
Differential Revision: https://phab.mercurial-scm.org/D10162
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 11 Mar 2021 17:26:49 +0100 |
parents | d8ad391e10f5 |
children | 6266d19556ad |
line wrap: on
line diff
--- a/contrib/perf.py Mon Mar 15 10:57:02 2021 +0100 +++ b/contrib/perf.py Thu Mar 11 17:26:49 2021 +0100 @@ -1407,7 +1407,7 @@ opts = _byteskwargs(opts) timer, fm = gettimer(ui, opts) - path = ui.paths.getpath(dest, default=(b'default-push', b'default')) + path = ui.getpath(dest, default=(b'default-push', b'default')) if not path: raise error.Abort( b'default repository not configured!',