commands: forbid 'hg update --check --clean'
authorStuart W Marks <smarks@smarks.org>
Thu, 17 Sep 2009 21:34:05 +0200
changeset 9450 e78967d3dd6f
parent 9448 bc6b0fef9495
child 9451 3e673c988c85
commands: forbid 'hg update --check --clean'
mercurial/commands.py
--- a/mercurial/commands.py	Mon Sep 14 19:53:43 2009 -0500
+++ b/mercurial/commands.py	Thu Sep 17 21:34:05 2009 +0200
@@ -3040,7 +3040,10 @@
     if not rev:
         rev = node
 
-    if not clean and check:
+    if check and clean:
+        raise util.Abort(_("cannot specify both -c and -C"))
+
+    if check:
         # we could use dirty() but we can ignore merge and branch trivia
         c = repo[None]
         if c.modified() or c.added() or c.removed():