diff mercurial/commands.py @ 16357:8ca7187d479f stable

export: catch exporting empty revsets (issue3353) Additionally add tests for empty revsets and unknown revisions.
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 04 Apr 2012 12:31:31 +0200
parents ce292f1379ba
children 329887a7074c
line wrap: on
line diff
--- 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: