From patchwork Tue Aug 6 16:43:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6694: unshelve: delete shelvedstate after a successful unshelve --continue From: phabricator X-Patchwork-Id: 41183 Message-Id: <3b7a8736007a6d21128076aff5bd92ed@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 6 Aug 2019 16:43:39 +0000 Closed by commit rHG073cfff9aaef: unshelve: delete shelvedstate after a successful unshelve --continue (authored by navaneeth.suresh). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D6694?vs=16142&id=16143#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6694?vs=16142&id=16143 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6694/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6694 AFFECTED FILES mercurial/shelve.py tests/test-shelve.t CHANGE DETAILS To: navaneeth.suresh, #hg-reviewers, durin42, pulkit Cc: durin42, mercurial-devel diff --git a/tests/test-shelve.t b/tests/test-shelve.t --- a/tests/test-shelve.t +++ b/tests/test-shelve.t @@ -1425,3 +1425,29 @@ summary: add A to bars #endif + + $ hg unshelve --continue + abort: no unshelve in progress + [255] + + $ hg shelve --list + default-01 (*)* changes to: add A to bars (glob) + default (*)* changes to: add B to foo (glob) + $ hg unshelve -n default-01 -i < y + > y + > EOF + temporarily committing pending changes (restore with 'hg unshelve --abort') + rebasing shelved changes + diff --git a/bar2 b/bar2 + 1 hunks, 1 lines changed + examine changes to 'bar2'? + (enter ? for help) [Ynesfdaq?] y + + @@ -1,2 +1,3 @@ + A + +B + C + record this change to 'bar2'? + (enter ? for help) [Ynesfdaq?] y + diff --git a/mercurial/shelve.py b/mercurial/shelve.py --- a/mercurial/shelve.py +++ b/mercurial/shelve.py @@ -750,8 +750,8 @@ if not phases.supportinternal(repo): repair.strip(ui, repo, state.nodestoremove, backup=False, topic='shelve') + shelvedstate.clear(repo) if not ispartialunshelve: - shelvedstate.clear(repo) unshelvecleanup(ui, repo, state.name, opts) _restoreactivebookmark(repo, state.activebookmark) ui.status(_("unshelve of '%s' complete\n") % state.name)