Mercurial > hg
comparison hgext/infinitepush/common.py @ 43077:687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Done with
python3.7 contrib/byteify-strings.py -i $(hg files 'set:mercurial/**.py - mercurial/thirdparty/** + hgext/**.py - hgext/fsmonitor/pywatchman/** - mercurial/__init__.py')
black -l 80 -t py33 -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**')
# skip-blame mass-reformatting only
Differential Revision: https://phab.mercurial-scm.org/D6972
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:48:39 -0400 |
parents | 2372284d9457 |
children | 9f70512ae2cf |
comparison
equal
deleted
inserted
replaced
43076:2372284d9457 | 43077:687b865b95ad |
---|---|
15 pycompat, | 15 pycompat, |
16 ) | 16 ) |
17 | 17 |
18 | 18 |
19 def isremotebooksenabled(ui): | 19 def isremotebooksenabled(ui): |
20 return 'remotenames' in extensions._extensions and ui.configbool( | 20 return b'remotenames' in extensions._extensions and ui.configbool( |
21 'remotenames', 'bookmarks' | 21 b'remotenames', b'bookmarks' |
22 ) | 22 ) |
23 | 23 |
24 | 24 |
25 def downloadbundle(repo, unknownbinhead): | 25 def downloadbundle(repo, unknownbinhead): |
26 index = repo.bundlestore.index | 26 index = repo.bundlestore.index |
27 store = repo.bundlestore.store | 27 store = repo.bundlestore.store |
28 bundleid = index.getbundle(hex(unknownbinhead)) | 28 bundleid = index.getbundle(hex(unknownbinhead)) |
29 if bundleid is None: | 29 if bundleid is None: |
30 raise error.Abort('%s head is not known' % hex(unknownbinhead)) | 30 raise error.Abort(b'%s head is not known' % hex(unknownbinhead)) |
31 bundleraw = store.read(bundleid) | 31 bundleraw = store.read(bundleid) |
32 return _makebundlefromraw(bundleraw) | 32 return _makebundlefromraw(bundleraw) |
33 | 33 |
34 | 34 |
35 def _makebundlefromraw(data): | 35 def _makebundlefromraw(data): |