# HG changeset patch # User Navaneeth Suresh # Date 2019-08-15 15:13:25 # Node ID 4b0c9d47f714dd042251cd9837fb8a41b50aaa6d # Parent e67d9b6bad4df2eaaf7544de8a39f41a3c08e2c2 unshelve: abort on using --keep and --interactive together I am working on making interactive mode support `--keep` flag. Until we support the usage of `--interactive` and `--keep` together, let us abort on it. Differential Revision: https://phab.mercurial-scm.org/D6699 diff --git a/mercurial/shelve.py b/mercurial/shelve.py --- a/mercurial/shelve.py +++ b/mercurial/shelve.py @@ -942,6 +942,8 @@ def dounshelve(ui, repo, *shelved, **opt if opts.get("name"): shelved.append(opts["name"]) + if interactive and opts.get('keep'): + raise error.Abort(_('--keep on --interactive is not yet supported')) if abortf or continuef: if abortf and continuef: raise error.Abort(_('cannot use both abort and continue')) diff --git a/tests/test-shelve.t b/tests/test-shelve.t --- a/tests/test-shelve.t +++ b/tests/test-shelve.t @@ -1475,3 +1475,7 @@ Abort unshelve while merging (issue5123) record this change to 'bar2'? (enter ? for help) [Ynesfdaq?] y +-- test for --interactive --keep + $ hg unshelve -i --keep + abort: --keep on --interactive is not yet supported + [255]