Show More
@@ -44,7 +44,8 b'' | |||||
44 | # the "email" command with the "-n" option (test only). You will be |
|
44 | # the "email" command with the "-n" option (test only). You will be | |
45 | # prompted for an email recipient address, a subject an an introductory |
|
45 | # prompted for an email recipient address, a subject an an introductory | |
46 | # message describing the patches of your patchbomb. Then when all is |
|
46 | # message describing the patches of your patchbomb. Then when all is | |
47 | # done, your pager will be fired up once for each patchbomb message, so |
|
47 | # done, patchbomb messages are displayed. If PAGER environment variable | |
|
48 | # is set, your pager will be fired up once for each patchbomb message, so | |||
48 | # you can verify everything is alright. |
|
49 | # you can verify everything is alright. | |
49 | # |
|
50 | # | |
50 | # The "-m" (mbox) option is also very useful. Instead of previewing |
|
51 | # The "-m" (mbox) option is also very useful. Instead of previewing | |
@@ -381,14 +382,18 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
381 | if opts['test']: |
|
382 | if opts['test']: | |
382 | ui.status('Displaying ', m['Subject'], ' ...\n') |
|
383 | ui.status('Displaying ', m['Subject'], ' ...\n') | |
383 | ui.flush() |
|
384 | ui.flush() | |
384 | fp = os.popen(os.getenv('PAGER', 'more'), 'w') |
|
385 | if 'PAGER' in os.environ: | |
|
386 | fp = os.popen(os['PAGER'], 'w') | |||
|
387 | else: | |||
|
388 | fp = ui | |||
385 | try: |
|
389 | try: | |
386 | fp.write(m.as_string(0)) |
|
390 | fp.write(m.as_string(0)) | |
387 | fp.write('\n') |
|
391 | fp.write('\n') | |
388 | except IOError, inst: |
|
392 | except IOError, inst: | |
389 | if inst.errno != errno.EPIPE: |
|
393 | if inst.errno != errno.EPIPE: | |
390 | raise |
|
394 | raise | |
391 |
fp |
|
395 | if fp is not ui: | |
|
396 | fp.close() | |||
392 | elif opts['mbox']: |
|
397 | elif opts['mbox']: | |
393 | ui.status('Writing ', m['Subject'], ' ...\n') |
|
398 | ui.status('Writing ', m['Subject'], ' ...\n') | |
394 | fp = open(opts['mbox'], m.has_key('In-Reply-To') and 'ab+' or 'wb+') |
|
399 | fp = open(opts['mbox'], m.has_key('In-Reply-To') and 'ab+' or 'wb+') |
General Comments 0
You need to be logged in to leave comments.
Login now