Question

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).

Was it helpful?

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

OTHER TIPS

You can use the hgrc file in the repository to create repo-specific settings, such as merge tools, extensions and whatnot.

More info here: http://www.selenic.com/mercurial/hgrc.5.html

You could add an example .hgrc to the root of the repository. You can't have this automatically applied when the user clones the repository so you'd have to just tell the developers to copy the file when it is updated.

Unfortunately, you can't enforce this so you'd need to just trust the team to follow the policy of the company / project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top