Mercurial > hg
diff tests/test-rebase-conflicts.t @ 37032:98663bed146e
rebase: store rebase state after each commit
Before this patch, we stored the rebase state early in the processing
of a node, before we updated the rebase state to indicate that the
node was processed. This meant that we could redo the working copy
merge and run into conflicts. However, this only happened in the
--collapse case if the rebase was interrupted while editing the final
commit message; in the case earlier interruptions, we would instead
detect the in-process revision by finding two dirstate parents.
This patch moves the writing of the rebase state to after we have
completed the revision completely, and, importantly, after we have
updated the rebase state to mark it done. This means we'll realize
that all nodes have been rebased in the case mentioned above of
editing the final commit message of a --collapse. See change to test
case.
I also moved the writing outside of the large if/elif block in
_rebasenode(). This shouldn't matter much, but seems cleaner. One
observable effect is if rebase was interrupted just after ignoring an
obsolete node ("not rebasing ####, already in destination"), we used
to come up with the same decision after --continue too, but after this
patch we'll instead say "already rebased ###". This seems more
consistent, since that's what we would do with obsolete nodes that had
been marked done earlier in the process (not only just before the
interruption).
Differential Revision: https://phab.mercurial-scm.org/D2913
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 21 Mar 2018 11:01:19 -0700 |
parents | 2090044a288d |
children | db06c4bb2158 |
line wrap: on
line diff
--- a/tests/test-rebase-conflicts.t Wed Mar 21 10:46:00 2018 -0700 +++ b/tests/test-rebase-conflicts.t Wed Mar 21 11:01:19 2018 -0700 @@ -239,7 +239,6 @@ rebase status stored rebasing 9:e31216eec445 "more changes to f1" future parents are 2 and -1 - rebase status stored update to 2:4bc80088dc6b resolving manifests branchmerge: False, force: True, partial: False @@ -264,9 +263,9 @@ committing changelog updating the branch cache rebased as 19c888675e13 + rebase status stored rebasing 10:2f2496ddf49d "merge" (tip) future parents are 11 and 7 - rebase status stored already in destination merge against 10:2f2496ddf49d detach base 9:e31216eec445 @@ -284,6 +283,7 @@ committing changelog updating the branch cache rebased as 2a7f09cac94c + rebase status stored rebase merging completed update back to initial working directory parent resolving manifests