Mercurial > hg
changeset 46973:92029a43debb
perf-discovery: use `get_unique_pull_path`
This performance command now use the new API, unless the benchmarked Mercurial
is older.
Differential Revision: https://phab.mercurial-scm.org/D10423
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 20:32:53 +0200 |
parents | 6904a9f33b30 |
children | 3c9208702db3 |
files | contrib/perf.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Wed Apr 14 00:38:25 2021 +0800 +++ b/contrib/perf.py Wed Apr 14 20:32:53 2021 +0200 @@ -915,7 +915,13 @@ """benchmark discovery between local repo and the peer at given path""" repos = [repo, None] timer, fm = gettimer(ui, opts) - 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)