Show More
@@ -223,6 +223,9 b' def _getbundle(repo, dest, **opts):' | |||||
223 | ui = repo.ui |
|
223 | ui = repo.ui | |
224 | tmpdir = tempfile.mkdtemp(prefix='hg-email-bundle-') |
|
224 | tmpdir = tempfile.mkdtemp(prefix='hg-email-bundle-') | |
225 | tmpfn = os.path.join(tmpdir, 'bundle') |
|
225 | tmpfn = os.path.join(tmpdir, 'bundle') | |
|
226 | btype = ui.config('patchbomb', 'bundletype') | |||
|
227 | if btype: | |||
|
228 | opts['type'] = btype | |||
226 | try: |
|
229 | try: | |
227 | commands.bundle(ui, repo, tmpfn, dest, **opts) |
|
230 | commands.bundle(ui, repo, tmpfn, dest, **opts) | |
228 | fp = open(tmpfn, 'rb') |
|
231 | fp = open(tmpfn, 'rb') | |
@@ -434,7 +437,8 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
434 |
|
437 | |||
435 | With -b/--bundle, changesets are selected as for --outgoing, but a |
|
438 | With -b/--bundle, changesets are selected as for --outgoing, but a | |
436 | single email containing a binary Mercurial bundle as an attachment |
|
439 | single email containing a binary Mercurial bundle as an attachment | |
437 | will be sent. |
|
440 | will be sent. Use the ``patchbomb.bundletype`` config option to | |
|
441 | control the bundle type as with :hg:`bundle --type`. | |||
438 |
|
442 | |||
439 | With -m/--mbox, instead of previewing each patchbomb message in a |
|
443 | With -m/--mbox, instead of previewing each patchbomb message in a | |
440 | pager or sending the messages directly, it will create a UNIX |
|
444 | pager or sending the messages directly, it will create a UNIX |
@@ -356,6 +356,48 b' test bundle and description:' | |||||
356 | Q70eyNw= |
|
356 | Q70eyNw= | |
357 | --===*=-- (glob) |
|
357 | --===*=-- (glob) | |
358 |
|
358 | |||
|
359 | with a specific bundle type | |||
|
360 | (binary part must be different) | |||
|
361 | ||||
|
362 | $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \ | |||
|
363 | > -c bar -s test -r tip -b --desc description \ | |||
|
364 | > --config patchbomb.bundletype=gzip | $FILTERBOUNDARY | |||
|
365 | searching for changes | |||
|
366 | 1 changesets found | |||
|
367 | ||||
|
368 | displaying test ... | |||
|
369 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |||
|
370 | MIME-Version: 1.0 | |||
|
371 | Subject: test | |||
|
372 | Message-Id: <patchbomb.180@*> (glob) | |||
|
373 | User-Agent: Mercurial-patchbomb/* (glob) | |||
|
374 | Date: Thu, 01 Jan 1970 00:03:00 +0000 | |||
|
375 | From: quux | |||
|
376 | To: foo | |||
|
377 | Cc: bar | |||
|
378 | ||||
|
379 | --===*= (glob) | |||
|
380 | Content-Type: text/plain; charset="us-ascii" | |||
|
381 | MIME-Version: 1.0 | |||
|
382 | Content-Transfer-Encoding: 7bit | |||
|
383 | ||||
|
384 | a multiline | |||
|
385 | ||||
|
386 | description | |||
|
387 | ||||
|
388 | --===*= (glob) | |||
|
389 | Content-Type: application/x-mercurial-bundle | |||
|
390 | MIME-Version: 1.0 | |||
|
391 | Content-Disposition: attachment; filename="bundle.hg" | |||
|
392 | Content-Transfer-Encoding: base64 | |||
|
393 | ||||
|
394 | SEcxMEdaeJxjYGBY8V9n/iLGbtFfJZuNk/euDCpWfrRy/vTrevFCx1/4t7J5LdeL0ix0Opx3kwEL | |||
|
395 | wKYXKqUJwqnG5sYWSWmmJsaWlqYWaRaWJpaWiWamZpYWRgZGxolJiabmSQbmZqlcQMV6QGwCxGzG | |||
|
396 | CgZcySARUyA2A2LGZKiZ3Y+Lu786z4z4MWXmsrAZCsqrl1az5y21PMcjpbThzWeXGT+/nutbmvvz | |||
|
397 | zXYS3BoGxdrJDIYmlimJJiZpRokmqYYmaSYWFknmSSkmhqbmliamiZYWxuYmBhbJBgZcUBNZQe5K | |||
|
398 | Epm7xF/LT+RLx/a9juFTomaYO/Rgsx4rwBN+IMCUDLOKAQBrsmti | |||
|
399 | --===============*==-- (glob) | |||
|
400 | ||||
359 | utf-8 patch: |
|
401 | utf-8 patch: | |
360 | $ $PYTHON -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();' |
|
402 | $ $PYTHON -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();' | |
361 | $ hg commit -A -d '4 0' -m 'utf-8 content' |
|
403 | $ hg commit -A -d '4 0' -m 'utf-8 content' |
General Comments 0
You need to be logged in to leave comments.
Login now