tags:

views:

66

answers:

2

The context: i have a project, that contains configs/ directory, which contains (surprise-surprise!) a set of config files: database.php, facebook.php, twitter.php, cache.php, etc

What I did in svn: I have created branches per specific file and made changes there (changed database connections, facebook API keys, etc). So they were stored in my private branch.

Now I'm trying to migrate to "modern" nowadays DSCM - Mercurial. And I cannot get any possibility of doing the same.

Any ideas?

A: 

I would use hg branch to create a private testing branch as well as a development branch and a release branch.

hg branch mock_settings

hg branch dev

Make your private testing changes on mock_settings, merging from dev to mock_settings to do a settings test.

This compartmentalizes test settings from development from release.

Paul Nathan
1. that branches will be pushed to server too? 2. is it possible to branch only specific file or folder at least?
zerkms
For release, I would suggest not publishing the repository, but using a release process. It would `merge` *dev* branch to *release*, `clone` s to a testing VM, `update` s to `release`, then uses `hg archive` feature to produce a released package.
Paul Nathan
so if it's a team of 10 developers - wouldn't it be a great headache to follow your advice?
zerkms
In the case of multiple developers, each developer can be given a branch to do most of his work on, which gets merged up to dev on review approval - the rest follows.
Paul Nathan
+1  A: 

According to advices from #mercurial at irc.freenode.org i mentioned to modify my code so personal configs could be loaded from separate directory which is stored in another repo.

zerkms