2

I'm hoping that someone will be able to help me better understand version control in this scenario. Currently we're thinking of either implementing VisualSVN or Mercurial, but want to get our strategy figured-out first.

I'm part of a two man development team working on porting and maintaining a bespoke CMS system. We're looking to keep a "stable" branch, and each have our own dev branches as required.

Where we're not sure is that each customer requires their own customisations (templates, stylesheets, etc). I'd expect these to then be branches from stable. Ideally we'd like a way to ensure that any changes made to stable (such as merging a dev branch back in or adding a hot-fix) get pushed out to the customer branches.

  • Is there a way to ensure that these customer branches always get automatically brought forward to the most recent changeset ?

  • Can we choose to exclude certain files (such as *.css) from getting pushed to the client branches after the initial branch operation ?

Looking at this you'd be able to go into each customer branch and pull from stable, merging the latest changes in. In the event that we end up with lots of customer branches, is there a better way to do this ?

I've found some questions that seem to offer good advice

Apologies if I'm coming at this backwards, but all suggestions would be appreciated.

Community
  • 1
  • 1

1 Answers1

3
  • Is there a way to ensure that these customer branches always get automatically brought forward to the most recent changeset ?

You do this by going to the branch, pulling from stable and merging.

  • Can we choose to exclude certain files (such as *.css) from getting pushed to the client branches after the initial branch operation ?

No, you don't exclude files like that when you merge. You should instead structure your files so that you have a base file — call it base.css — and then you have client.css which is an additional style sheet. That way you can override things from base.css in client.css as needed and you get the latest version of base.css when you merge with your stable branch.

You can often use the same system for other files that need change on a per-client basis: configuration files and themes.

Looking at this you'd be able to go into each customer branch and pull from stable, merging the latest changes in. In the event that we end up with lots of customer branches, is there a better way to do this ?

Nope, that's the way it works. You can of course script this to make it more convenient for yourself and to reduce the risk of errors.

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
  • Hello Sir, could you please take a look at my question [here](http://stackoverflow.com/q/36157555/3287204)? Thanks in advance ... :) – Yash Sampat Mar 24 '16 at 16:33