##// END OF EJS Templates
changegroup: fix the scope of a try finally...
Pierre-Yves David -
r26880:fa7f8b68 stable
parent child Browse files
Show More
@@ -322,19 +322,19 b' class cg1unpacker(object):'
322 changesets = files = revisions = 0
322 changesets = files = revisions = 0
323
323
324 tr = repo.transaction("\n".join([srctype, util.hidepassword(url)]))
324 tr = repo.transaction("\n".join([srctype, util.hidepassword(url)]))
325 # The transaction could have been created before and already
325 try:
326 # carries source information. In this case we use the top
326 # The transaction could have been created before and already
327 # level data. We overwrite the argument because we need to use
327 # carries source information. In this case we use the top
328 # the top level value (if they exist) in this function.
328 # level data. We overwrite the argument because we need to use
329 srctype = tr.hookargs.setdefault('source', srctype)
329 # the top level value (if they exist) in this function.
330 url = tr.hookargs.setdefault('url', url)
330 srctype = tr.hookargs.setdefault('source', srctype)
331 url = tr.hookargs.setdefault('url', url)
331
332
332 # write changelog data to temp files so concurrent readers will not see
333 # write changelog data to temp files so concurrent readers
333 # inconsistent view
334 # will not see an inconsistent view
334 cl = repo.changelog
335 cl = repo.changelog
335 cl.delayupdate(tr)
336 cl.delayupdate(tr)
336 oldheads = cl.heads()
337 oldheads = cl.heads()
337 try:
338 repo.hook('prechangegroup', throw=True, **tr.hookargs)
338 repo.hook('prechangegroup', throw=True, **tr.hookargs)
339
339
340 trp = weakref.proxy(tr)
340 trp = weakref.proxy(tr)
General Comments 0
You need to be logged in to leave comments. Login now