hgext/lfs/wrapper.py
changeset 39389 b26350d9d7b5
parent 39270 37e56607cbb9
child 39849 d3d4b4b5f725
equal deleted inserted replaced
39388:ddfd80029306 39389:b26350d9d7b5
   342 def extractpointers(repo, revs):
   342 def extractpointers(repo, revs):
   343     """return a list of lfs pointers added by given revs"""
   343     """return a list of lfs pointers added by given 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
   361     the file isn't LFS.
   358     the file isn't LFS.
   362 
   359