【问题标题】:mercurial: is there a remote global hook?mercurial:有远程全局挂钩吗?
【发布时间】:2015-09-01 18:08:16
【问题描述】:

在托管所有 mercurial repos (+100) 的远程服务器上,我想定义一个全局挂钩。也就是说,在提交到 任何 repos 之后,假设会发生某个动作(实际上应该触发一个 post 请求)。

我知道我可以在每个回购中定义一个钩子,但考虑到回购的数量,这不是一个选项。有没有办法全局定义钩子?

【问题讨论】:

    标签: mercurial global mercurial-hook


    【解决方案1】:

    在“远程”服务器上,一切都与在本地计算机上一样。

    任何应该适用于每个存储库的东西都可以由您的全局配置文件(~/.hgrc 或 %USERPROFILE%\mercurial.ini)控制。因此,如果所有存储库都由服务器上的同一用户拥有,则将这些挂钩添加到其 ~/.hgrc。系统范围的配置文件还有其他地方。摘自hg help config(unix 路径):

    - "<repo>/.hg/hgrc" (per-repository)
    - "$HOME/.hgrc" (per-user)
    - "<install-root>/etc/mercurial/hgrc" (per-installation)
    - "<install-root>/etc/mercurial/hgrc.d/*.rc" (per-installation)
    - "/etc/mercurial/hgrc" (per-system)
    - "/etc/mercurial/hgrc.d/*.rc" (per-system)
    - "<internal>/default.d/*.rc" (defaults)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多