Patchwork shelve: add --keep to list of allowables

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date March 25, 2019, 12:13 a.m.
Message ID <4b1cb76ab29461a0a4c5.1553472817@chloe>
Download mbox | patch
Permalink /patch/39377/
State Accepted
Headers show

Comments

Jordi Gutiérrez Hermoso - March 25, 2019, 12:13 a.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@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
Yuya Nishihara - March 25, 2019, 10:08 p.m.
On Sun, 24 Mar 2019 20:13:37 -0400, Jordi Gutiérrez Hermoso wrote:
> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@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

Queued, thanks.

Patch

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