##// END OF EJS Templates
phabricator: use context manager form of progress in uploadchunks...
Ian Moody -
r43810:a78a65c3 default
parent child Browse files
Show More
@@ -609,9 +609,9 b' def uploadchunks(fctx, fphid):'
609 """
609 """
610 ui = fctx.repo().ui
610 ui = fctx.repo().ui
611 chunks = callconduit(ui, b'file.querychunks', {b'filePHID': fphid})
611 chunks = callconduit(ui, b'file.querychunks', {b'filePHID': fphid})
612 progress = ui.makeprogress(
612 with ui.makeprogress(
613 _(b'uploading file chunks'), unit=_(b'chunks'), total=len(chunks)
613 _(b'uploading file chunks'), unit=_(b'chunks'), total=len(chunks)
614 )
614 ) as progress:
615 for chunk in chunks:
615 for chunk in chunks:
616 progress.increment()
616 progress.increment()
617 if chunk[b'complete']:
617 if chunk[b'complete']:
@@ -628,7 +628,6 b' def uploadchunks(fctx, fphid):'
628 b'dataEncoding': b'base64',
628 b'dataEncoding': b'base64',
629 },
629 },
630 )
630 )
631 progress.complete()
632
631
633
632
634 def uploadfile(fctx):
633 def uploadfile(fctx):
General Comments 0
You need to be logged in to leave comments. Login now