diff tests/test-bookmarks.t @ 17790:0291e122fb05

bookmarks: abort when incompatible options are used (issue3663) Options like --delete and --rename are incompatible with each other. In this case we abort. We do not abort if the result is a nullop. Nullops are: '--delete --inactive', '--delete --force'.
author David Soria Parra <dsp@php.net>
date Wed, 17 Oct 2012 11:50:47 +0200
parents 4cfd02c2df9a
children f88ca484c3e9
line wrap: on
line diff
--- a/tests/test-bookmarks.t	Wed Oct 17 08:44:49 2012 +0200
+++ b/tests/test-bookmarks.t	Wed Oct 17 11:50:47 2012 +0200
@@ -242,6 +242,20 @@
   abort: a bookmark cannot have the name of an existing branch
   [255]
 
+incompatible options
+
+  $ hg bookmark -m Y -d Z
+  abort: --delete and --rename are incompatible
+  [255]
+
+  $ hg bookmark -r 1 -d Z
+  abort: --rev is incompatible with --delete
+  [255]
+
+  $ hg bookmark -r 1 -m Z Y
+  abort: --rev is incompatible with --rename
+  [255]
+
 force bookmark with existing name
 
   $ hg bookmark -f Z