D5356: rebase: preserve working copy when redoing in-mem rebase on disk
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Dec 3 15:09:20 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf07d4f94f098: rebase: preserve working copy when redoing in-mem rebase on disk (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5356?vs=12676&id=12681
REVISION DETAIL
https://phab.mercurial-scm.org/D5356
AFFECTED FILES
hgext/rebase.py
tests/test-rebase-inmemory.t
CHANGE DETAILS
diff --git a/tests/test-rebase-inmemory.t b/tests/test-rebase-inmemory.t
--- a/tests/test-rebase-inmemory.t
+++ b/tests/test-rebase-inmemory.t
@@ -422,7 +422,6 @@
transaction abort!
rollback completed
hit merge conflicts; re-running rebase without in-memory merge
- rebase aborted
rebasing 2:177f92b77385 "c"
rebasing 3:055a42cdd887 "d"
rebasing 4:e860deea161a "e"
@@ -447,17 +446,10 @@
transaction abort!
rollback completed
hit merge conflicts; re-running rebase without in-memory merge
- rebase aborted
- rebasing 2:177f92b77385 "c"
- rebasing 3:055a42cdd887 "d"
- rebasing 4:e860deea161a "e"
- merging e
- warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
- unresolved conflicts (see hg resolve, then hg rebase --continue)
- [1]
-BROKEN: working copy change to "a" was lost
+ abort: uncommitted changes
+ [255]
$ cat a
- a
+ dirty
Retrying without in-memory merge won't lose merge state
$ cd ..
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -865,7 +865,11 @@
except error.InMemoryMergeConflictsError:
ui.warn(_('hit merge conflicts; re-running rebase without in-memory'
' merge\n'))
- _dorebase(ui, repo, action='abort', opts={})
+ # TODO: Make in-memory merge not use the on-disk merge state, so
+ # we don't have to clean it here
+ mergemod.mergestate.clean(repo)
+ clearstatus(repo)
+ clearcollapsemsg(repo)
return _dorebase(ui, repo, action, opts, inmemory=False)
else:
return _dorebase(ui, repo, action, opts)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list