Show More
@@ -425,20 +425,21 b' def update(repo, node, branchmerge=False' | |||||
425 | ### apply phase |
|
425 | ### apply phase | |
426 |
|
426 | |||
427 | if not branchmerge: |
|
427 | if not branchmerge: | |
428 |
# |
|
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 | else: | |||
|
431 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) | |||
430 |
|
432 | |||
431 | xp1, xp2 = str(p1), str(p2) |
|
433 | if not partial: | |
432 | if not p2: xp2 = '' |
|
434 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) | |
433 |
|
||||
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 |
|
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")), | |
@@ -461,6 +462,5 b' def update(repo, node, branchmerge=False' | |||||
461 | repo.ui.status(_("There are unresolved merges with" |
|
462 | repo.ui.status(_("There are unresolved merges with" | |
462 | " locally modified files.\n")) |
|
463 | " locally modified files.\n")) | |
463 |
|
464 | |||
464 | repo.hook('update', parent1=xp1, parent2=xp2, error=unresolved) |
|
|||
465 | return unresolved |
|
465 | return unresolved | |
466 |
|
466 |
General Comments 0
You need to be logged in to leave comments.
Login now