diff hgext/patchbomb.py @ 46948:946db89607c8

bundle: support multiple destinations `hg outgoing` and `hg push` now support multiple destination. We do the same for `hg bundle`. Various other commands needs this kind of behavior and it would be create to factor this code out for their usage. However this is an adventure for another time. They are some minor change to the tests (in addition to the new test for the feature): * one because I updated a message to plurals, * another one because the error changed, and I actually find it clearer. Differential Revision: https://phab.mercurial-scm.org/D10414
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Apr 2021 17:02:20 +0200
parents a48f15f1c178
children ff2304dd3ba9
line wrap: on
line diff
--- a/hgext/patchbomb.py	Wed Apr 14 14:35:13 2021 +0200
+++ b/hgext/patchbomb.py	Wed Apr 14 17:02:20 2021 +0200
@@ -382,7 +382,10 @@
     if btype:
         opts['type'] = btype
     try:
-        commands.bundle(ui, repo, tmpfn, dest, **opts)
+        dests = []
+        if dest:
+            dests = [dest]
+        commands.bundle(ui, repo, tmpfn, *dests, **opts)
         return util.readfile(tmpfn)
     finally:
         try: