doc: clarify _resolvephasedivergent role and constraint
Small documentation patch before larger changes.
--- a/hgext3rd/evolve/evolvecmd.py Tue Apr 02 20:32:15 2019 +0200
+++ b/hgext3rd/evolve/evolvecmd.py Fri Mar 29 11:48:36 2019 +0100
@@ -259,6 +259,14 @@
return _resolvephasedivergent(ui, repo, prec, bumped, tmpctx)
def _resolvephasedivergent(ui, repo, prec, bumped, tmpctx=None):
+ """final step of a phase divergence resolution
+
+ This will create a new changesets (or nothing when applicable), the two
+ changesets needs to be on the same parents.
+
+ XXX we should deal with all tmpctx business before callin this function and
+ pass tmpctx as bumped directly
+ """
tr = repo.currenttransaction()
assert tr is not None
@@ -273,6 +281,11 @@
rebasedbmupdate = _bookmarksupdater(repo, tmpctx.node(), tr)
bumped = tmpctx
+ cl = repo.changelog
+ prec_parent = cl.parentrevs(prec.rev())
+ bump_parent = cl.parentrevs(bumped.rev())
+ assert prec_parent == bump_parent, (prec_parent, bump_parent)
+
# Create the new commit context
files = set()
copied = copies.pathcopies(prec, bumped)