Mercurial > hg
changeset 46938:a48f15f1c178
patchbomb: use `get_unique_pull_path`
The patchbomb code does not support multiple destinations yet. It would not be
too hard to implemented since `hg outgoing` does. However that is a bit too
much of a detour right now. In addition that kind of "select outgoing
changesets for processing" code exist for various commands so the best would be
to factor it out later.
Let us use the dedicated API until this is solved.
This comes with a small output change in the test that I find more accurate. So
I kept it.
Differential Revision: https://phab.mercurial-scm.org/D10405
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 11:30:49 +0200 |
parents | 8e6911426b88 |
children | b133154f1e7b |
files | hgext/patchbomb.py tests/test-patchbomb.t |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/patchbomb.py Wed Apr 14 11:18:48 2021 +0200 +++ b/hgext/patchbomb.py Wed Apr 14 11:30:49 2021 +0200 @@ -530,9 +530,9 @@ def _getoutgoing(repo, dest, revs): '''Return the revisions present locally but not in dest''' ui = repo.ui - url = ui.expandpath(dest or b'default-push', dest or b'default') - url = urlutil.parseurl(url)[0] - ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(url)) + paths = urlutil.get_push_paths(repo, ui, [dest]) + safe_paths = [urlutil.hidepassword(p.rawloc) for p in paths] + ui.status(_(b'comparing with %s\n') % b','.join(safe_paths)) revs = [r for r in revs if r >= 0] if not revs:
--- a/tests/test-patchbomb.t Wed Apr 14 11:18:48 2021 +0200 +++ b/tests/test-patchbomb.t Wed Apr 14 11:30:49 2021 +0200 @@ -2868,7 +2868,7 @@ dest#branch URIs: $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test - comparing with ../t + comparing with ../t#test From [test]: test this patch series consists of 1 patches.