Load multiple .hgrc files - ie, some with machine-specific settings?

前端 未结 4 1473
北恋
北恋 2021-01-11 15:42

I\'d like to keep two ~/.hgrc files: ~/.hgrc and ~/.hgrc.local – one with \"standard\" settings (eg, username), the other with machine-specific settings (eg, se

4条回答
  •  难免孤独
    2021-01-11 16:37

    There's a not-often used %include directive in mercurial 1.3 and later:

    From man hgrc:

       A  line  of  the  form %include file will include file into the current
       configuration file.  The  inclusion  is  recursive,  which  means  that
       included  files  can include other files. Filenames are relative to the
       configuration file in which the %include directive is found.
    

    so go with:

       %include ~/.hgrc.local
    

    and you should be good to go.

提交回复
热议问题