Check hgrc file on Mercurial

I have a project using mercurial for version control, SCons for assembly, and google test for writing unit tests. The hgrc file intercepts the prefix and runs SCons to create the project and run unit tests. Is there a way to "register" part of the hgrc file so that new verified copies and any merges with my version of the project automatically receive the hgrc file that SCons launches when it tries to commit?

+4
source share
2 answers

You cannot force people to automatically enter entries in their .hg/hgrc when they clone - this will make it possible for someone to put rm -rf ~ into the commit commit, and that would not be a chip for former cloners.

What you can do is include a file called mandatory.hgrc outside the 'hg directory, and then tell cloners to put this line in their .hg/hgrc :

 %include ../mandatory.hgrc 

Although it still shows you a lot of trust.

If you manage the machines, as in many corporate settings, you can use your tools for package / deployment / update (we use a puppet) so that you put everything you want into their /etc/mercurial/hgrc .

+3
source

You cannot check anything in the .hg folder. My team does this, that we have a common mercurial.ini file, which, as part of the dev box installation, we put in our user profile folders.

+1
source

Source: https://habr.com/ru/post/1336618/


All Articles