# HG changeset patch # User Bryan O'Sullivan # Date 1180303139 25200 # Node ID ead2fa544cbf636162405192c37e1f20f02acd42 # Parent c15955bde7dd828344be7da9d0cde366c0515bf3 patchbomb: Fail early if no revs given to email diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -226,7 +226,9 @@ def patchbomb(ui, repo, *revs, **opts): 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"))