comparison mercurial/merge.py @ 44150:ff22c76825b9

merge: don't call update hook when using in-memory context I'm pretty sure many hook implementors will assume that they can inspect the working copy and/or dirstate parents when the hook is called, so I don't think we should call the hook when using an in-memory context. The new behavior matches that of the preupdate hook. Differential Revision: https://phab.mercurial-scm.org/D7898
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 15 Jan 2020 15:07:43 -0800
parents 833210fbd900
children d1c0f239193f
comparison
equal deleted inserted replaced
44149:50e7ce1f96d1 44150:ff22c76825b9
2572 # If we're updating to a location, clean up any stale temporary includes 2572 # If we're updating to a location, clean up any stale temporary includes
2573 # (ex: this happens during hg rebase --abort). 2573 # (ex: this happens during hg rebase --abort).
2574 if not branchmerge: 2574 if not branchmerge:
2575 sparse.prunetemporaryincludes(repo) 2575 sparse.prunetemporaryincludes(repo)
2576 2576
2577 if not partial: 2577 if updatedirstate:
2578 repo.hook( 2578 repo.hook(
2579 b'update', parent1=xp1, parent2=xp2, error=stats.unresolvedcount 2579 b'update', parent1=xp1, parent2=xp2, error=stats.unresolvedcount
2580 ) 2580 )
2581 return stats 2581 return stats
2582 2582