Mercurial > hg
changeset 46961:d7b36a4e03de
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
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 21:15:53 +0200 |
parents | 69359c91dc43 |
children | afdd7c472ef2 |
files | mercurial/debugcommands.py |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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: