Mercurial > evolve
changeset 258:8337bb3bb958
Fix amend and relocate who picked phases data after extinct wher made secret
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 05 Jun 2012 22:13:59 +0200 |
parents | bbd1adb262fd |
children | 9886034199af |
files | hgext/evolve.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Tue Jun 05 21:52:44 2012 +0200 +++ b/hgext/evolve.py Tue Jun 05 22:13:59 2012 +0200 @@ -156,6 +156,8 @@ assert orig.p2().rev() == node.nullrev, 'no support yet' destbookmarks = repo.nodebookmarks(dest.node()) cmdutil.duplicatecopies(repo, orig.node(), dest.node()) + nodesrc = orig.node() + destphase = repo[nodesrc].phase() if rebase.rebasenode.func_code.co_argcount == 5: # rebasenode collapse argument was introduced by # d1afbf03e69a (2.3) @@ -165,9 +167,8 @@ rebase.rebasenode(repo, orig.node(), dest.node(), {node.nullrev: node.nullrev}) nodenew = rebase.concludenode(repo, orig.node(), dest.node(), node.nullid) - nodesrc = orig.node() + phases.retractboundary(repo, destphase, [nodenew]) repo.addobsolete(nodenew, nodesrc) - phases.retractboundary(repo, repo[nodesrc].phase(), [nodenew]) oldbookmarks = repo.nodebookmarks(nodesrc) for book in oldbookmarks: repo._bookmarks[book] = nodenew @@ -401,7 +402,7 @@ try: if not old.phase(): raise util.Abort(_("can not rewrite immutable changeset %s") % old) - + oldphase = old.phase() # commit current changes as update # code copied from commands.commit to avoid noisy messages ciopts = dict(opts) @@ -438,7 +439,7 @@ [old.p1().node(), old.p2().node()], opts) # reroute the working copy parent to the new changeset - phases.retractboundary(repo, old.phase(), [newid]) + phases.retractboundary(repo, oldphase, [newid]) repo.dirstate.setparents(newid, node.nullid) finally: