comparison mercurial/store.py @ 17573:fb8658ad9e8d

store: eliminate unneded last assignment to n in _auxencode() The check for period or space at the end of the string is the last one, the local variable n is thus not used anymore.
author Adrian Buehlmann <adrian@cadifra.com>
date Sat, 15 Sep 2012 21:42:58 +0200
parents b644287e79a8
children 81a033bb29bc
comparison
equal deleted inserted replaced
17572:b644287e79a8 17573:fb8658ad9e8d
159 ec = "~%02x" % ord(n[2]) 159 ec = "~%02x" % ord(n[2])
160 n = n[0:2] + ec + n[3:] 160 n = n[0:2] + ec + n[3:]
161 res[i] = n 161 res[i] = n
162 if n[-1] in '. ': 162 if n[-1] in '. ':
163 # encode last period or space ('foo...' -> 'foo..~2e') 163 # encode last period or space ('foo...' -> 'foo..~2e')
164 n = n[:-1] + "~%02x" % ord(n[-1]) 164 res[i] = n[:-1] + "~%02x" % ord(n[-1])
165 res[i] = n
166 return '/'.join(res) 165 return '/'.join(res)
167 166
168 _maxstorepathlen = 120 167 _maxstorepathlen = 120
169 _dirprefixlen = 8 168 _dirprefixlen = 8
170 _maxshortdirslen = 8 * (_dirprefixlen + 1) - 4 169 _maxshortdirslen = 8 * (_dirprefixlen + 1) - 4