在Mercurial中配置eol扩展时出现问题 [英] Problems configuring eol extension in Mercurial

查看:82
本文介绍了在Mercurial中配置eol扩展时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将unix托管的Mercurial存储库克隆到Windows计算机.我希望使用 eol 扩展名,以便在克隆到Windows计算机时,服务器上带有LF结尾的文本文件具有CRLF.

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.

以前,我曾使用过 win32text 扩展程序,该扩展程序运行良好,但是自

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.

在我的Mercurial.ini中,

In my Mercurial.ini I have

[extensions]
eol =

我知道默认的行为是在克隆时将LF转换为CRLF,但是我显然错过了一些东西,因为每当我从Unix服务器将某些东西克隆到Windows时,行尾都保持为LF.

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.

有什么想法吗?

推荐答案

在@Geoffrey的评论之后,我创建了一个.hgeol文件,如下所示:

Following @Geoffrey's comment, I created a .hgeol file as:

[patterns]
** = native

这可以解决问题,但让我感到困惑.我假设默认情况下启用eol扩展将打开此模式处理.这不是意味着如果存储库所有者具有预见性,包括Windows客户端的.hgeol文件,我就只能从Unix服务器成功克隆吗?

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?

这篇关于在Mercurial中配置eol扩展时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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