Mercurial > hg
diff mercurial/changegroup.py @ 26881:6b1ea6961554 stable
changegroup: call 'prechangegroup' hook before setting up write delay
The 'prechangegroup' interfere with 'delayupdate' logic because it trigger the
one time call of 'changelog._writepending' (see issure4934). There is no reason
not to call that hook before setting up 'delayupdate' so we move the call a bit
earlier to avoid interference.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 06 Nov 2015 12:59:09 -0500 |
parents | fa7f8b686633 |
children | c4895f9b8ab1 |
line wrap: on
line diff
--- a/mercurial/changegroup.py Fri Nov 06 12:39:06 2015 -0500 +++ b/mercurial/changegroup.py Fri Nov 06 12:59:09 2015 -0500 @@ -329,13 +329,13 @@ # the top level value (if they exist) in this function. srctype = tr.hookargs.setdefault('source', srctype) url = tr.hookargs.setdefault('url', url) + repo.hook('prechangegroup', throw=True, **tr.hookargs) # write changelog data to temp files so concurrent readers # will not see an inconsistent view cl = repo.changelog cl.delayupdate(tr) oldheads = cl.heads() - repo.hook('prechangegroup', throw=True, **tr.hookargs) trp = weakref.proxy(tr) # pull off the changeset group