とある手元のリポジトリで hg の変な動きが見られたので調べてみたら
fixutf8が問題だったので(ちょっと乱暴な)パッチを作りました。
症状としては add できない qpush しても dirstateが更新されず modified
となってしまうなど、色いろあるかと思います。
------------------------------------
diff -r 3ad952b61af1 fixutf8.py
--- a/fixutf8.py Fri Sep 16 16:57:21 2011 +0900
+++ b/fixutf8.py Tue Jan 10 17:25:55 2012 +0900
@@ -223,6 +223,9 @@
posixfile_utf8.close(self)
util.rename(self.temp, util.localpath(self.__name))
+ # for new hg (after 15057:774da7121fc9)
+ close = rename
+
def __del__(self):
if not self.closed:
try:
------------------------------------
不具合が出るのは mercurialの以下の変更(2011/8/25)での atomictempfile のメソッド名の
変更からのようです。でもって fixutf8 がこのクラスをutf8対応のものに置き換えてまして、
これが古いI/Fのままであったためのようです。
changeset: 15057:774da7121fc9
user: Greg Ward <gr...@gerg.ca>
date: Thu Aug 25 20:21:04 2011 -0400
summary: atomictempfile: make close() consistent with other
file-like objects.
本家には一応報告済みですが実は上のパッチはちょっと乱暴なものでして、
旧版でエラーとまではならず、それなりに動くものにはなっていますが、正しくはありません。
https://bitbucket.org/stefanrusek/hg-fixutf8/issue/29/incompatible-with-mercurial-20
自分は正しい実装を考える時間がちょっと取れなさそうなので、だれかよろしくです。
--
Shun-ichi GOTO