2012年5月30日 22:11 flied onion <
flied...@gmail.com>:
> 私の場合は単純に「cp932で運用できてるんだからhg内はcp932で持ちまわっちゃえば考えること少なくていいじゃない。」
> という考えであぁいう方針になっていましたが、UTF8で持ちまわれるならその方がよさそうですね。
> まだソースは見ていませんが、修正箇所も少なそうですし、そのほうがわかりやすくていいですよね。参考にさせてもらいます。
ところでベースのmercurial はどの版を使っていますか?
crewのtipとは結構違うっぽいのと、zipを展開してそのまま使ってみても
変換に失敗するようなので。
失敗の様子はこんなかんじ。3種類ほど試してみましたし、TortoiseHg付属のhg.exeを使っても
同様の結果でした。
[c:\develop\hg\convert-cp932-test]hg convert \svnroot\hoge p
initializing destination p repository
scanning source...
sorting...
converting...
197 Created folder remotely
196 Copied remotely
195 Copied remotely
194 Renamed remotely
193 Copied remotely
transaction abort!
rollback completed
** Unknown exception encountered with possibly-broken third-party extension conv
ert
** which supports versions unknown of Mercurial.
** Please disable convert and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.6.7 (r267:88850, Jun 27 2011, 13:56:33) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 2.2.1+141-e9ae770eff1c)
** Extensions loaded: mq, eol, share, transplant, convert, graphlog, purge, extd
iff, rebase
Traceback (most recent call last):
File "hg", line 38, in <module>
File "mercurial\dispatch.pyc", line 28, in run
File "mercurial\dispatch.pyc", line 65, in dispatch
File "mercurial\dispatch.pyc", line 88, in _runcatch
File "mercurial\dispatch.pyc", line 737, in _dispatch
File "mercurial\dispatch.pyc", line 511, in runcommand
File "mercurial\dispatch.pyc", line 827, in _runcommand
File "mercurial\dispatch.pyc", line 798, in checkargs
File "mercurial\dispatch.pyc", line 734, in <lambda>
File "mercurial\util.pyc", line 463, in check
File "/develop/hg\convert-cp932\__init__.py", line 269, in convert
return convcmd.convert(ui, src, dest, revmapfile, **opts)
File "/develop/hg\convert-cp932\convcmd.py", line 470, in convert
c.convert(sortmode)
File "/develop/hg\convert-cp932\convcmd.py", line 385, in convert
self.copy(c)
File "/develop/hg\convert-cp932\convcmd.py", line 353, in copy
source, self.map)
File "/develop/hg\convert-cp932\hg.py", line 171, in putcommit
self.repo.commitctx(ctx)
File "hgext\eol.pyc", line 347, in commitctx
File "mercurial\localrepo.pyc", line 1249, in commitctx
File "mercurial\context.pyc", line 1196, in __getitem__
File "mercurial\context.pyc", line 1238, in filectx
File "/develop/hg\convert-cp932\hg.py", line 137, in getfilectx
data, mode = source.getfile(f, v)
File "/develop/hg\convert-cp932\convcmd.py", line 88, in getfile
return self.source.getfile(file, rev)
File "/develop/hg\convert-cp932\subversion.py", line 850, in getfile
file = file.decode('cp932').encode('utf8')
UnicodeDecodeError: 'cp932' codec can't decode bytes in position 55-56: illegal
multibyte sequence
--
Shun-ichi GOTO