From patchwork Fri Aug 16 10:56:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6699: unshelve: abort on using --keep and --interactive together From: phabricator X-Patchwork-Id: 41312 Message-Id: <27e6967e5e848c53351da995cd92a46d@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 16 Aug 2019 10:56:07 +0000 Closed by commit rHG4b0c9d47f714: unshelve: abort on using --keep and --interactive together (authored by navaneeth.suresh). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6699?vs=16211&id=16222 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6699/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6699 AFFECTED FILES mercurial/shelve.py tests/test-shelve.t CHANGE DETAILS To: navaneeth.suresh, #hg-reviewers, pulkit Cc: pulkit, mercurial-devel 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 @@ 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] diff --git a/mercurial/shelve.py b/mercurial/shelve.py --- a/mercurial/shelve.py +++ b/mercurial/shelve.py @@ -942,6 +942,8 @@ 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'))