Mercurial > public > mercurial-scm > hg
diff hgext/largefiles/lfcommands.py @ 36311:b9da10f310f4
largfiles: replace filter() with listcomp when result needs to be a list
filter() is a generator on Python 3, but these cases are used as lists.
Differential Revision: https://phab.mercurial-scm.org/D2339
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 18 Feb 2018 14:28:31 -0500 |
parents | 4aa6ed598323 |
children | 25136e03012e |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Sun Feb 18 14:25:03 2018 -0500 +++ b/hgext/largefiles/lfcommands.py Sun Feb 18 14:28:31 2018 -0500 @@ -365,7 +365,7 @@ at = 0 ui.debug("sending statlfile command for %d largefiles\n" % len(files)) retval = store.exists(files) - files = filter(lambda h: not retval[h], files) + files = [h for h in files if not retval[h]] ui.debug("%d largefiles need to be uploaded\n" % len(files)) for hash in files: