changeset 4493:ead2fa544cbf

patchbomb: Fail early if no revs given to email
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 27 May 2007 14:58:59 -0700
parents c15955bde7dd
children 649dd2492ae5
files hgext/patchbomb.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Sun May 27 14:54:00 2007 -0700
+++ b/hgext/patchbomb.py	Sun May 27 14:58:59 2007 -0700
@@ -226,7 +226,9 @@
     if not opts['test']:
         mail.validateconfig(ui)
 
-    # option handling
+    if not (revs or opts.get('rev') or opts.get('outgoing')):
+        raise util.Abort(_('specify at least one changeset with -r or -o'))
+
     commands.setremoteconfig(ui, opts)
     if opts.get('outgoing') and opts.get('bundle'):
         raise util.Abort(_("--outgoing mode always on with --bundle; do not re-specify --outgoing"))