Mercurial > hg
changeset 4565:1cf908c00479
Don't validate email config if we're not sending email.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 12 Jun 2007 14:44:47 -0700 |
parents | d48e1b5f8265 |
children | 087b3ae4f08a |
files | hgext/patchbomb.py tests/test-patchbomb tests/test-patchbomb.out |
diffstat | 3 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/patchbomb.py Tue Jun 12 14:39:36 2007 -0700 +++ b/hgext/patchbomb.py Tue Jun 12 14:44:47 2007 -0700 @@ -223,7 +223,9 @@ pass os.rmdir(tmpdir) - if not opts['test']: + really_sending = not (opts['test'] or opts['mbox']) + + if really_sending: mail.validateconfig(ui) if not (revs or opts.get('rev') or opts.get('outgoing')): @@ -351,7 +353,7 @@ ui.write('\n') - if not opts['test'] and not opts['mbox']: + if really_sending: mailer = mail.connect(ui) parent = None
--- a/tests/test-patchbomb Tue Jun 12 14:39:36 2007 -0700 +++ b/tests/test-patchbomb Tue Jun 12 14:44:47 2007 -0700 @@ -15,3 +15,5 @@ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test 0:tip | \ sed -e 's/\(Message-Id:.*@\|In-Reply-To:.*@\).*/\1/' + +hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip
--- a/tests/test-patchbomb.out Tue Jun 12 14:39:36 2007 -0700 +++ b/tests/test-patchbomb.out Tue Jun 12 14:44:47 2007 -0700 @@ -132,3 +132,12 @@ --remotecmd specify hg command to run on the remote side use "hg -v help email" to show global options +This patch series consists of 2 patches. + + +Write the introductory message for the patch series. + + +Writing [PATCH 0 of 2] test ... +Writing [PATCH 1 of 2] a ... +Writing [PATCH 2 of 2] b ...