Mercurial > hg
diff hgext/largefiles/storefactory.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | 876494fd967d |
children | 687b865b95ad |
line wrap: on
line diff
--- a/hgext/largefiles/storefactory.py Sat Oct 05 10:29:34 2019 -0400 +++ b/hgext/largefiles/storefactory.py Sun Oct 06 09:45:02 2019 -0400 @@ -53,7 +53,7 @@ path = util.safehasattr(remote, 'url') and remote.url() or remote.path match = _scheme_re.match(path) - if not match: # regular filesystem path + if not match: # regular filesystem path scheme = 'file' else: scheme = match.group(1) @@ -69,17 +69,21 @@ except lfutil.storeprotonotcapable: pass - raise error.Abort(_('%s does not appear to be a largefile store') % - util.hidepassword(path)) + raise error.Abort( + _('%s does not appear to be a largefile store') + % util.hidepassword(path) + ) + _storeprovider = { - 'file': [localstore.localstore], - 'http': [wirestore.wirestore], + 'file': [localstore.localstore], + 'http': [wirestore.wirestore], 'https': [wirestore.wirestore], 'ssh': [wirestore.wirestore], - } +} _scheme_re = re.compile(br'^([a-zA-Z0-9+-.]+)://') + def getlfile(ui, hash): return util.chunkbuffer(openstore(ui=ui)._get(hash))