mercurial/hg.py
changeset 46932 dec31caf5fd6
parent 46931 d4e4ccb75f99
child 46934 ebb13f9a9ba8
--- a/mercurial/hg.py	Wed Apr 14 01:26:44 2021 +0200
+++ b/mercurial/hg.py	Wed Apr 14 02:14:15 2021 +0200
@@ -1263,9 +1263,13 @@
         (remoterepo, incomingchangesetlist, displayer) parameters,
     and is supposed to contain only code that can't be unified.
     """
-    source, branches = urlutil.parseurl(
-        ui.expandpath(source), opts.get(b'branch')
-    )
+    srcs = urlutil.get_pull_paths(repo, ui, [source], opts.get(b'branch'))
+    srcs = list(srcs)
+    if len(srcs) != 1:
+        msg = _('for now, incoming supports only a single source, %d provided')
+        msg %= len(srcs)
+        raise error.Abort(msg)
+    source, branches = srcs[0]
     other = peer(repo, opts, source)
     cleanupfn = other.close
     try: