# HG changeset patch # User Pierre-Yves David # Date 1618392649 -7200 # Node ID a48f15f1c1784ad4f8277f8f8af32d4bcd13664f # Parent 8e6911426b884a744138b1d47d0abded2079472a 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 diff -r 8e6911426b88 -r a48f15f1c178 hgext/patchbomb.py --- 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: diff -r 8e6911426b88 -r a48f15f1c178 tests/test-patchbomb.t --- 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.