Show More
@@ -683,22 +683,37 b' def unshelvecontinue(ui, repo, state, op' | |||||
683 | _("unresolved conflicts, can't continue"), |
|
683 | _("unresolved conflicts, can't continue"), | |
684 | hint=_("see 'hg resolve', then 'hg unshelve --continue'")) |
|
684 | hint=_("see 'hg resolve', then 'hg unshelve --continue'")) | |
685 |
|
685 | |||
686 | repo.vfs.rename('unshelverebasestate', 'rebasestate') |
|
686 | shelvectx = repo[state.parents[1]] | |
687 | try: |
|
687 | pendingctx = state.pendingctx | |
688 | rebase.rebase(ui, repo, **{ |
|
688 | ||
689 | r'continue' : True |
|
689 | overrides = {('phases', 'new-commit'): phases.secret} | |
690 | }) |
|
690 | with repo.ui.configoverride(overrides, 'unshelve'): | |
691 | except Exception: |
|
691 | with repo.dirstate.parentchange(): | |
692 | repo.vfs.rename('rebasestate', 'unshelverebasestate') |
|
692 | repo.setparents(state.parents[0], nodemod.nullid) | |
693 | raise |
|
693 | newnode = repo.commit(text=shelvectx.description(), | |
|
694 | extra=shelvectx.extra(), | |||
|
695 | user=shelvectx.user(), | |||
|
696 | date=shelvectx.date()) | |||
694 |
|
697 | |||
695 | shelvectx = repo['tip'] |
|
698 | if newnode is None: | |
696 | if state.pendingctx not in shelvectx.parents(): |
|
699 | # If it ended up being a no-op commit, then the normal | |
697 | # rebase was a no-op, so it produced no child commit |
|
700 | # merge state clean-up path doesn't happen, so do it | |
|
701 | # here. Fix issue5494 | |||
|
702 | merge.mergestate.clean(repo) | |||
698 | shelvectx = state.pendingctx |
|
703 | shelvectx = state.pendingctx | |
|
704 | msg = _('note: unshelved changes already existed ' | |||
|
705 | 'in the working copy\n') | |||
|
706 | ui.status(msg) | |||
699 | else: |
|
707 | else: | |
700 |
# only strip the shelvectx if |
|
708 | # only strip the shelvectx if we produced one | |
701 |
state.nodestoremove.append( |
|
709 | state.nodestoremove.append(newnode) | |
|
710 | shelvectx = repo[newnode] | |||
|
711 | ||||
|
712 | hg.updaterepo(repo, pendingctx.node(), False) | |||
|
713 | ||||
|
714 | if repo.vfs.exists('unshelverebasestate'): | |||
|
715 | repo.vfs.rename('unshelverebasestate', 'rebasestate') | |||
|
716 | rebase.clearstatus(repo) | |||
702 |
|
717 | |||
703 | mergefiles(ui, repo, state.wctx, shelvectx) |
|
718 | mergefiles(ui, repo, state.wctx, shelvectx) | |
704 | restorebranch(ui, repo, state.branchtorestore) |
|
719 | restorebranch(ui, repo, state.branchtorestore) |
@@ -459,7 +459,6 b' attempt to continue' | |||||
459 | (continue: hg unshelve --continue) |
|
459 | (continue: hg unshelve --continue) | |
460 | [255] |
|
460 | [255] | |
461 | $ hg unshelve -c |
|
461 | $ hg unshelve -c | |
462 | rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip) |
|
|||
463 | unshelve of 'default' complete |
|
462 | unshelve of 'default' complete | |
464 |
|
463 | |||
465 | ensure the repo is as we hope |
|
464 | ensure the repo is as we hope | |
@@ -901,8 +900,7 b' is a no-op), works (issue4398)' | |||||
901 | (no more unresolved files) |
|
900 | (no more unresolved files) | |
902 | continue: hg unshelve --continue |
|
901 | continue: hg unshelve --continue | |
903 | $ hg unshelve -c |
|
902 | $ hg unshelve -c | |
904 | rebasing 5:e42a7da90865 "changes to: second" (tip) |
|
903 | note: unshelved changes already existed in the working copy | |
905 | note: rebase of 5:e42a7da90865 created no changes to commit |
|
|||
906 | unshelve of 'default' complete |
|
904 | unshelve of 'default' complete | |
907 | $ hg bookmark |
|
905 | $ hg bookmark | |
908 | * test 4:33f7f61e6c5e |
|
906 | * test 4:33f7f61e6c5e | |
@@ -1534,7 +1532,6 b' will be preserved.' | |||||
1534 | (no more unresolved files) |
|
1532 | (no more unresolved files) | |
1535 | continue: hg unshelve --continue |
|
1533 | continue: hg unshelve --continue | |
1536 | $ hg unshelve --continue |
|
1534 | $ hg unshelve --continue | |
1537 | rebasing 2:425c97ef07f3 "changes to: a" (tip) |
|
|||
1538 | marked working directory as branch test |
|
1535 | marked working directory as branch test | |
1539 | unshelve of 'default' complete |
|
1536 | unshelve of 'default' complete | |
1540 | $ cat a |
|
1537 | $ cat a | |
@@ -1618,7 +1615,6 b' in previous versions) and running unshel' | |||||
1618 | (no more unresolved files) |
|
1615 | (no more unresolved files) | |
1619 | continue: hg unshelve --continue |
|
1616 | continue: hg unshelve --continue | |
1620 | $ hg unshelve --continue |
|
1617 | $ hg unshelve --continue | |
1621 | rebasing 2:425c97ef07f3 "changes to: a" (tip) |
|
|||
1622 | unshelve of 'default' complete |
|
1618 | unshelve of 'default' complete | |
1623 | $ cat a |
|
1619 | $ cat a | |
1624 | aaabbbccc |
|
1620 | aaabbbccc | |
@@ -1722,7 +1718,6 b' Unshelve respects --keep even if user in' | |||||
1722 | (no more unresolved files) |
|
1718 | (no more unresolved files) | |
1723 | continue: hg unshelve --continue |
|
1719 | continue: hg unshelve --continue | |
1724 | $ hg unshelve --continue |
|
1720 | $ hg unshelve --continue | |
1725 | rebasing 2:3fbe6fbb0bef "changes to: 1" (tip) |
|
|||
1726 | unshelve of 'default' complete |
|
1721 | unshelve of 'default' complete | |
1727 | $ hg shelve --list |
|
1722 | $ hg shelve --list | |
1728 | default (*s ago) * changes to: 1 (glob) |
|
1723 | default (*s ago) * changes to: 1 (glob) | |
@@ -1795,7 +1790,6 b' putting v1 shelvedstate file in place of' | |||||
1795 | continue: hg unshelve --continue |
|
1790 | continue: hg unshelve --continue | |
1796 | mercurial does not crash |
|
1791 | mercurial does not crash | |
1797 | $ hg unshelve --continue |
|
1792 | $ hg unshelve --continue | |
1798 | rebasing 2:003d2d94241c "changes to: root" (tip) |
|
|||
1799 |
|
|
1793 | unshelve of 'ashelve' complete | |
1800 | $ cd .. |
|
1794 | $ cd .. | |
1801 |
|
1795 |
General Comments 0
You need to be logged in to leave comments.
Login now