diff -r 08630dd719f9 -r 607e9322fc89 mercurial/hg.py --- a/mercurial/hg.py Fri Oct 15 02:36:54 2021 +0200 +++ b/mercurial/hg.py Fri Oct 15 02:44:14 2021 +0200 @@ -1261,13 +1261,14 @@ (remoterepo, incomingchangesetlist, displayer) parameters, and is supposed to contain only code that can't be unified. """ - srcs = urlutil.get_pull_paths(repo, ui, [source], opts.get(b'branch')) + srcs = urlutil.get_pull_paths(repo, ui, [source]) srcs = list(srcs) if len(srcs) != 1: msg = _(b'for now, incoming supports only a single source, %d provided') msg %= len(srcs) raise error.Abort(msg) - source, branches = srcs[0] + path = srcs[0] + source, branches = urlutil.parseurl(path.rawloc, opts.get(b'branch')) if subpath is not None: subpath = urlutil.url(subpath) if subpath.isabs():