##// 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 322 changesets = files = revisions = 0
323 323
324 324 tr = repo.transaction("\n".join([srctype, util.hidepassword(url)]))
325 # The transaction could have been created before and already
326 # carries source information. In this case we use the top
327 # level data. We overwrite the argument because we need to use
328 # the top level value (if they exist) in this function.
329 srctype = tr.hookargs.setdefault('source', srctype)
330 url = tr.hookargs.setdefault('url', url)
325 try:
326 # The transaction could have been created before and already
327 # carries source information. In this case we use the top
328 # level data. We overwrite the argument because we need to use
329 # the top level value (if they exist) in this function.
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 # inconsistent view
334 cl = repo.changelog
335 cl.delayupdate(tr)
336 oldheads = cl.heads()
337 try:
333 # write changelog data to temp files so concurrent readers
334 # will not see an inconsistent view
335 cl = repo.changelog
336 cl.delayupdate(tr)
337 oldheads = cl.heads()
338 338 repo.hook('prechangegroup', throw=True, **tr.hookargs)
339 339
340 340 trp = weakref.proxy(tr)
General Comments 0
You need to be logged in to leave comments. Login now