[PATCH] shelve: add --keep to list of allowables

Jordi GutiƩrrez Hermoso jordigh at octave.org
Sun Mar 24 20:13:37 EDT 2019


# HG changeset patch
# User Jordi GutiƩrrez Hermoso <jordigh at octave.org>
# Date 1553472793 14400
#      Sun Mar 24 20:13:13 2019 -0400
# Node ID 4b1cb76ab29461a0a4c5ff12bb364ea2bb5b1b89
# Parent  50d5e64ec561a8227ad32fe86c1811963e7664cd
shelve: add --keep to list of allowables

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -1120,6 +1120,7 @@ def shelvecmd(ui, repo, *pats, **opts):
 #       ('date', {'create'}), # ignored for passing '--date "0 0"' in tests
         ('delete', {'delete'}),
         ('edit', {'create'}),
+        ('keep', {'create'}),
         ('list', {'list'}),
         ('message', {'create'}),
         ('name', {'create'}),
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -933,6 +933,15 @@ Test shelve --keep
 
   $ 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


More information about the Mercurial-devel mailing list