Mercurial > hg
diff tests/test-shelve.t @ 39387:da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Follow up for c67c94c0e7ae and 38373da1af02.
The inline comment says "we should keep track of the unshelve node in case
we need to reuse it." Perhaps such case isn't tested, and this patch does
NOT add a test for the reuse of the unbundled revision.
Also, I have no idea what should be done if new revision is unbundled
because of "node not in repo".
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 31 Aug 2018 21:10:28 +0900 |
parents | 5f8282f368b2 |
children | 5d69e2412ec8 |
line wrap: on
line diff
--- a/tests/test-shelve.t Sat Sep 01 10:40:48 2018 +0900 +++ b/tests/test-shelve.t Fri Aug 31 21:10:28 2018 +0900 @@ -1793,5 +1793,23 @@ mercurial does not crash $ hg unshelve --continue unshelve of 'ashelve' complete + +Unshelve without .shelve metadata: + + $ hg shelve + shelved as default + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm .hg/shelved/default.shelve + $ echo 3 > a + $ hg unshelve + unshelving change 'default' + temporarily committing pending changes (restore with 'hg unshelve --abort') + rebasing shelved changes + merging a + warning: conflicts while merging a! (edit, then use 'hg resolve --mark') + unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') + [1] + $ cat .hg/shelved/default.shelve + node=82e0cb9893247d12667017593ce1e5655860f1ac + $ cd .. -