前田です。

Shugo Maeda wrote:
> エラーメッセージからして、cvsのsrc/filesubr.cのxcmp()で起きている
> エラーっぽいですね。
> src/rcs.cのRCS_cmp_file()を見ると、
> 
>     if (preserve_perms)
>     {
>         char *tmp;
>         int retcode;
> 
>         tmp = cvs_temp_name();
>         retcode = RCS_checkout(rcs, NULL, rev, NULL, options, tmp, NULL,
> NULL);
>         if (retcode != 0)
>             return 1;
> 
>         retcode = xcmp (tmp, filename);
>         if (CVS_UNLINK (tmp) < 0)
>             error (0, errno, "cannot remove %s", tmp);
>         free (tmp);
>         return retcode;
>     }
> 
> のようなコードがあるので、一時ファイルへのcheckoutに失敗してるのかなあ、

ここではなくて、この下の

        if (rev2 != NULL)
        {
            /* Open & cache rev1 */
            tmpfile = cvs_temp_name();
            if (RCS_checkout (rcs, NULL, rev1, NULL, options, tmpfile,
                              (RCSCHECKOUTPROC)0, NULL))
                error (1, errno,
                       "cannot check out revision %s of %s",
                       rev1, rcs->path);
            use_file1 = tmpfile;
            if (rev1_cache != NULL)
                *rev1_cache = tmpfile;
        }
        else
            use_file1 = filename;

        fp = CVS_FOPEN (use_file1, binary ? FOPEN_BINARY_READ : "r");
        if (fp == NULL)
            /* FIXME-update-dir: should include update_dir in message.  */
            error (1, errno, "cannot open file %s for comparing",
use_file1);

という部分でエラーになっているようです。
getcwd()でカレントディレクトリを確認すると、/tmp/cvs-serv<pid>でした。

あと、

$ cvs diff -kk -u -r HEAD

のように-rを指定するとエラーが出ないようです。

また、自分のホームにcvs-1.12.12をインストールして試してみましたが
同じ結果でした。うーむ。

-- 
前田 修吾