mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
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.
This commit is contained in:
parent
107254a73d
commit
dfd6e44ebe
@ -329,13 +329,13 @@ class cg1unpacker(object):
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user