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