在我当地的mercurial回购中,hgrc在哪里?

时间:2014-02-01 06:22:07

标签: version-control mercurial

我在目录

中有一个名为mercurialTest的本地mercurial repo
/home/xyz/MERCURIAL

我使用mercurial的网络服务器(我使用命令hg serve)提供服务。回购可在

获取
http://xyz-satellite-l640:8000/

我在以下目录中克隆了repo mercurialTest

/home/xyz/MERCURIALWORKERS/workerOne
/home/xyz/MERCURIALWORKERS/workerTwo

现在我在employeeOne里面的repo MERCURIAL中添加了一个名为

的文件
mercurialbasics.txt

我添加并提交了该文件。现在我正在尝试将文件推送到

/home/xyz/MERCURIAL

但是我收到以下错误

pushing to http://xyz-satellite-l640:8000/
searching for changes
remote: ssl required

根据教程http://hginit.com/02.html,我必须更改位于/home/xyz/MERCURIAL

中的hgrc文件中的内容

但是我没有看到那个文件。那我究竟做错了什么或错过了什么?

2 个答案:

答案 0 :(得分:5)

作为I mentioned before,您可以使用以下内容修改该回购的方式:

hg serve --config web.push_ssl=No --config "web.allow_push=*"

hgrc通常位于您的家中:~/.hgrc

请参阅“Configuration file location of Publishing Mercurial Repositories”:

  

hgweb读取像Mercurial那样的全局和特定于存储库的配置文件 - 请参阅 hg help config 。请注意,它将读取Web服务器运行的用户的.hgrc。

hg help config中所述,您拥有本地,全球,每用户和系统hgrc文件。

<repo>/.hg/hgrc
$HOME/.hgrc
/etc/mercurial/hgrc
<install-root>/etc/mercurial/hgrc
<install-root>/etc/mercurial/hgrc.d/*.rc

答案 1 :(得分:0)

  • 位于<REPO-DIR>/.hg/hgrc
  • 存储库的hgrc文件
  • 如果您更喜欢配置Web设置一次而不是使用hg serve的扩展命令行,您可以在hgrc(旧的良好纯文本ini文件)中添加包含内容的部分,与命令的参数相同< / LI>

[web]

push_ssl = False

allow_push = *

稍后使用hg serve

当心:这些设置在某种程度上是不安全的:

  • 未使用SSL,因此 - 任何人都可以在推送中拦截和解码数据
  • 任何人(知道回购网站的URL - 见上文)可以以任何名义推送此回购任何数据