TortoiseHg PyQt 版の Pythonの方の listfile SJISダメ文字問題その2
bundleはおいておいて、怪しげなこのへんにprint文を入れてみた。
http://bitbucket.org/tortoisehg/stable/annotate/9a2a2a1422cc/tortoisehg/hgqt/run.py#line-263
path = options['repository'] if path: if path.startswith('bundle:'): s = path[7:].split('+', 1) if len(s) == 1: path, bundle = os.getcwd(), s[0] else: path, bundle = s cmdoptions['bundle'] = os.path.abspath(bundle) print "HOGE00 " + path print "HOGE10 " + os.getcwd() path = ui.expandpath(path) print "HOGE20 " + path print "HOGE30 " + os.getcwd() cmdoptions['repository'] = path os.chdir(path) if options['fork']: cmdoptions['fork'] = True if options['nofork'] or options['profile']: cmdoptions['nofork'] = True print "HOGE40 " + os.getcwd()
C:\WEB-DOWN\ソビエト>python C:\WEB-DOWN\thg-winbuild\tortoisehg\thg -R ..\ソビエト代表\ソ連 HOGE00 ..\ソビエト代表\ソ連 HOGE10 C:\WEB-DOWN\ソビエト HOGE20 ..\ソビエト代表\ソ連 HOGE30 C:\WEB-DOWN\ソビエト HOGE40 C:\WEB-DOWN\ソビエト代表\ソ連
うまくいっていますね。
ワークベンチ画面が開いてから問題が起きるのは気にしないでおく。
{{{ #!python ** Please report this bug to http://bitbucket.org/tortoisehg/thg/issues ** Mercurial version (1.6.3). TortoiseHg version (1.1.4+335-be99332ec99f+) ** Command: -R ..\ソビエト代表\ソ連 ** CWD: C:\WEB-DOWN\ソビエト代表\ソ連 ** Extensions loaded: convert, graphlog, extdiff, hgk, bookmarks, rebase, purge, mq, transplant, win32mbcs, patchbomb, fixutf8 ** Python version: 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] ** Windows version: (6, 0, 6002, 2, 'Service Pack 2') ** Processor architecture: x86 Traceback (most recent call last): File "C:\WEB-DOWN\thg-winbuild\tortoisehg\tortoisehg\hgqt\repowidget.py", line 556, in revision_selected self.revDetailsWidget.revision_selected(rev) File "C:\WEB-DOWN\thg-winbuild\tortoisehg\tortoisehg\hgqt\revdetails.py", line 273, in revision_selected self.filelistmodel.setContext(ctx) File "C:\WEB-DOWN\thg-winbuild\tortoisehg\tortoisehg\hgqt\filelistmodel.py", line 69, in setContext self.loadFiles() File "C:\WEB-DOWN\thg-winbuild\tortoisehg\tortoisehg\hgqt\filelistmodel.py", line 116, in loadFiles self._files = self._buildDesc(0) File "C:\WEB-DOWN\thg-winbuild\tortoisehg\tortoisehg\hgqt\filelistmodel.py", line 103, in _buildDesc changes = self._ctx.changesToParent(parent) File "C:\WEB-DOWN\thg-winbuild\tortoisehg\tortoisehg\hgqt\thgrepo.py", line 491, in changesToParent return self._repo.status(parent.node(), self.node())[:3] File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\localrepo.py", line 1085, in status mf1 = mfmatches(ctx1) File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\localrepo.py", line 1018, in mfmatches mf = ctx.manifest().copy() File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\context.py", line 93, in manifest return self._manifest File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\util.py", line 163, in __get__ result = self.func(obj) File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\context.py", line 63, in _manifest return self._repo.manifest.read(self._changeset[0]) File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\manifest.py", line 46, in read text = self.revision(node) File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\revlog.py", line 1019, in revision rev = self.rev(node) File "R:\Python26\lib\site-packages\mercurial-1.6.3-py2.6-win32.egg\mercurial\revlog.py", line 517, in rev raise LookupError(node, self.indexfile, _('no node')) LookupError: 00manifest.i@09e666fd329b: no node Traceback (most recent call last): File "C:\WEB-DOWN\thg-winbuild\tortoisehg\tortoisehg\hgqt\thgrepo.py", line 85, in timerEvent del _repocache[self.repo.root] KeyError: 'C:\\WEB-DOWN\\\x83\\\x83r\x83G\x83g\x91\xe3\x95\\\\\x83\\\x98A' }}}
でもなんかやっぱり気になるから、Mercurial本体のui.expandpath()のソース。
http://selenic.com/repo/hg/file/15ca4bfecfe3/mercurial/ui.py#l316
あ、os.path.isdir、os.path.join
これはだめだ・・・
プロファイル直下のmercurial.iniでwin32mbcsが有効になっていたからやり直し。
あれ、通りますね・・・