Mercurial > evolve
diff hgext/evolve.py @ 286:d3f20770b86a stable 0.2.0
Merge with Patrick improvement
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 20 Jun 2012 15:57:28 +0200 |
parents | 88a851a54f26 |
children | 98c9c69c311d |
line wrap: on
line diff
--- a/hgext/evolve.py Wed Jun 20 15:28:51 2012 +0200 +++ b/hgext/evolve.py Wed Jun 20 15:57:28 2012 +0200 @@ -180,11 +180,17 @@ rebase.rebasenode(repo, orig.node(), dest.node(), {node.nullrev: node.nullrev}) nodenew = rebase.concludenode(repo, orig.node(), dest.node(), node.nullid) - phases.retractboundary(repo, destphase, [nodenew]) - repo.addobsolete(nodenew, nodesrc) oldbookmarks = repo.nodebookmarks(nodesrc) - for book in oldbookmarks: - repo._bookmarks[book] = nodenew + if nodenew is not None: + phases.retractboundary(repo, destphase, [nodenew]) + repo.addobsolete(nodenew, nodesrc) + for book in oldbookmarks: + repo._bookmarks[book] = nodenew + else: + repo.addobsolete(node.nullid, nodesrc) + # Behave like rebase, move bookmarks to dest + for book in oldbookmarks: + repo._bookmarks[book] = dest.node() for book in destbookmarks: # restore bookmark that rebase move repo._bookmarks[book] = dest.node() if oldbookmarks or destbookmarks: @@ -219,7 +225,7 @@ cmdtable = {} command = cmdutil.command(cmdtable) -@command('^stabilize', +@command('^stabilize|evolve', [ ('n', 'dry-run', False, 'Do nothing but printing what should be done'), ('A', 'any', False, 'Stabilize unstable change on any topological branch'), @@ -341,7 +347,7 @@ return 1 -@command('^kill', +@command('^kill|obsolete', [ ('n', 'new', [], _("New changeset that justify this one to be killed")) ],