Show More
@@ -83,7 +83,6 b' from mercurial.i18n import _' | |||||
83 | from mercurial import ( |
|
83 | from mercurial import ( | |
84 | cmdutil, |
|
84 | cmdutil, | |
85 | commands, |
|
85 | commands, | |
86 | encoding, |
|
|||
87 | error, |
|
86 | error, | |
88 | formatter, |
|
87 | formatter, | |
89 | hg, |
|
88 | hg, | |
@@ -498,9 +497,7 b' def email(ui, repo, *revs, **opts):' | |||||
498 | With -n/--test, all steps will run, but mail will not be sent. |
|
497 | With -n/--test, all steps will run, but mail will not be sent. | |
499 | You will be prompted for an email recipient address, a subject and |
|
498 | You will be prompted for an email recipient address, a subject and | |
500 | an introductory message describing the patches of your patchbomb. |
|
499 | an introductory message describing the patches of your patchbomb. | |
501 |
Then when all is done, patchbomb messages are displayed. |
|
500 | Then when all is done, patchbomb messages are displayed. | |
502 | PAGER environment variable is set, your pager will be fired up once |
|
|||
503 | for each patchbomb message, so you can verify everything is alright. |
|
|||
504 |
|
501 | |||
505 | In case email sending fails, you will find a backup of your series |
|
502 | In case email sending fails, you will find a backup of your series | |
506 | introductory message in ``.hg/last-email.txt``. |
|
503 | introductory message in ``.hg/last-email.txt``. | |
@@ -719,19 +716,14 b' def email(ui, repo, *revs, **opts):' | |||||
719 | if opts.get('test'): |
|
716 | if opts.get('test'): | |
720 | ui.status(_('displaying '), subj, ' ...\n') |
|
717 | ui.status(_('displaying '), subj, ' ...\n') | |
721 | ui.flush() |
|
718 | ui.flush() | |
722 | if 'PAGER' in encoding.environ and not ui.plain(): |
|
719 | ui.pager('email') | |
723 | fp = util.popen(encoding.environ['PAGER'], 'w') |
|
720 | generator = emailmod.Generator.Generator(ui, mangle_from_=False) | |
724 | else: |
|
|||
725 | fp = ui |
|
|||
726 | generator = emailmod.Generator.Generator(fp, mangle_from_=False) |
|
|||
727 | try: |
|
721 | try: | |
728 | generator.flatten(m, 0) |
|
722 | generator.flatten(m, 0) | |
729 |
|
|
723 | ui.write('\n') | |
730 | except IOError as inst: |
|
724 | except IOError as inst: | |
731 | if inst.errno != errno.EPIPE: |
|
725 | if inst.errno != errno.EPIPE: | |
732 | raise |
|
726 | raise | |
733 | if fp is not ui: |
|
|||
734 | fp.close() |
|
|||
735 | else: |
|
727 | else: | |
736 | if not sendmail: |
|
728 | if not sendmail: | |
737 | sendmail = mail.connect(ui, mbox=mbox) |
|
729 | sendmail = mail.connect(ui, mbox=mbox) |
@@ -10,10 +10,6 b' Set up SMTP server:' | |||||
10 | listening at localhost:$HGPORT |
|
10 | listening at localhost:$HGPORT | |
11 | $ cat a.pid >> $DAEMON_PIDS |
|
11 | $ cat a.pid >> $DAEMON_PIDS | |
12 |
|
12 | |||
13 | Ensure hg email output is sent to stdout: |
|
|||
14 |
|
||||
15 | $ unset PAGER |
|
|||
16 |
|
||||
17 | Set up repository: |
|
13 | Set up repository: | |
18 |
|
14 | |||
19 | $ hg init t |
|
15 | $ hg init t |
@@ -28,9 +28,6 b' Mercurial-patchbomb/.* -> Mercurial-patc' | |||||
28 | $ echo "[extensions]" >> $HGRCPATH |
|
28 | $ echo "[extensions]" >> $HGRCPATH | |
29 | $ echo "patchbomb=" >> $HGRCPATH |
|
29 | $ echo "patchbomb=" >> $HGRCPATH | |
30 |
|
30 | |||
31 | Ensure hg email output is sent to stdout |
|
|||
32 | $ unset PAGER |
|
|||
33 |
|
||||
34 | $ hg init t |
|
31 | $ hg init t | |
35 | $ cd t |
|
32 | $ cd t | |
36 | $ echo a > a |
|
33 | $ echo a > a |
General Comments 0
You need to be logged in to leave comments.
Login now