Mercurial HG 折叠箱碰撞?
- 首先我有一个文件名自述文件
- ,然后我将其更改为自述文件
- 提交
- 推送
好的问题是有两个文件:自述文件和自述文件
如何删除存储库上的自述文件?
当我更新时,我收到此错误 中止:自述文件和自述文件之间的大小写折叠冲突
- first i have a file name readme
- then i change it to README
- commit
- push
ok the problem is there are two files: readme and README
how do i delete the readme on the repository ?
when i do update i get this error
abort: case-folding collision between readme and README
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Mercurial 可以处理同一目录中的文件名,这些文件名在其存储库中仅大小写不同(存储库顶层的
.hg
目录)。在区分大小写的文件系统(大多数在 UNIX 上)上,它也可以处理工作目录中的这些文件。但是,在仅保留大小写的系统上,操作系统不允许您在同一目录中拥有两个仅大小写不同的文件,并且 Mercurial 会对此发出警告(如您所见)。要解决操作系统的此限制,请在区分大小写的文件系统上签出克隆,删除文件,然后提交/推送。只要Windows用户没有
hg更新
到有冲突的版本,他们就没事(因为在存储库中没问题,只是不在他们的工作目录中)。Mercurial can handle filenames in the same directory that differ only in their case within its repositories (
.hg
directory at the top level of your repo). On case sensitive file systems (most on unix) it can handle those files in the working directory too. However, on systems that are merely case-retentive the OS doesn't let you have two files in the same directory that differ only by case and Mercurial warns you about that (as you've seen).To work around this limitation of your OS, checkout your clone on a case sensitive file system, delete the file, and then commit/push. So long as the windows people aren't
hg updating
to a revision that has the collision they'll be okay (since it's okay down in the repository just not in their working dir).此问题与 Resolving Mercurial Case-Folding Collision in 重复,并且可以折叠到Windows
我同意那里的评论,即要求某人在区分大小写的文件系统中工作有点严厉,即使使用 Cygwin 也是如此。最干净的解决方案假设有两个文件,似乎是:
This question is a duplicate of and could be folded into Resolving Mercurial Case-Folding Collision in Windows
I agree with the comment there that asking someone to work within a case sensitive file system is a little heavyhanded, even with Cygwin. The cleanest solution assuming two files and seems to be:
假设你希望自述文件是自述文件。
执行此操作并提交这些更改,存储库应该可以再次使用。
Supposing you want readme to be README.
Do this and commit these changes and the repo should be usable again.
我遇到了这个问题,当我对特定修订版执行
更新
时,发生了大小写冲突。有问题的修订是专门为了解决我重命名文件的案例折叠冲突而执行的。不幸的是,Mercurial 不允许我更新
到修订版。不过,我仍然可以
更新
之前和之后的修订。因此,如果您在 Windows(或类似的不区分大小写的文件系统)上简单地更新
到特定版本时遇到此问题,您可以通过更新
绕过问题版本。 /code>ing 到其之前或之后的一个。
I had this issue where the case-collision was happening when I performed an
Update
to a particular revision. The revision in question was a committed performed specifically to address a case-folding collision where I renamed the file. Unfortunately, Mercurial was not going to allow me toUpdate
to the revision.However, I could still
Update
to revisions before and after it. So if you are encountering this problem on Windows (or a similar case-insensitive file system) while simplyUpdate
ing to a particular revision, you may be able to bypass the problem revision byUpdate
ing to one before or after it.如果是重命名,就像 abc.txt 移动到 Abc.txt
下面的工作吗?
打个补丁,
查看新鲜的代码,
将补丁贴在其上面。
然后提交n推送
If It was a rename,thats like abc.txt moved to Abc.txt
Will the following work?
Take a patch,
Check out the code fresh,
Apply the patch on top of it.
then commit n push