comparison hgext/evolve.py @ 298:f597421662f7

obsolete: unify collapsed revisions markers handling When collapsing A, B and C into D, amend was registering: A -> D B -> D A -> B C -> D A -> C while the rebase wrapper was doing: A -> D B -> D C -> D At this point, I have no argument to favor one or another or even a new one like: A -> B B -> C C -> D so I am aligning the rebase implementation on the older amend one. At least we can now change them all at once.
author Patrick Mezard <patrick@mezard.eu>
date Thu, 21 Jun 2012 19:58:57 +0200
parents a5894bb97909
children 8529b4b95f5d
comparison
equal deleted inserted replaced
297:590ac023c536 298:f597421662f7
140 if bm: 140 if bm:
141 repo._bookmarks[bm] = newid 141 repo._bookmarks[bm] = newid
142 bookmarks.write(repo) 142 bookmarks.write(repo)
143 143
144 # add evolution metadata 144 # add evolution metadata
145 repo.addobsolete(new.node(), old.node()) 145 collapsed = set([u.node() for u in updates] + [old.node()])
146 for u in updates: 146 repo.addcollapsedobsolete(collapsed, new.node())
147 repo.addobsolete(u.node(), old.node())
148 repo.addobsolete(new.node(), u.node())
149 oldbookmarks = repo.nodebookmarks(old.node()) 147 oldbookmarks = repo.nodebookmarks(old.node())
150 for book in oldbookmarks: 148 for book in oldbookmarks:
151 repo._bookmarks[book] = new.node() 149 repo._bookmarks[book] = new.node()
152 if oldbookmarks: 150 if oldbookmarks:
153 bookmarks.write(repo) 151 bookmarks.write(repo)