Mercurial > hg
changeset 16076:e7701459fb42
windows: use 'str.replace()' instead of combination of split() and join()
'str.replace()' is twice (or more) as fast as combination of split()
and join().
combination of split() and join() in current 'util.pconvert()'
implementation comes only from historical reason when win32mbcs
extension was introduced.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 05 Feb 2012 22:58:31 +0900 |
parents | d2e8e79a6361 |
children | 838907058cfd |
files | mercurial/windows.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/windows.py Mon Feb 06 12:16:29 2012 +0900 +++ b/mercurial/windows.py Sun Feb 05 22:58:31 2012 +0900 @@ -123,7 +123,7 @@ msvcrt.setmode(fno(), os.O_BINARY) def pconvert(path): - return '/'.join(path.split(os.sep)) + return path.replace(os.sep, '/') def localpath(path): return path.replace('/', '\\')