[Request] [+ ] D10423: perf-discovery: use `get_unique_pull_path`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Wed Apr 14 23:41:03 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This performance command now use the new API, unless the benchmarked Mercurial
is older.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10423
AFFECTED FILES
contrib/perf.py
CHANGE DETAILS
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -915,7 +915,14 @@
"""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:
+ raise
+ path = ui.expandpath(path)
def s():
repos[1] = hg.peer(ui, opts, path)
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210414/2c6748ef/attachment-0001.html>
More information about the Mercurial-patches
mailing list