【问题标题】:mercurial : disable all the extensions from the command linemercurial :从命令行禁用所有扩展
【发布时间】:2017-10-06 18:53:40
【问题描述】:

有没有办法使用命令行开关/环境变量在没有任何外部扩展的情况下运行 mercurial?

例如,在这种情况下:

$ hg version --debug
Mercurial Distributed SCM (version 4.3.3)
[...]
Enabled extensions:

  hggit             external
  hgremotebranches  external
  mq                internal
  rebase            internal
  shelve            internal

我该如何完成:

$ hg --disable-all-extensions version --debug
Mercurial Distributed SCM (version 4.3.3)
[...]
Enabled extensions:

  <empty>

我知道我可以通过--config extensions.name=! 禁用个别扩展,但我需要立即核对所有内容。

【问题讨论】:

    标签: mercurial mercurial-extension


    【解决方案1】:

    来自hg help environment

    HGRCPATH
            A list of files or directories to search for configuration files. Item
            separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
            platform default search path is used. If empty, only the .hg/hgrc from
            the current repository is read.
    

    所以你可以这样做:

    HGRCPATH= hg version --debug
    

    mercurial 开发人员鼓励每个人在脚本中使用此咒语,以避免 mercurial 命令的含义取决于用户的配置。有关 Mozilla 自动化 mercurial 的更多信息,请参阅http://mozilla-version-control-tools.readthedocs.io/en/latest/hgmozilla/automation.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-04
      • 1970-01-01
      • 2019-06-21
      • 2015-10-09
      • 1970-01-01
      • 2019-07-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多