diff -r cb1475e7e5a2 -r 8ca7187d479f mercurial/commands.py --- a/mercurial/commands.py Wed Apr 04 11:18:42 2012 +0200 +++ b/mercurial/commands.py Wed Apr 04 12:31:31 2012 +0200 @@ -2413,9 +2413,9 @@ Returns 0 on success. """ changesets += tuple(opts.get('rev', [])) - if not changesets: + revs = scmutil.revrange(repo, changesets) + if not revs: raise util.Abort(_("export requires at least one changeset")) - revs = scmutil.revrange(repo, changesets) if len(revs) > 1: ui.note(_('exporting patches:\n')) else: