Mercurial > hg-stable
changeset 46941:d689d48527ea
histedit: use `get_unique_push_path`
Same as for `pathbomb`, this code does not support multiple destinations yet. It might in the future, probably with code put in common with patchwork, but for now lets use the dedicated API.
Differential Revision: https://phab.mercurial-scm.org/D10408
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 12:01:27 +0200 |
parents | 368294967c95 |
children | b5e7cdb93abc |
files | hgext/histedit.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Wed Apr 14 11:57:20 2021 +0200 +++ b/hgext/histedit.py Wed Apr 14 12:01:27 2021 +0200 @@ -1041,11 +1041,12 @@ Used by initialization code""" if opts is None: opts = {} - dest = ui.expandpath(remote or b'default-push', remote or b'default') - dest, branches = urlutil.parseurl(dest, None)[:2] + path = urlutil.get_unique_push_path(b'histedit', repo, ui, remote) + dest = path.pushloc or path.loc + ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest)) - revs, checkout = hg.addbranchrevs(repo, repo, branches, None) + revs, checkout = hg.addbranchrevs(repo, repo, (path.branch, []), None) other = hg.peer(repo, opts, dest) if revs: