- 1 名前:デフォルトの名無しさん mailto:sage [2008/12/04(木) 14:02:52 ]
- バージョン管理システムについて語りましょう。
関連スレ CVS 1.3 [UNIX板] pc11.2ch.net/test/read.cgi/unix/1093611448/ CVS導入スレ〜 Rev.3 [プログラム板] pc11.2ch.net/test/read.cgi/tech/1113141518/ Subversion r10 [プログラム板] pc11.2ch.net/test/read.cgi/tech/1215565366/ subversion バージョン管理【サブバージョン】 [Linux板] pc11.2ch.net/test/read.cgi/linux/1154701996/ git スレッド [Linux板] pc11.2ch.net/test/read.cgi/linux/1197798039/ Bazaarでバージョン管理【bzr>git,svn,cvs】 [プログラム板] pc11.2ch.net/test/read.cgi/tech/1218083381/ 前スレ バージョン管理システムについて語るスレ2 pc11.2ch.net/test/read.cgi/tech/1215520728/ 前前スレ バージョン管理システムについて語るスレ pc11.2ch.net/test/read.cgi/tech/1193332500/
- 545 名前:デフォルトの名無しさん [2009/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:
- 546 名前:デフォルトの名無しさん [2009/02/23(月) 17:35:18 ]
- @@ -120,3 +132,5 @@
wrapname(f) ui.debug(_("[win32mbcs] activated with encoding: %s\n") % util._encoding) + extention.wrapfunction(osutil,'listdir', listdir_wrap) + diff -r 11a4eb81fb4f -r 5dd432f98473 mercurial/util.py --- a/mercurial/util.py Tue Dec 30 22:10:41 2008 +0100 +++ b/mercurial/util.py Mon Feb 23 16:32:44 2009 +0900 @@ -907,11 +907,11 @@ dircache = {} # dirname -> filename -> status | None if file does not exist for nf in files: nf = ncase(nf) - pos = nf.rfind(sep) - if pos == -1: - dir, base = '.', nf + dir, base = os.path.split(nf) + if dir: + dir += sep else: - dir, base = nf[:pos+1], nf[pos+1:] + dir = '.' cache = dircache.get(dir, None) if cache is None: try:
|

|