Mercurial HG 折叠箱碰撞?

发布于 2024-09-14 16:58:09 字数 176 浏览 7 评论 0原文

  1. 首先我有一个文件名自述文件
  2. ,然后我将其更改为自述文件
  3. 提交
  4. 推送

好的问题是有两个文件:自述文件和自述文件

如何删除存储库上的自述文件?

当我更新时,我收到此错误 中止:自述文件和自述文件之间的大小写折叠冲突

  1. first i have a file name readme
  2. then i change it to README
  3. commit
  4. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

热鲨 2024-09-21 16:58:10

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).

划一舟意中人 2024-09-21 16:58:10

此问题与 Resolving Mercurial Case-Folding Collision in 重复,并且可以折叠到Windows

我同意那里的评论,即要求某人在区分大小写的文件系统中工作有点严厉,即使使用 Cygwin 也是如此。最干净的解决方案假设有两个文件,似乎是:

  1. hg revert 到要合并的分支的头部,其中
  2. hg remove // then commit 等。
  3. 检查 上的文件历史记录。可能对重命名的文件进行了错误的添加
  4. 如果是这样,请手动将这些更改添加到

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:

  1. hg revert to head of the branch to be merged that has
  2. hg remove // then commit, etc.
  3. check the file history on . It's possible that some additions were incorrectly made to the renamed file
  4. If so, manually add those changes to
唐婉 2024-09-21 16:58:10

假设你希望自述文件是自述文件。

hg mv readme foofile
hg mv foofile README

执行此操作并提交这些更改,存储库应该可以再次使用。

Supposing you want readme to be README.

hg mv readme foofile
hg mv foofile README

Do this and commit these changes and the repo should be usable again.

美人迟暮 2024-09-21 16:58:10

我遇到了这个问题,当我对特定修订版执行更新时,发生了大小写冲突。有问题的修订是专门为了解决我重命名文件的案例折叠冲突而执行的。不幸的是,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 to Update 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 simply Updateing to a particular revision, you may be able to bypass the problem revision by Updateing to one before or after it.

强辩 2024-09-21 16:58:10

如果是重命名,就像 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文