D6708: unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
navaneeth.suresh (Navaneeth Suresh)
phabricator at mercurial-scm.org
Tue Aug 6 16:00:16 UTC 2019
navaneeth.suresh updated this revision to Diff 16141.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6708?vs=16112&id=16141
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6708/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6708
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
@@ -1239,6 +1239,7 @@
> y
> EOF
unshelving change 'default'
+ temporarily committing pending changes (restore with 'hg unshelve --abort')
rebasing shelved changes
diff --git a/d b/d
new file mode 100644
@@ -1250,6 +1251,10 @@
record this change to 'd'?
(enter ? for help) [Ynesfdaq?] y
+
+ $ hg status -v
+ A c
+ A d
$ ls
b
c
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -1002,11 +1002,10 @@
with ui.configoverride(overrides, 'unshelve'):
mergefiles(ui, repo, pctx, shelvectx)
restorebranch(ui, repo, branchtorestore)
+ shelvedstate.clear(repo)
+ _finishunshelve(repo, oldtiprev, tr, activebookmark)
if not ispartialunshelve:
_forgetunknownfiles(repo, shelvectx, addedbefore)
-
- shelvedstate.clear(repo)
- _finishunshelve(repo, oldtiprev, tr, activebookmark)
unshelvecleanup(ui, repo, basename, opts)
finally:
if tr:
To: navaneeth.suresh, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel
More information about the Mercurial-devel
mailing list