Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial workflow question (how to handle Config files)

Tags:

.net

mercurial

I have a long standing problem: at work we're using mercurial as a DSCM, but we can't figure out how to keep our config files in sync.

The problem is that we want to keep track of config files and want to be able to exchange the config file contents among developers, but every developer wants to have his connectionStrings section independent of others'.

Is it possible to somehow keep config files tracked but to omit the connection strings section when pulling and pushing?

We tried adding config files to .hgignore but when someone adds something important to config file we have to share it by email.

Thank you.

like image 750
Valentin V Avatar asked Sep 04 '09 12:09

Valentin V


1 Answers

If you can't deal with it with the inclusion of custom settings, just have a base config file in the repo.

Then have each developer put it's own customization on top (with mq). If the customization isn't too intrusive the merge will always go well.

There is another way, where you repeatedly merge your customization, but then when pushing you have to remember not to push the merge branch (tX is mainline, c1 is the customization)

t1-t2-t3-t4-...-tN
  \    \      \   \
   c1---c2-----c3--c4

The dev needs and push changes who only have tX as parents, cX should never escape the repo.

like image 191
tonfa Avatar answered Nov 09 '22 17:11

tonfa