# HG changeset patch # User Pierre-Yves David # Date 1669960347 -3600 # Node ID 4cedae992ed10d764e83a4a54721433c5c51d0f9 # Parent a804242050c488278d93663c3f654f5a7b3cb8ae path: pass `path` to `peer` in `hg perf::discovery` We directly use the `path` object to build the `peer` object. diff -r a804242050c4 -r 4cedae992ed1 contrib/perf.py --- 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)