shelve: add --keep to list of allowables
authorJordi Gutiérrez Hermoso <jordigh@octave.org>
Sun, 24 Mar 2019 20:13:13 -0400
changeset 42020 00c1ee0f746a
parent 42019 5a1e621b8186
child 42021 4c700c847aa2
shelve: add --keep to list of allowables
hgext/shelve.py
tests/test-shelve.t
--- a/hgext/shelve.py	Sun Mar 17 12:30:52 2019 +0000
+++ b/hgext/shelve.py	Sun Mar 24 20:13:13 2019 -0400
@@ -1120,6 +1120,7 @@
 #       ('date', {'create'}), # ignored for passing '--date "0 0"' in tests
         ('delete', {'delete'}),
         ('edit', {'create'}),
+        ('keep', {'create'}),
         ('list', {'list'}),
         ('message', {'create'}),
         ('name', {'create'}),
--- a/tests/test-shelve.t	Sun Mar 17 12:30:52 2019 +0000
+++ b/tests/test-shelve.t	Sun Mar 24 20:13:13 2019 -0400
@@ -933,6 +933,15 @@
 
   $ hg unshelve
   unshelving change 'default'
+  $ hg shelve --keep --list
+  abort: options '--list' and '--keep' may not be used together
+  [255]
+  $ hg shelve --keep --patch
+  abort: options '--patch' and '--keep' may not be used together
+  [255]
+  $ hg shelve --keep --delete
+  abort: options '--delete' and '--keep' may not be used together
+  [255]
   $ hg shelve --keep
   shelved as default
   $ hg diff