Mercurial > hg
changeset 17609:cbc180cfd60b
store: reuse direncoded path in _hybridencode
For a netbeans clone on Windows 7 x64:
Before:
$ hg perffncacheencode
! wall 3.516000 comb 3.525623 user 3.525623 sys 0.000000 (best of 3)
After:
$ hg perffncacheencode
! wall 3.443000 comb 3.447622 user 3.447622 sys 0.000000 (best of 3)
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 18 Sep 2012 19:51:59 +0200 |
parents | 776240123525 |
children | d0afa149e059 |
files | mercurial/store.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/store.py Tue Sep 18 19:51:48 2012 +0200 +++ b/mercurial/store.py Tue Sep 18 19:51:59 2012 +0200 @@ -215,10 +215,10 @@ The string 'data/' at the beginning is replaced with 'dh/', if the hashed encoding was used. ''' - ef = encodefilename(path).split('/') + path = encodedir(path) + ef = _encodefname(path).split('/') res = '/'.join(_auxencode(ef, dotencode)) if len(res) > _maxstorepathlen: - path = encodedir(path) digest = _sha(path).hexdigest() le = lowerencode(path).split('/')[1:] parts = _auxencode(le, dotencode)