Search code examples
configurationmercurialdvcstortoisehg

How to share part of repository configuration in Mercurial with team members?


I keep some repository specific configurations of TortoiseHG in .hg\hgrc.

Is there a way to share those setting with all members of my team?

I am looking for a solution similar to keeping list of ignored files (a version controlled .hgignore file kept in repository itself).


Solution

  • Both solution will require some handwork on all sides

    Fix of Greg idea

    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. Environment variables and ~user constructs are expanded in file.

    I.e you can %include in repo's .hgrc file, which is placed in repository and ask teammates to make the same change in their .hgrc also

    Use Projrc Extension

    Projrc Extension

    This extension makes Mercurial look for and parse .hg/projrc for additional configuration settings. The file is transferred on clone and on pull (but never on push), after confirmation by the user, from a list of servers that must be configured by the user. For security reasons the user must also select which projrc configuration settings will be transferred

    Handwork will be adding and enabling extension and configuring list of servers and acceptable sections