Mercurial > public > mercurial-scm > hg
comparison mercurial/store.py @ 17585:8ed2783f338f
store: remove uneeded startswith('data/') check in _hybridencode()
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sat, 15 Sep 2012 21:43:56 +0200 |
parents | 61cd71dc3797 |
children | 2f1475da1940 |
comparison
equal
deleted
inserted
replaced
17584:61cd71dc3797 | 17585:8ed2783f338f |
---|---|
196 The extension (e.g. '.i' or '.d') is preserved. | 196 The extension (e.g. '.i' or '.d') is preserved. |
197 | 197 |
198 The string 'data/' at the beginning is replaced with 'dh/', if the hashed | 198 The string 'data/' at the beginning is replaced with 'dh/', if the hashed |
199 encoding was used. | 199 encoding was used. |
200 ''' | 200 ''' |
201 if not path.startswith('data/'): | |
202 return path | |
203 res = '/'.join(auxencode(encodefilename(path))) | 201 res = '/'.join(auxencode(encodefilename(path))) |
204 if len(res) > _maxstorepathlen: | 202 if len(res) > _maxstorepathlen: |
205 path = encodedir(path) | 203 path = encodedir(path) |
206 digest = _sha(path).hexdigest() | 204 digest = _sha(path).hexdigest() |
207 parts = auxencode(lowerencode(path))[1:] | 205 parts = auxencode(lowerencode(path))[1:] |