changeset 49822:30ac702a7488

path: pass `path` to `peer` in `hg summary` We directly use the `path` object to build the `peer` object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Dec 2022 02:11:21 +0100
parents 459e311f5581
children e2a31b0bc5d0
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Dec 01 02:09:43 2022 +0100
+++ b/mercurial/commands.py	Thu Dec 01 02:11:21 2022 +0100
@@ -7283,6 +7283,7 @@
             d = b'default-push'
         elif b'default' in ui.paths:
             d = b'default'
+        path = None
         if d is not None:
             path = urlutil.get_unique_push_path(b'summary', repo, ui, d)
             dest = path.loc
@@ -7293,7 +7294,7 @@
         revs, checkout = hg.addbranchrevs(repo, repo, (dbranch, []), None)
         if source != dest:
             try:
-                dother = hg.peer(repo, {}, dest)
+                dother = hg.peer(repo, {}, path if path is not None else dest)
             except error.RepoError:
                 if opts.get(b'remote'):
                     raise