[PATCH 0 of 5] Patches and new win32mbcs extension
Alexis S. L. Carvalho
alexis at cecm.usp.br
Thu Feb 14 07:21:25 CST 2008
I have two questions about these changes, just to make sure I won't
break things:
Thus spake Shun-ichi Goto:
> 1) (first 4 patches)
> Remove/alternate codes using os.sep to use existing/new functions.
> These change is intended to allow to be hooked by win32mbcs extension.
>
> For example:
> s.replace('\\', '/') => util.normpath(s) ... use existing function
Would it be enough to use util.pconvert instead of normpath? You did
wrap pconvert (through splitpath), pconvert is the more natural
equivalent of that s.replace(...) and some places may not want/need
normalization.
> s.split(os.sep) => util.splitpath(s) ... use new function
> s.endswith(os.sep) => util.endswithsep(s) ... use new function
Can I assume this piece of code works as an alternative to os.path.join?
def join(root, name):
if not util.endswithsep(root):
root += os.sep
return root + filename
os.lstat(join(root, name))
Thanks
Alexis
More information about the Mercurial-devel
mailing list