423 action += manifestmerge(repo, wc, p2, pa, overwrite, partial) |
423 action += manifestmerge(repo, wc, p2, pa, overwrite, partial) |
424 |
424 |
425 ### apply phase |
425 ### apply phase |
426 |
426 |
427 if not branchmerge: |
427 if not branchmerge: |
428 # we don't need to do any magic, just jump to the new rev |
428 # just jump to the new rev |
429 p1, p2 = p2, repo.changectx(nullid) |
429 fp1, fp2, xp1, xp2 = p2.node(), nullid, str(p2), '' |
430 |
430 else: |
431 xp1, xp2 = str(p1), str(p2) |
431 fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) |
432 if not p2: xp2 = '' |
432 |
433 |
433 if not partial: |
434 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
434 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
435 |
435 |
436 updated, merged, removed, unresolved = applyupdates(repo, action, xp1, xp2) |
436 updated, merged, removed, unresolved = applyupdates(repo, action, xp1, xp2) |
437 |
437 |
438 # update dirstate |
438 # update dirstate |
439 if not partial: |
439 if not partial: |
440 recordupdates(repo, action, branchmerge) |
440 recordupdates(repo, action, branchmerge) |
441 repo.dirstate.setparents(p1.node(), p2.node()) |
441 repo.dirstate.setparents(fp1, fp2) |
|
442 repo.hook('update', parent1=xp1, parent2=xp2, error=unresolved) |
442 |
443 |
443 if show_stats: |
444 if show_stats: |
444 stats = ((updated, _("updated")), |
445 stats = ((updated, _("updated")), |
445 (merged - unresolved, _("merged")), |
446 (merged - unresolved, _("merged")), |
446 (removed, _("removed")), |
447 (removed, _("removed")), |