バージョン管理システムについて語るスレ3at TECH
バージョン管理システムについて語るスレ3 - 暇つぶし2ch545:デフォルトの名無しさん
09/02/23 17:33:03
parent: 7554:11a4eb81fb4f

diff -r 11a4eb81fb4f -r 5dd432f98473 hgext/win32mbcs.py
--- a/hgext/win32mbcs.py Tue Dec 30 22:10:41 2008 +0100
+++ b/hgext/win32mbcs.py Mon Feb 23 16:32:44 2009 +0900
@@ -44,6 +44,7 @@
import os
from mercurial.i18n import _
from mercurial import util
+from mercurial import extention, osutil

def decode(arg):
if isinstance(arg, str):
@@ -108,6 +109,17 @@
sjis s_jis shift_jis_2004 shiftjis2004 sjis_2004 sjis2004
shift_jisx0213 shiftjisx0213 sjisx0213 s_jisx0213'''

+def listdir_wrap(listdir, path, *args, **kwargs):
+ try:
+ path = decode(path)
+ if not path.endswith(os.sep):
+ path += os.sep
+ path = decode(path)
+ return listdir(path, *args, **kwards)
+ except: UnicodeError
+ raise util.Abort(_("[win32mbcs] filename conversion fail with"
+ " %s encoding\n") % (util._encoding))
+
def reposetup(ui, repo):
# TODO: decide use of config section for this extension
if not os.path.supports_unicode_filenames:


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch