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.
--- 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('/', '\\')