# HG changeset patch # User Pierre-Yves David # Date 1407366247 25200 # Node ID 93507c20739e345919e30c693ce395de02f5bd74 # Parent 58ff9d9c074611723a7e8417f22a19a711a4f3f1 evolve: add a custom layer around retractboundary retract boundary is about to gain a new argument in core, we need somethign to handle this diff -r 58ff9d9c0746 -r 93507c20739e hgext/evolve.py --- a/hgext/evolve.py Wed Jul 30 13:40:40 2014 -0700 +++ b/hgext/evolve.py Wed Aug 06 16:04:07 2014 -0700 @@ -91,6 +91,14 @@ # - Older format compat +##################################################################### +### Compatibility with core ### +##################################################################### + + +def retractboundary(repo, targetphase, nodes): + return phases.retractboundary(repo, targetphase, nodes) + ##################################################################### ### Extension helper ### @@ -871,7 +879,7 @@ lockmod.release(lock, wlock) oldbookmarks = repo.nodebookmarks(nodesrc) if nodenew is not None: - phases.retractboundary(repo, destphase, [nodenew]) + retractboundary(repo, destphase, [nodenew]) createmarkers(repo, [(repo[nodesrc], (repo[nodenew],))]) for book in oldbookmarks: repo._bookmarks[book] = nodenew @@ -1465,7 +1473,7 @@ createmarkers(repo, [(tmpctx, ())]) newid = prec.node() else: - phases.retractboundary(repo, bumped.phase(), [newid]) + retractboundary(repo, bumped.phase(), [newid]) createmarkers(repo, [(tmpctx, (repo[newid],))], flag=obsolete.bumpedfix) bmupdate(newid) @@ -1578,7 +1586,7 @@ else: new = repo['.'] createmarkers(repo, [(other, (new,))]) - phases.retractboundary(repo, other.phase(), [new.node()]) + retractboundary(repo, other.phase(), [new.node()]) tr.close() finally: tr.release() @@ -1979,7 +1987,7 @@ hint=_("use --all to uncommit all files")) # Move local changes on filtered changeset createmarkers(repo, [(old, (repo[newid],))]) - phases.retractboundary(repo, oldphase, [newid]) + retractboundary(repo, oldphase, [newid]) repo.dirstate.setparents(newid, node.nullid) _uncommitdirstate(repo, old, match) updatebookmarks(newid) @@ -2066,7 +2074,7 @@ newmapping[ctx.node()] = new if not duplicate: createmarkers(repo, [(ctx, (repo[new],))]) - phases.retractboundary(repo, ctx.phase(), [new]) + retractboundary(repo, ctx.phase(), [new]) if ctx in repo[None].parents(): repo.dirstate.setparents(new, node.nullid) tr.close() @@ -2169,7 +2177,7 @@ newid, unusedvariable = rewrite(repo, root, allctx, head, [root.p1().node(), root.p2().node()], commitopts=commitopts) - phases.retractboundary(repo, targetphase, [newid]) + retractboundary(repo, targetphase, [newid]) createmarkers(repo, [(ctx, (repo[newid],)) for ctx in allctx]) tr.close()