evolve: adapt to change in core rebase
Mercurial core changeset 63e889cc610d (And the ones around it) changed the way
graft and rebase work. We adapt to them.
--- a/hgext/evolve.py Thu Oct 16 14:06:52 2014 -0700
+++ b/hgext/evolve.py Thu Oct 16 04:38:37 2014 -0700
@@ -806,14 +806,20 @@
try:
try:
r = rebase.rebasenode(repo, orig.node(), dest.node(),
- {node.nullrev: node.nullrev}, False)
+ {node.nullrev: node.nullrev}, False,
+ orig.p1().node())
if r[-1]: #some conflict
raise util.Abort(
'unresolved merge conflicts (see hg help resolve)')
- cmdutil.duplicatecopies(repo, orig.node(), dest.node())
nodenew = rebase.concludenode(repo, orig.node(), dest.node(),
node.nullid, commitmsg)
except util.Abort, exc:
+ repo.dirstate.beginparentchange()
+ repo.setparents(repo['.'].node(), nullid)
+ repo.dirstate.write()
+ # fix up dirstate for copies and renames
+ copies.duplicatecopies(repo, dest.rev(), orig.p1().rev())
+ repo.dirstate.endparentchange()
class LocalMergeFailure(MergeFailure, exc.__class__):
pass
exc.__class__ = LocalMergeFailure
--- a/tests/test-stabilize-conflict.t Thu Oct 16 14:06:52 2014 -0700
+++ b/tests/test-stabilize-conflict.t Thu Oct 16 04:38:37 2014 -0700
@@ -143,7 +143,7 @@
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: babar count up to ten
|
- | @ changeset: 5:71c18f70c34f
+ | o changeset: 5:71c18f70c34f
| | user: test
| | date: Thu Jan 01 00:00:00 1970 +0000
| | summary: babar count up to fifteen
@@ -233,7 +233,7 @@
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: babar count up to ten
|
- | @ changeset: 8:1836b91c6c1d
+ | o changeset: 8:1836b91c6c1d
| | user: test
| | date: Thu Jan 01 00:00:00 1970 +0000
| | summary: babar count up to fifteen