在 Mercurial 中配置 eol 扩展时出现问题
我正在尝试将 UNIX 托管的 Mercurial 存储库克隆到 Windows 计算机。我希望使用 eol 扩展名,以便服务器上以 LF 结尾的文本文件在克隆到 Windows 计算机时具有 CRLF。
以前我使用过 win32text 扩展,效果很好,但自从 普遍的共识似乎是 eol 扩展是可行的方法,我想我应该尝试一下。
在我的 Mercurial.ini 中,我
[extensions]
eol =
知道默认行为是在克隆时将 LF 转换为 CRLF,但我显然错过了一些东西,因为每当我将某些内容从 Unix 服务器克隆到 Windows 时,行结尾仍为 LF。
有什么想法吗?
I'm trying to clone a unix-hosted Mercurial repository to a Windows computer. I'm hoping to use the eol extension so that my text files with LF endings on the server have CRLF when cloned to a Windows computer.
Previously I've used the win32text extension which has worked fine, but since the general consensus seems to be that the eol extension is the way to go, I thought I'd give it a shot.
In my Mercurial.ini I have
[extensions]
eol =
I understood that the default behaviour was to convert LF to CRLF on cloning, but I've clearly missed something as whenever I clone something from the Unix server to Windows, the line endings remain as LF.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 @Geoffrey 的评论,我创建了一个 .hgeol 文件:
这确实有效,但我很困惑。我假设启用 eol 扩展会默认打开此模式处理。这是否意味着如果存储库所有者有先见之明包含处理 Windows 客户端的 .hgeol 文件,我只能从 Unix 服务器成功克隆?
Following @Geoffrey's comment, I created a .hgeol file as:
This does the trick, but I'm left confused. I'd assumed that enabling the eol extension would turn on this pattern handling by default. Doesn't this mean that I can only successfully clone from a Unix server if the repository owner has had the foresight to include a .hgeol file handle Windows clients?