藤原です。
ここから先は、例によって GOTO さんへの業務連絡です(笑)。
修正版 win32mbcs は、対処対象に os.path.abspath os.path.realpath
を加えたのですが、利用している箇所が結構あったので、意図的に除外していた
のか?と心配したりしてますが、どうなのでしょう?
========================================
diff -r 5983de86462c hgext/win32mbcs.py
--- a/hgext/win32mbcs.py Thu May 03 16:03:08 2012 -0500
+++ b/hgext/win32mbcs.py Fri May 18 19:44:17 2012 +0900
@@ -127,7 +127,8 @@
# NOTE: os.path.dirname() and os.path.basename() are safe because
# they use result of os.path.split()
funcs = '''os.path.join os.path.split os.path.splitext
- os.path.normpath os.makedirs
+ os.path.normpath os.path.abspath os.path.realpath
+ os.makedirs
mercurial.util.endswithsep mercurial.util.splitpath mercurial.util.checkcase
mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath
mercurial.util.checkwinfilename mercurial.util.checkosfilename'''
========================================
あるいは、Python の版によって挙動が違うとか?
私の Python 2.7.2 @ win7 64bit 環境だと:
========================================
>> p = 'c:\\\x8b\x40\x94\x5c'
>> print p
c:\機能
>> os.path.abspath(p)
'c:\\\x8b@\x94'
>> print os.path.abspath(p)
c:\機(壊れた文字)
========================================
みたいな感じで、パス末尾のバックスラッシュが破棄されてしまうの
で、-R でリポジトリパスを指定すると、これらで処理済みのパスを探し
に行って、『リポジトリが無いよ』とエラー中断してしまいます。
その場合でも、エラーメッセージ中に表示されるパスは処理前のパスなので、
『無いと言っているパスはちゃんと存在しているのに!?』などと驚く事態に。
2012年5月18日金曜日 19時28分53秒 UTC+9 フジワラ: