Mercurial > hg
changeset 49737:4cedae992ed1
path: pass `path` to `peer` in `hg perf::discovery`
We directly use the `path` object to build the `peer` object.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 02 Dec 2022 06:52:27 +0100 |
parents | a804242050c4 |
children | afcf59039b5d |
files | contrib/perf.py |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Fri Dec 02 06:49:39 2022 +0100 +++ b/contrib/perf.py Fri Dec 02 06:52:27 2022 +0100 @@ -997,11 +997,16 @@ timer, fm = gettimer(ui, opts) try: - from mercurial.utils.urlutil import get_unique_pull_path - - path = get_unique_pull_path(b'perfdiscovery', repo, ui, path)[0] + from mercurial.utils.urlutil import get_unique_pull_path_obj + + path = get_unique_pull_path_obj(b'perfdiscovery', ui, path) except ImportError: - path = ui.expandpath(path) + try: + from mercurial.utils.urlutil import get_unique_pull_path + + path = get_unique_pull_path(b'perfdiscovery', repo, ui, path)[0] + except ImportError: + path = ui.expandpath(path) def s(): repos[1] = hg.peer(ui, opts, path)