comparison hgext/evolution.py @ 108:85271a8a7fb9

Properly inherit phase of relocated changeset.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Mon, 19 Dec 2011 12:18:04 +0100
parents 6c3c7a18f079
children 3bdabdbb4140
comparison
equal deleted inserted replaced
107:f45325da7970 108:85271a8a7fb9
128 repo[rev].p2().node()) 128 repo[rev].p2().node())
129 rebase.rebasenode(repo, rev, dest, {node.nullrev: node.nullrev}) 129 rebase.rebasenode(repo, rev, dest, {node.nullrev: node.nullrev})
130 nodenew = rebase.concludenode(repo, rev, dest, node.nullid) 130 nodenew = rebase.concludenode(repo, rev, dest, node.nullid)
131 nodesrc = repo.changelog.node(rev) 131 nodesrc = repo.changelog.node(rev)
132 repo.addobsolete(nodenew, nodesrc) 132 repo.addobsolete(nodenew, nodesrc)
133 repo.setstate(repo.nodestate(nodesrc), [nodenew])
133 oldbookmarks = repo.nodebookmarks(nodesrc) 134 oldbookmarks = repo.nodebookmarks(nodesrc)
134 for book in oldbookmarks: 135 for book in oldbookmarks:
135 repo._bookmarks[book] = nodenew 136 repo._bookmarks[book] = nodenew
136 if oldbookmarks: 137 if oldbookmarks:
137 bookmarks.write(repo) 138 bookmarks.write(repo)
291 # perform amend 292 # perform amend
292 newid = rewrite(repo, old, updates, head, 293 newid = rewrite(repo, old, updates, head,
293 [old.p1().node(), old.p2().node()], opts) 294 [old.p1().node(), old.p2().node()], opts)
294 295
295 # reroute the working copy parent to the new changeset 296 # reroute the working copy parent to the new changeset
297 repo.setstate(repo.nodestate(old.node()), [newid])
296 repo.dirstate.setparents(newid, node.nullid) 298 repo.dirstate.setparents(newid, node.nullid)
297 299
298 finally: 300 finally:
299 wlock.release() 301 wlock.release()