path: pass `path` to `peer` in `hg summary`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Dec 2022 02:11:21 +0100
changeset 49710 30ac702a7488
parent 49709 459e311f5581
child 49711 e2a31b0bc5d0
path: pass `path` to `peer` in `hg summary` We directly use the `path` object to build the `peer` object.
mercurial/commands.py
--- 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