mercurial/commands.py
changeset 26286 4b685712fa45
parent 26238 69da16b366ad
child 26302 5ba3358ebc7f
--- a/mercurial/commands.py	Thu Sep 17 17:17:54 2015 -0700
+++ b/mercurial/commands.py	Thu Sep 17 16:08:10 2015 -0700
@@ -6480,6 +6480,11 @@
     try:
         cmdutil.clearunfinished(repo)
 
+        if date:
+            if rev is not None:
+                raise util.Abort(_("you can't specify a revision and a date"))
+            rev = cmdutil.finddate(ui, repo, date)
+
         # with no argument, we also move the active bookmark, if any
         rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
 
@@ -6490,11 +6495,6 @@
         if check and clean:
             raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
 
-        if date:
-            if rev is not None:
-                raise util.Abort(_("you can't specify a revision and a date"))
-            rev = cmdutil.finddate(ui, repo, date)
-
         if check:
             cmdutil.bailifchanged(repo, merge=False)
             if rev is None: