Mercurial OS X扩展启用

5 macos mercurial

我是一个新的mac用户,最近安装了mercurial.我喜欢启用一些扩展,我正在寻找全球hgrc文件.

我无法找到它,所以我尝试在/ etc/mercurial和〜/ .hg中创建"hgrc"文件.

它仍然不起作用,所以我想知道这里是否有人解决了这个问题.

非常感谢.

Nic*_*tin 8

您的.hgrc需求~/.hgrc就像在其他类似Unix的操作系统上一样(假设您使用的是标准的Mercurial安装,而不是像MacHg那样).您可以使用/etc/mercurial,但在这种情况下,文件是命名的hgrc,而不是.hgrc.

您也可以hg直接提出这个问题,它应该为您提供最新的安装答案:

$ hg help config
Configuration Files

    Mercurial reads configuration data from several files, if they exist. Below we list the most specific file first.

    On Unix, these files are read:

    - "<repo>/.hg/hgrc"
    - "$HOME/.hgrc"
    - "/etc/mercurial/hgrc"
    - "/etc/mercurial/hgrc.d/*.rc"
    - "<install-root>/etc/mercurial/hgrc"
    - "<install-root>/etc/mercurial/hgrc.d/*.rc"
Run Code Online (Sandbox Code Playgroud)