inhibit: make bookmark -D work with a list of bookmarks
authorJeroen Vaelen <jeroen@fb.com>
Fri, 22 Jan 2016 19:16:38 +0000
changeset 1590 ca5c8a827407
parent 1589 d6630a6bff86
child 1591 5b34513d1117
inhibit: make bookmark -D work with a list of bookmarks `hg bookmark -D` was not accepting a list of bookmarks. This behavior was inconsistent with the behavior of `hg bookmark -d`, which does accept multiple bookmarks.
hgext/inhibit.py
tests/test-inhibit.t
--- a/hgext/inhibit.py	Sun Jan 17 16:55:40 2016 -0800
+++ b/hgext/inhibit.py	Fri Jan 22 19:16:38 2016 +0000
@@ -97,7 +97,7 @@
         'new': [],
         'succ': [],
         'rev': [],
-        'bookmark': [bookmarks[0]],
+        'bookmark': bookmarks,
         'keep': None,
         'biject': False,
     }
--- a/tests/test-inhibit.t	Sun Jan 17 16:55:40 2016 -0800
+++ b/tests/test-inhibit.t	Fri Jan 22 19:16:38 2016 +0000
@@ -892,3 +892,15 @@
   searching for changes
   no changes found
   adding remote bookmark foo
+
+Test that bookmark -D can take multiple branch names
+  $ cd ../inhibit
+  $ hg bookmark book2 book1 book3
+  $ touch foo && hg add foo && hg ci -m "add foo"
+  $ hg up book1
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  (activating bookmark book1)
+  $ hg bookmark -D book2 book3
+  bookmark 'book2' deleted
+  bookmark 'book3' deleted
+  1 changesets pruned