[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: D6694: unshelve: delete shelvedstate after a successful unshelve --continue
From: "navaneeth.suresh (Navaneeth Suresh)" <phabricator () mercurial-scm ! org>
Date: 2019-07-27 6:21:25
Message-ID: 757ef6fe18450bf068d9ed7ca4f906b7 () localhost ! localdomain
[Download RAW message or body]
navaneeth.suresh edited the summary of this revision.
navaneeth.suresh retitled this revision from "unshelve: fix bug on a partial unshelve \
with --continue" to "unshelve: delete shelvedstate after a successful unshelve \
--continue". navaneeth.suresh updated this revision to Diff 16085.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6694?vs=16071&id=16085
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
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1419,3 +1419,31 @@
summary: add A to bars
#endif
+
+-- now, --continue should abort as the last unshelve was successful even
+-- though it was partially done. it can be completed without --continue.
+ $ hg unshelve --continue
+ abort: no unshelve in progress
+ [255]
+
+ $ hg shelve --list
+ default-01 (1s ago) changes to: add A to bars
+ default (1s ago) changes to: add B to foo
+ $ hg unshelve -n default-01 -i <<EOF
+ > 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)
To: navaneeth.suresh, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic