[PATCH] Support MBCS for fspath() and checkcase()

Shun-ichi GOTO shunichi.goto at gmail.com
Mon Jul 28 11:37:10 CDT 2008


2008/7/29 Matt Mackall <mpm at selenic.com>:
> Uninstall? When does that happen? Oh, it doesn't.

Yeah, it's not worth. It is used only for enabling in my test script.

> Hmm, this module could use a few cleanups, tell me what you think of
> this. I've included the whole file since it's smaller and more readable
> than the diff:

It's fine!
It also passed my local mbcs test made before
except a few litle things.

1) Need following fix.
--- a/hgext/win32mbcs.py	Tue Jul 29 01:10:20 2008 +0900
+++ b/hgext/win32mbcs.py	Tue Jul 29 01:18:33 2008 +0900
@@ -77,11 +77,11 @@
 def wrapname(name):
    module, name = name.rsplit('.', 1)
    module = eval(module)
-   func = module.getattr(name)
+   func = getattr(module, name)
    def f(*args):
        return wrapper(func, args)
    f.__name__ = func.__name__
-   module.setattr(name, f)
+   setattr(module, name, f)

 # wrap some python functions and mercurial functions
 # to handle raw bytes on Windows.

2) string.rsplit() is not available in python23.

3) The comments "Note: Unix people do not need to use this extension."
    (and also some descriptions with "windows")  would not be correct
if this module
    is uesd as workaround for unix + case-insensitive-fs +
problematic-mbcs-encoding.

-- 
Shun-ichi GOTO


More information about the Mercurial-devel mailing list