Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 46932:dec31caf5fd6
incoming: use `urlutil.get_pull_paths`
Lets use the new method to increase code reuse. However I did not implement
support for multiple source yet. It would be possible create multiple temporary
bundle, but that is a bit too much work outside of my current route to make the
detour.
Differential Revision: https://phab.mercurial-scm.org/D10392
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 02:14:15 +0200 |
parents | d4e4ccb75f99 |
children | 946db89607c8 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Apr 14 01:26:44 2021 +0200 +++ b/mercurial/commands.py Wed Apr 14 02:14:15 2021 +0200 @@ -4311,19 +4311,20 @@ cmdutil.check_incompatible_arguments(opts, b'subrepos', [b'bundle']) if opts.get(b'bookmarks'): - source, branches = urlutil.parseurl( - ui.expandpath(source), opts.get(b'branch') - ) - other = hg.peer(repo, opts, source) - try: - if b'bookmarks' not in other.listkeys(b'namespaces'): - ui.warn(_(b"remote doesn't support bookmarks\n")) - return 0 - ui.pager(b'incoming') - ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(source)) - return bookmarks.incoming(ui, repo, other) - finally: - other.close() + srcs = urlutil.get_pull_paths(repo, ui, [source], opts.get(b'branch')) + for source, branches in srcs: + other = hg.peer(repo, opts, source) + try: + if b'bookmarks' not in other.listkeys(b'namespaces'): + ui.warn(_(b"remote doesn't support bookmarks\n")) + return 0 + ui.pager(b'incoming') + ui.status( + _(b'comparing with %s\n') % urlutil.hidepassword(source) + ) + return bookmarks.incoming(ui, repo, other) + finally: + other.close() repo._subtoppath = ui.expandpath(source) try: