mercurial/commands.py
changeset 16373 329887a7074c
parent 16304 a740fa28d718
parent 16357 8ca7187d479f
child 16389 79fecd735d26
--- a/mercurial/commands.py	Fri Apr 06 15:16:30 2012 -0500
+++ b/mercurial/commands.py	Fri Apr 06 15:18:14 2012 -0500
@@ -2438,9 +2438,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: