# HG changeset patch # User Pierre-Yves David # Date 1553856516 -3600 # Node ID 6feeaf00db44e26f87f47c790128f990a84c894e # Parent 05f8908df4ce158779aba6571f220fa28d0de556 doc: clarify _resolvephasedivergent role and constraint Small documentation patch before larger changes. diff -r 05f8908df4ce -r 6feeaf00db44 hgext3rd/evolve/evolvecmd.py --- 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)