Patchwork [evolve-ext] inhibit: make bookmark -D work with a list of bookmarks

login
register
mail settings
Submitter Jeroen Vaelen
Date Jan. 22, 2016, 6:25 p.m.
Message ID <13d6c9d29c3962fcd59f.1453487125@jeroenv-mba.local>
Download mbox | patch
Permalink /patch/12875/
State Superseded
Headers show

Comments

Jeroen Vaelen - Jan. 22, 2016, 6:25 p.m.
# HG changeset patch
# User Jeroen Vaelen <jeroen@fb.com>
# Date 1453484524 0
#      Fri Jan 22 17:42:04 2016 +0000
# Node ID 13d6c9d29c3962fcd59f35998e0b8f0eef84b732
# Parent  ea7523380efa894213582ca1600dc472baa7b25e
inhibit: make bookmark -D work with a list of bookmarks

Patch

diff --git a/hgext/inhibit.py b/hgext/inhibit.py
--- a/hgext/inhibit.py
+++ b/hgext/inhibit.py
@@ -97,7 +97,7 @@ 
         'new': [],
         'succ': [],
         'rev': [],
-        'bookmark': [bookmarks[0]],
+        'bookmark': bookmarks,
         'keep': None,
         'biject': False,
     }
diff --git a/tests/test-inhibit.t b/tests/test-inhibit.t
--- a/tests/test-inhibit.t
+++ b/tests/test-inhibit.t
@@ -815,3 +815,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