Mercurial > hg
comparison hgext/clonebundles.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 | b4d85bc122bd |
children | 687b865b95ad |
comparison
equal
deleted
inserted
replaced
43075:57875cf423c9 | 43076:2372284d9457 |
---|---|
201 wireprotov1server, | 201 wireprotov1server, |
202 ) | 202 ) |
203 | 203 |
204 testedwith = 'ships-with-hg-core' | 204 testedwith = 'ships-with-hg-core' |
205 | 205 |
206 | |
206 def capabilities(orig, repo, proto): | 207 def capabilities(orig, repo, proto): |
207 caps = orig(repo, proto) | 208 caps = orig(repo, proto) |
208 | 209 |
209 # Only advertise if a manifest exists. This does add some I/O to requests. | 210 # Only advertise if a manifest exists. This does add some I/O to requests. |
210 # But this should be cheaper than a wasted network round trip due to | 211 # But this should be cheaper than a wasted network round trip due to |
212 if repo.vfs.exists('clonebundles.manifest'): | 213 if repo.vfs.exists('clonebundles.manifest'): |
213 caps.append('clonebundles') | 214 caps.append('clonebundles') |
214 | 215 |
215 return caps | 216 return caps |
216 | 217 |
218 | |
217 def extsetup(ui): | 219 def extsetup(ui): |
218 extensions.wrapfunction(wireprotov1server, '_capabilities', capabilities) | 220 extensions.wrapfunction(wireprotov1server, '_capabilities', capabilities) |