XDR
XDR

Reputation: 4490

Sharing .hg/hgrc settings across all clones

Is there any way to easily share .hg/hgrc settings across all clones of a Mercurial repo?

e.g., I want to automatically enable the commitsigs extension for all clones of a repo (obviously, I'd include a copy of commitsigs.py in the repo). If I make other settings changes over time, I want them all to be easily pushed out to all clones.

I want to have:

  1. hg clone automatically setup the .hg/hgrc of a new clone
  2. all clones receive updated settings from the central repo (presumably on bitbucket.com)

If there is no built-in functionality for this, is the best practice to:

  1. have a mandatory.hgrc in the root of the repo
  2. use the ACL extension to restrict committers & pushers for mandatory.hgrc
  3. have scripts in the root of the repo named something like setup-hg.sh & setup-hg.bat (are there better, more standard names?) that add the following to .hg/hgrc (or that overwrite .hg/hgrc):

    %include ../mandatory.hgrc
    
  4. include a README.md containing instructions to run setup-hg.sh or setup-hg.bat, depending on your platform

Upvotes: 1

Views: 92

Answers (0)

Related Questions