Show More
@@ -405,8 +405,7 b' class _gitlfsremote(object):' | |||
|
405 | 405 | if len(objects) > 1: |
|
406 | 406 | self.ui.note(_('lfs: need to transfer %d objects (%s)\n') |
|
407 | 407 | % (len(objects), util.bytecount(total))) |
|
408 | progress = self.ui.makeprogress(topic, total=total) | |
|
409 | progress.update(0) | |
|
408 | ||
|
410 | 409 | def transfer(chunk): |
|
411 | 410 | for obj in chunk: |
|
412 | 411 | objsize = obj.get('size', 0) |
@@ -439,14 +438,15 b' class _gitlfsremote(object):' | |||
|
439 | 438 | else: |
|
440 | 439 | oids = transfer(sorted(objects, key=lambda o: o.get('oid'))) |
|
441 | 440 | |
|
442 | processed = 0 | |
|
443 | blobs = 0 | |
|
444 | for _one, oid in oids: | |
|
445 |
|
|
|
446 | blobs += 1 | |
|
447 | progress.update(processed) | |
|
448 | self.ui.note(_('lfs: processed: %s\n') % oid) | |
|
449 |
progress. |
|
|
441 | with self.ui.makeprogress(topic, total=total) as progress: | |
|
442 | progress.update(0) | |
|
443 | processed = 0 | |
|
444 | blobs = 0 | |
|
445 | for _one, oid in oids: | |
|
446 | processed += sizes[oid] | |
|
447 | blobs += 1 | |
|
448 | progress.update(processed) | |
|
449 | self.ui.note(_('lfs: processed: %s\n') % oid) | |
|
450 | 450 | |
|
451 | 451 | if blobs > 0: |
|
452 | 452 | if action == 'upload': |
@@ -344,17 +344,14 b' def extractpointers(repo, revs):' | |||
|
344 | 344 | repo.ui.debug('lfs: computing set of blobs to upload\n') |
|
345 | 345 | pointers = {} |
|
346 | 346 | |
|
347 | progress = repo.ui.makeprogress(_('lfs search'), _('changesets'), len(revs)) | |
|
348 | ||
|
349 | try: | |
|
347 | makeprogress = repo.ui.makeprogress | |
|
348 | with makeprogress(_('lfs search'), _('changesets'), len(revs)) as progress: | |
|
350 | 349 | for r in revs: |
|
351 | 350 | ctx = repo[r] |
|
352 | 351 | for p in pointersfromctx(ctx).values(): |
|
353 | 352 | pointers[p.oid()] = p |
|
354 | 353 | progress.increment() |
|
355 | 354 | return sorted(pointers.values()) |
|
356 | finally: | |
|
357 | progress.complete() | |
|
358 | 355 | |
|
359 | 356 | def pointerfromctx(ctx, f, removed=False): |
|
360 | 357 | """return a pointer for the named file from the given changectx, or None if |
General Comments 0
You need to be logged in to leave comments.
Login now