path: pass `path` to `peer` in `hg outgoing`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Dec 2022 02:09:43 +0100
changeset 49709 459e311f5581
parent 49708 0df2cff04291
child 49710 30ac702a7488
path: pass `path` to `peer` in `hg outgoing` We directly use the `path` object to build the `peer` object.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Dec 01 01:57:14 2022 +0100
+++ b/mercurial/commands.py	Thu Dec 01 02:09:43 2022 +0100
@@ -5038,14 +5038,13 @@
     opts = pycompat.byteskwargs(opts)
     if opts.get(b'bookmarks'):
         for path in urlutil.get_push_paths(repo, ui, dests):
-            dest = path.loc
-            other = hg.peer(repo, opts, dest)
+            other = hg.peer(repo, opts, path)
             try:
                 if b'bookmarks' not in other.listkeys(b'namespaces'):
                     ui.warn(_(b"remote doesn't support bookmarks\n"))
                     return 0
                 ui.status(
-                    _(b'comparing with %s\n') % urlutil.hidepassword(dest)
+                    _(b'comparing with %s\n') % urlutil.hidepassword(path.loc)
                 )
                 ui.pager(b'outgoing')
                 return bookmarks.outgoing(ui, repo, other)