# HG changeset patch # User Pierre-Yves David # Date 2021-04-14 19:15:53 # Node ID d7b36a4e03dec3a946ca8c1a0f6d4de96826cbc1 # Parent 69359c91dc4303460020ed0c1edf475a02a6b186 debugbackupbundle: use `get_unique_pull_path` This is the last known user of `ui.expandpath` outside of `urlutil`. Hooray. Differential Revision: https://phab.mercurial-scm.org/D10428 diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -3765,8 +3765,14 @@ def debugbackupbundle(ui, repo, *pats, * 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: