mercurial/debugcommands.py
changeset 46961 d7b36a4e03de
parent 46960 69359c91dc43
child 47012 d55b71393907
child 47061 bd2ed1032b4e
--- a/mercurial/debugcommands.py	Wed Apr 14 21:15:22 2021 +0200
+++ b/mercurial/debugcommands.py	Wed Apr 14 21:15:53 2021 +0200
@@ -3765,8 +3765,14 @@
 
     for backup in backups:
         # Much of this is copied from the hg incoming logic
-        source = ui.expandpath(os.path.relpath(backup, encoding.getcwd()))
-        source, branches = urlutil.parseurl(source, opts.get(b"branch"))
+        source = os.path.relpath(backup, encoding.getcwd())
+        source, branches = urlutil.get_unique_pull_path(
+            b'debugbackupbundle',
+            repo,
+            ui,
+            source,
+            default_branches=opts.get(b'branch'),
+        )
         try:
             other = hg.peer(repo, opts, source)
         except error.LookupError as ex: