简体   繁体   English

无法在名为“版本”的目录的同一级别上将名为“版本”的文件添加到CVS

[英]Can't add a file named “VERSION” to CVS at the same level of a dir named “version”

I'm reporting a series of commits from git to cvs with cvsexportcommit. 我正在使用cvsexportcommit报告从git到cvs的一系列提交。 I've found that it's impossible to add the VERSION file in the following context 我发现在以下情况下无法添加VERSION文件

|
\_version/
| |
| \_version.txt (to be removed)
|
\_VERSION (to be added)

The output I get is the following: 我得到的输出如下:

Applying to CVS commit f6ce403e6e1d57b61661527969ac97c52bcbe41f from parent 076d1fb72d8498670582561b7318939bf209c1f4
Checking if patch will apply
cvs status: Examining prometeo/VERSION
Applying
fatal: unable to write file prometeo/VERSION mode 100644
Patch applied successfully. Adding new files and directories to CVS
cvs [add aborted]: there is a version in prometeo/VERSION already
Failed to cvs add prometeo/VERSION -- you may need to do it manually at /usr/local/git/libexec/git-core/git-cvsexportcommit line 314.
cvs remove: scheduling `prometeo/version/version.txt' for removal
cvs remove: use 'cvs commit' to remove this file permanently
Commit to CVS
Patch title (first comment line): Moved tmtc-prometeo version number to prometeo/VERSION
NOTE: One or more hunks failed to apply cleanly.
You'll need to apply the patch in .cvsexportcommit.diff manually
using a patch program. After applying the patch and resolving the
problems you may commit using:
    cd "/Users/elia/Code/linux-tmtc/"
    cvs -d :ext:eschito@********:/cvshome/ground commit -F .msg 'prometeo/VERSION' 'prometeo/tool/bin/tmtc_info' 'prometeo/version/version.txt'

If I try to add manually the "VERSION" file to cvs I get: 如果我尝试将“ VERSION”文件手动添加到CVS,则会得到:

> cvs add prometeo/VERSION
cvs [add aborted]: there is a version in prometeo/VERSION already

Any ideas? 有任何想法吗?

What platform is your CVS server running on? 您的CVS服务器在什么平台上运行? AFAIK, some versions of CVS (at least on Windows NT) have case-insensitive filename handling in some places, hence will not accept two files whose names only differ by case. AFAIK,某些版本的CVS(至少在Windows NT上)在某些地方具有不区分大小写的文件名处理,因此将不接受名称仅因大小写而不同的两个文件。

At any rate, I would very strongly advise against using filenames that differ only in case. 无论如何,我会强烈建议不要使用仅在存在的情况下的文件名。 It can be a nightmare if you ever want to check out onto a filesystem that's not fully case-insensitive (some versions of MS Windows, some versions of MacOS...), and it's also confusing ("you need to edit the file foo in blah, no not that foo, the one with a capital F" ...). 如果您想签出不完全不区分大小写的文件系统(某些版本的MS Windows,某些版本的MacOS ...),这也可能是一场噩梦,而且这也令人困惑(“您需要编辑文件foo等等,不,不是那个foo,一个大写的F“ ...)。

So: 所以:

  1. Don't do it 不要这样
  2. If you feel you have to, host on Linux :-) 如果需要,请在Linux上托管:-)

Didn't find the cause, but a solution is to do two different commits: one for the folder deletion and one for the added file. 找不到原因,但是解决方案是执行两次不同的提交:一次提交删除文件夹,一次提交添加的文件。

By the way now cvs complains about not finding the (old) folder every time I checkout or update... 顺便说一下,现在CVS抱怨每次结帐或更新时都找不到(旧)文件夹...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM