comparison mercurial/commands.py @ 49709:459e311f5581

path: pass `path` to `peer` in `hg outgoing` 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:09:43 +0100
parents 0df2cff04291
children 30ac702a7488
comparison
equal deleted inserted replaced
49708:0df2cff04291 49709:459e311f5581
5036 Returns 0 if there are outgoing changes, 1 otherwise. 5036 Returns 0 if there are outgoing changes, 1 otherwise.
5037 """ 5037 """
5038 opts = pycompat.byteskwargs(opts) 5038 opts = pycompat.byteskwargs(opts)
5039 if opts.get(b'bookmarks'): 5039 if opts.get(b'bookmarks'):
5040 for path in urlutil.get_push_paths(repo, ui, dests): 5040 for path in urlutil.get_push_paths(repo, ui, dests):
5041 dest = path.loc 5041 other = hg.peer(repo, opts, path)
5042 other = hg.peer(repo, opts, dest)
5043 try: 5042 try:
5044 if b'bookmarks' not in other.listkeys(b'namespaces'): 5043 if b'bookmarks' not in other.listkeys(b'namespaces'):
5045 ui.warn(_(b"remote doesn't support bookmarks\n")) 5044 ui.warn(_(b"remote doesn't support bookmarks\n"))
5046 return 0 5045 return 0
5047 ui.status( 5046 ui.status(
5048 _(b'comparing with %s\n') % urlutil.hidepassword(dest) 5047 _(b'comparing with %s\n') % urlutil.hidepassword(path.loc)
5049 ) 5048 )
5050 ui.pager(b'outgoing') 5049 ui.pager(b'outgoing')
5051 return bookmarks.outgoing(ui, repo, other) 5050 return bookmarks.outgoing(ui, repo, other)
5052 finally: 5051 finally:
5053 other.close() 5052 other.close()