equal
deleted
inserted
replaced
257 "evolve.interrupted`")) |
257 "evolve.interrupted`")) |
258 |
258 |
259 return _resolvephasedivergent(ui, repo, prec, bumped, tmpctx) |
259 return _resolvephasedivergent(ui, repo, prec, bumped, tmpctx) |
260 |
260 |
261 def _resolvephasedivergent(ui, repo, prec, bumped, tmpctx=None): |
261 def _resolvephasedivergent(ui, repo, prec, bumped, tmpctx=None): |
|
262 """final step of a phase divergence resolution |
|
263 |
|
264 This will create a new changesets (or nothing when applicable), the two |
|
265 changesets needs to be on the same parents. |
|
266 |
|
267 XXX we should deal with all tmpctx business before callin this function and |
|
268 pass tmpctx as bumped directly |
|
269 """ |
262 |
270 |
263 tr = repo.currenttransaction() |
271 tr = repo.currenttransaction() |
264 assert tr is not None |
272 assert tr is not None |
265 bmupdate = _bookmarksupdater(repo, bumped.node(), tr) |
273 bmupdate = _bookmarksupdater(repo, bumped.node(), tr) |
266 newid = None |
274 newid = None |
270 # changeset |
278 # changeset |
271 rebasedbmupdate = None |
279 rebasedbmupdate = None |
272 if tmpctx and tmpctx.node() != bumped.node(): |
280 if tmpctx and tmpctx.node() != bumped.node(): |
273 rebasedbmupdate = _bookmarksupdater(repo, tmpctx.node(), tr) |
281 rebasedbmupdate = _bookmarksupdater(repo, tmpctx.node(), tr) |
274 bumped = tmpctx |
282 bumped = tmpctx |
|
283 |
|
284 cl = repo.changelog |
|
285 prec_parent = cl.parentrevs(prec.rev()) |
|
286 bump_parent = cl.parentrevs(bumped.rev()) |
|
287 assert prec_parent == bump_parent, (prec_parent, bump_parent) |
275 |
288 |
276 # Create the new commit context |
289 # Create the new commit context |
277 files = set() |
290 files = set() |
278 copied = copies.pathcopies(prec, bumped) |
291 copied = copies.pathcopies(prec, bumped) |
279 precmanifest = prec.manifest().copy() |
292 precmanifest = prec.manifest().copy() |