hgext/patchbomb.py
changeset 4563 1cf908c00479
parent 4562 d48e1b5f8265
child 4564 087b3ae4f08a
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -223,7 +223,9 @@ def patchbomb(ui, repo, *revs, **opts):
                 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 @@ def patchbomb(ui, repo, *revs, **opts):
 
     ui.write('\n')
 
-    if not opts['test'] and not opts['mbox']:
+    if really_sending:
         mailer = mail.connect(ui)
     parent = None