views:

28

answers:

2

I have two branches (or tags?) where I need to keep the same file structure with different versioned contents. One version contains everything, like development scripts, configuration files, etc. while the other contains only things that get redistributed.

How can I accomplish this using Bazaar?

+1  A: 

If the transformation between the code base and the set of files that will be actually deployed, you could:

  • setup a branch
  • merge your dev branch in that branch
  • only remove the extra files through a script

Then you could setup a bound branch in order to make sure the bazaar repo on your remote deployment server reflect that local deployment branch with its latest updates.

VonC
A: 

All version control systems deal better with branches that converge.

One approach is to base "production" branch off the "development" branch, and only merge changes in the direction "development -> production". So all the private configurations files remain only in "production".

However, in my experience, that tends to be rather painful over the long term because you will inevitably want to merge some things from production to development. There are ways to do it, but they tend to be annoying: they involve either intermediate branches, or backporting changes.

A better solution is to move all the production-specific files out of the tree, so you don't have to deal with with parallel diverged branches at all. That's also a good design practice regardless of VCS concerns.

ddaa