解决Windows中的Mercurial案例折叠冲突 [英] Resolving Mercurial Case-Folding Collision in Windows

查看:107
本文介绍了解决Windows中的Mercurial案例折叠冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在StackOverflow上看到了其他Mercurial的案例折叠式答案-他们说,如果您可以访问区分大小写的文件系统(如unix),请检查那里并对其进行修复.问题是,我无权访问unix框,我是Windows开发人员,正在开发Windows应用程序.

I've seen the other Mercurial case-folding Answers on StackOverflow - they say that if you have access to a case sensitive file system like unix then check out there and it should fix it. Problem is, I don't have access to a unix box, I'm a windows developer developing a windows application.

如何在没有Unix机器的情况下解决此问题?

How do I fix this without a Unix box?

推荐答案

正在处理一个filesystem帮助主题,该主题将包含在下一版本的Mercurial中:

There is a filesystem help topic being worked on that will be included in the next version of Mercurial:

https://www.mercurial-scm .org/pipermail/mercurial-devel/2012-April/039522.html

重命名冲突文件

在不区分大小写的文件系统上,更新为具有以下内容的修订版本: 具有大小写冲突的文件将中止,即使 --check--clean.

On case-insensitive filesystems, updating to revisions which have files with case collisions will abort, even with --check or --clean.

要修复此类修订,您应该为以下一项或两项赋予新名称 区分大小写的文件系统上的冲突文件,并将其提交到 创建新的碰撞安全修订.

To repair such revisions, you should give new names to one or both of the colliding files on a case-sensitive filesystem, and commit them to create new collision safe revision.

..注意:: 如果您想要(或需要)浏览或修复此类 不区分大小写的文件系统的修订,请参阅更新 手动"部分.

.. note:: If you want to (or need to) browse or repair such revisions on case-insensitive filesystems, please see 'Updating manually' section.

如果:hg:merge被中止,但是:hg:update --check 修订成功,要合并的修订之间会发生冲突.

If :hg:merge is aborted, but :hg:update --check to each revisions successes, collision occurs between revision to be merged.

在这种情况下,应重命名其中一个或两个文件,以避免 合并前发生碰撞.

In this case, files in one of them or both should be renamed to avoid collision before merging.

使用最新的Mercurial,您可以分步安全地更改文件名的大小写 甚至在不区分大小写的文件系统上也是如此:

With recent Mercurial, you can change case of filename safely in steps below, even on case-insensitive filesystems::

$ hg rename a.txt tmp
$ hg rename tmp A.TXT

手动更新

如果您要(或需要)通过以下方式更新工作目录: 修订引起不区分大小写的大小写冲突 文件系统,以重命名冲突文件或浏览此类文件中的内容 例如,请查看下面的Wiki页面:

If you want to (or need to) update working directory by the revision causing case-folding collision on case-insensitive filesystems, to rename colliding files or browsing contents at such revision for example, please see the Wiki page below::

https://www.mercurial-scm.org/wiki/ManualCheckout

不建议非Mercurial专业用户使用此功能.

This is NOT recommended for non expert Mercurial users.

此处介绍了另一种类似的手动方法:

Another similar manual method is described here:

https://www.mercurial-scm.org/wiki/FixingCaseCollisions

尽管这也深入了Mercurial内部,所以除非万不得已,否则应避免使用它.

This also dives rather deep into Mercurial internals though, so you should avoid it unless as a last resort.

这篇关于解决Windows中的Mercurial案例折叠冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆