Show More
@@ -765,6 +765,7 b' def _commitworkingcopychanges(ui, repo, ' | |||
|
765 | 765 | def _unshelverestorecommit(ui, repo, basename): |
|
766 | 766 | """Recreate commit in the repository during the unshelve""" |
|
767 | 767 | repo = repo.unfiltered() |
|
768 | node = None | |
|
768 | 769 | if shelvedfile(repo, basename, 'shelve').exists(): |
|
769 | 770 | node = shelvedfile(repo, basename, 'shelve').readinfo()['node'] |
|
770 | 771 | if node is None or node not in repo: |
@@ -774,7 +775,7 b' def _unshelverestorecommit(ui, repo, bas' | |||
|
774 | 775 | # We might not strip the unbundled changeset, so we should keep track of |
|
775 | 776 | # the unshelve node in case we need to reuse it (eg: unshelve --keep) |
|
776 | 777 | if node is None: |
|
777 | info = {'node': nodemod.hex(node)} | |
|
778 | info = {'node': nodemod.hex(shelvectx.node())} | |
|
778 | 779 | shelvedfile(repo, basename, 'shelve').writeinfo(info) |
|
779 | 780 | else: |
|
780 | 781 | shelvectx = repo[node] |
@@ -1793,5 +1793,23 b' putting v1 shelvedstate file in place of' | |||
|
1793 | 1793 | mercurial does not crash |
|
1794 | 1794 | $ hg unshelve --continue |
|
1795 | 1795 | unshelve of 'ashelve' complete |
|
1796 | ||
|
1797 | Unshelve without .shelve metadata: | |
|
1798 | ||
|
1799 | $ hg shelve | |
|
1800 | shelved as default | |
|
1801 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1802 | $ rm .hg/shelved/default.shelve | |
|
1803 | $ echo 3 > a | |
|
1804 | $ hg unshelve | |
|
1805 | unshelving change 'default' | |
|
1806 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
|
1807 | rebasing shelved changes | |
|
1808 | merging a | |
|
1809 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
|
1810 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
|
1811 | [1] | |
|
1812 | $ cat .hg/shelved/default.shelve | |
|
1813 | node=82e0cb9893247d12667017593ce1e5655860f1ac | |
|
1814 | ||
|
1796 | 1815 | $ cd .. |
|
1797 |
General Comments 0
You need to be logged in to leave comments.
Login now