##// END OF EJS Templates
with: use context manager in streamclone consumev1
Bryan O'Sullivan -
r27859:f55a5ace default
parent child Browse files
Show More
@@ -290,8 +290,7 b' def consumev1(repo, fp, filecount, bytec'
290 290 Like "streamout," the status line added by the wire protocol is not handled
291 291 by this function.
292 292 """
293 lock = repo.lock()
294 try:
293 with repo.lock():
295 294 repo.ui.status(_('%d files to transfer, %s of data\n') %
296 295 (filecount, util.bytecount(bytecount)))
297 296 handled_bytes = 0
@@ -333,8 +332,6 b' def consumev1(repo, fp, filecount, bytec'
333 332 repo.ui.status(_('transferred %s in %.1f seconds (%s/sec)\n') %
334 333 (util.bytecount(bytecount), elapsed,
335 334 util.bytecount(bytecount / elapsed)))
336 finally:
337 lock.release()
338 335
339 336 def applybundlev1(repo, fp):
340 337 """Apply the content from a stream clone bundle version 1.
General Comments 0
You need to be logged in to leave comments. Login now