changeset 49705:ec8140c44b14

path: update logic in `perf` to use the push variant when available The command seems currently broken, but at least it won't be broken by us !
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Dec 2022 01:41:34 +0100
parents a7985c822c09
children f27fbb908b10
files contrib/perf.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Thu Dec 01 01:38:33 2022 +0100
+++ b/contrib/perf.py	Thu Dec 01 01:41:34 2022 +0100
@@ -1613,7 +1613,11 @@
             b'default repository not configured!',
             hint=b"see 'hg help config.paths'",
         )
-    dest = path.pushloc or path.loc
+    if util.safehasattr(path, 'main_path'):
+        path = path.get_push_variant()
+        dest = path.loc
+    else:
+        dest = path.pushloc or path.loc
     ui.statusnoi18n(b'analysing phase of %s\n' % util.hidepassword(dest))
     other = hg.peer(repo, opts, dest)