comparison mercurial/store.py @ 18430:0459c6555f69

store: implement lowerencode in C
author Bryan O'Sullivan <bryano@fb.com>
date Wed, 12 Dec 2012 13:09:33 -0800
parents b35e3364f94a
children 8c019d2fd7c0
comparison
equal deleted inserted replaced
18429:e9ea0f0f05e7 18430:0459c6555f69
130 cmap[chr(x)] = "~%02x" % x 130 cmap[chr(x)] = "~%02x" % x
131 for x in range(ord("A"), ord("Z") + 1): 131 for x in range(ord("A"), ord("Z") + 1):
132 cmap[chr(x)] = chr(x).lower() 132 cmap[chr(x)] = chr(x).lower()
133 return lambda s: "".join([cmap[c] for c in s]) 133 return lambda s: "".join([cmap[c] for c in s])
134 134
135 lowerencode = _buildlowerencodefun() 135 lowerencode = getattr(parsers, 'lowerencode', None) or _buildlowerencodefun()
136 136
137 # Windows reserved names: con, prn, aux, nul, com1..com9, lpt1..lpt9 137 # Windows reserved names: con, prn, aux, nul, com1..com9, lpt1..lpt9
138 _winres3 = ('aux', 'con', 'prn', 'nul') # length 3 138 _winres3 = ('aux', 'con', 'prn', 'nul') # length 3
139 _winres4 = ('com', 'lpt') # length 4 (with trailing 1..9) 139 _winres4 = ('com', 'lpt') # length 4 (with trailing 1..9)
140 def _auxencode(path, dotencode): 140 def _auxencode(path, dotencode):