Mercurial > evolve
changeset 1014:93507c20739e
evolve: add a custom layer around retractboundary
retract boundary is about to gain a new argument in core, we need somethign to
handle this
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 06 Aug 2014 16:04:07 -0700 |
parents | 58ff9d9c0746 |
children | 68d9c7e4a03d |
files | hgext/evolve.py |
diffstat | 1 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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()