[PATCH] lfs: add a progress bar when searching for blobs to upload

Yuya Nishihara yuya at tcha.org
Sat Aug 25 04:21:27 EDT 2018


On Fri, 24 Aug 2018 18:18:32 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1535147146 14400
> #      Fri Aug 24 17:45:46 2018 -0400
> # Node ID 76eca3ae345b261c0049d16269cdf991a31af21a
> # Parent  c9a3f7f5c0235e3ae35135818c48ec5ea006de37
> lfs: add a progress bar when searching for blobs to upload

Queued, thanks.

> --- a/hgext/lfs/wrapper.py
> +++ b/hgext/lfs/wrapper.py
> @@ -343,11 +343,18 @@ def extractpointers(repo, revs):
>      """return a list of lfs pointers added by given revs"""
>      repo.ui.debug('lfs: computing set of blobs to upload\n')
>      pointers = {}
> -    for r in revs:
> -        ctx = repo[r]
> -        for p in pointersfromctx(ctx).values():
> -            pointers[p.oid()] = p
> -    return sorted(pointers.values())
> +
> +    progress = repo.ui.makeprogress(_('lfs search'), _('changesets'), len(revs))
> +
> +    try:

This could be "with ... as progress:", but I have no preference.


More information about the Mercurial-devel mailing list