##// END OF EJS Templates
merge: don't call hooks for revert...
Matt Mackall -
r3296:20087b4b default
parent child Browse files
Show More
@@ -425,12 +425,12 def update(repo, node, branchmerge=False
425 425 ### apply phase
426 426
427 427 if not branchmerge:
428 # we don't need to do any magic, just jump to the new rev
429 p1, p2 = p2, repo.changectx(nullid)
428 # just jump to the new rev
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)
432 if not p2: xp2 = ''
433
433 if not partial:
434 434 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2)
435 435
436 436 updated, merged, removed, unresolved = applyupdates(repo, action, xp1, xp2)
@@ -438,7 +438,8 def update(repo, node, branchmerge=False
438 438 # update dirstate
439 439 if not partial:
440 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 444 if show_stats:
444 445 stats = ((updated, _("updated")),
@@ -461,6 +462,5 def update(repo, node, branchmerge=False
461 462 repo.ui.status(_("There are unresolved merges with"
462 463 " locally modified files.\n"))
463 464
464 repo.hook('update', parent1=xp1, parent2=xp2, error=unresolved)
465 465 return unresolved
466 466
General Comments 0
You need to be logged in to leave comments. Login now