comparison hgext/histedit.py @ 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 4452cb788404
children f38bf44e077f
comparison
equal deleted inserted replaced
46940:368294967c95 46941:d689d48527ea
1039 """utility function to find the first outgoing changeset 1039 """utility function to find the first outgoing changeset
1040 1040
1041 Used by initialization code""" 1041 Used by initialization code"""
1042 if opts is None: 1042 if opts is None:
1043 opts = {} 1043 opts = {}
1044 dest = ui.expandpath(remote or b'default-push', remote or b'default') 1044 path = urlutil.get_unique_push_path(b'histedit', repo, ui, remote)
1045 dest, branches = urlutil.parseurl(dest, None)[:2] 1045 dest = path.pushloc or path.loc
1046
1046 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest)) 1047 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
1047 1048
1048 revs, checkout = hg.addbranchrevs(repo, repo, branches, None) 1049 revs, checkout = hg.addbranchrevs(repo, repo, (path.branch, []), None)
1049 other = hg.peer(repo, opts, dest) 1050 other = hg.peer(repo, opts, dest)
1050 1051
1051 if revs: 1052 if revs:
1052 revs = [repo.lookup(rev) for rev in revs] 1053 revs = [repo.lookup(rev) for rev in revs]
1053 1054