Mercurial > hg
comparison mercurial/store.py @ 17587:5fb8cf6f4f58
store: reorder basename assignment in _hybridencode
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 16 Sep 2012 11:35:55 +0200 |
parents | 2f1475da1940 |
children | 3d789dd72316 |
comparison
equal
deleted
inserted
replaced
17586:2f1475da1940 | 17587:5fb8cf6f4f58 |
---|---|
199 res = '/'.join(auxencode(encodefilename(path))) | 199 res = '/'.join(auxencode(encodefilename(path))) |
200 if len(res) > _maxstorepathlen: | 200 if len(res) > _maxstorepathlen: |
201 path = encodedir(path) | 201 path = encodedir(path) |
202 digest = _sha(path).hexdigest() | 202 digest = _sha(path).hexdigest() |
203 parts = auxencode(lowerencode(path))[1:] | 203 parts = auxencode(lowerencode(path))[1:] |
204 _root, ext = os.path.splitext(parts[-1]) | |
205 basename = parts[-1] | 204 basename = parts[-1] |
205 _root, ext = os.path.splitext(basename) | |
206 sdirs = [] | 206 sdirs = [] |
207 for p in parts[:-1]: | 207 for p in parts[:-1]: |
208 d = p[:_dirprefixlen] | 208 d = p[:_dirprefixlen] |
209 if d[-1] in '. ': | 209 if d[-1] in '. ': |
210 # Windows can't access dirs ending in period or space | 210 # Windows can't access dirs ending in period or space |