comparison hgext/remotefilelog/constants.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 fc2766860796
children 687b865b95ad
comparison
equal deleted inserted replaced
43075:57875cf423c9 43076:2372284d9457
20 NODECOUNTSIZE = struct.calcsize(NODECOUNTSTRUCT) 20 NODECOUNTSIZE = struct.calcsize(NODECOUNTSTRUCT)
21 21
22 PATHCOUNTSTRUCT = '!I' 22 PATHCOUNTSTRUCT = '!I'
23 PATHCOUNTSIZE = struct.calcsize(PATHCOUNTSTRUCT) 23 PATHCOUNTSIZE = struct.calcsize(PATHCOUNTSTRUCT)
24 24
25 FILEPACK_CATEGORY="" 25 FILEPACK_CATEGORY = ""
26 TREEPACK_CATEGORY="manifests" 26 TREEPACK_CATEGORY = "manifests"
27 27
28 ALL_CATEGORIES = [FILEPACK_CATEGORY, TREEPACK_CATEGORY] 28 ALL_CATEGORIES = [FILEPACK_CATEGORY, TREEPACK_CATEGORY]
29 29
30 # revision metadata keys. must be a single character. 30 # revision metadata keys. must be a single character.
31 METAKEYFLAG = 'f' # revlog flag 31 METAKEYFLAG = 'f' # revlog flag
32 METAKEYSIZE = 's' # full rawtext size 32 METAKEYSIZE = 's' # full rawtext size
33 33
34
34 def getunits(category): 35 def getunits(category):
35 if category == FILEPACK_CATEGORY: 36 if category == FILEPACK_CATEGORY:
36 return _("files") 37 return _("files")
37 if category == TREEPACK_CATEGORY: 38 if category == TREEPACK_CATEGORY:
38 return _("trees") 39 return _("trees")
39 40
41
40 # Repack options passed to ``markledger``. 42 # Repack options passed to ``markledger``.
41 OPTION_PACKSONLY = 'packsonly' 43 OPTION_PACKSONLY = 'packsonly'