Help about old projects
John Arbash Meinel
john at arbash-meinel.com
Tue Apr 3 20:36:57 BST 2007
Massimo Manca wrote:
> Dear all,
> a customer give me a "little" versioning problem to solve. He has a lot
> of source code he developed internally in past years that is
> unmanageable now because it released a lot of releases with
> modifications to customize the software and others to solve bugs.
> He asked me to make this set of unmanageable software to a more better
> organized set. I think to organize the sw in a repository with a branch
> for every customization and simple versioning for every release inside a
> branch. The main problem is the existence of some releases to solve bugs
> in files common to some customizations (branches).
> Is there a way or a rule to solve similar "intricacy" problems in bazaar?
I think your general idea is quite good. You do bring up an interesting
point, about trying to track down what changes (bugfixes, etc) exist on
each branch. Bazaar should help you keep this manageable in the future,
but obviously you have to start from where you are at. :)
The recommended workflow is to make bugfixes their own branch, and then
merge that into different customer installs. Since you are coming from a
legacy system, that may be more effort than it is really worth to you.
But it is something to keep in mind for the future.
One discussion of this is:
The commands are slightly different in bzr versus monotone (we don't
have a 'bzr pluck' command, instead using 'bzr merge -r start..end').
I might recommend a layout such as:
repo/ <- Base repository for all branches using 'bzr init-repo'
bugfixes/ <- branches specific for bug fixes
baz <- names (numbers?) of fixed bugs
releases/ <- Does your project have "official" releases, or just
customers/ <- customized branches for each customer
If you use a shared repository that doesn't have working trees (bzr
init-repo --no-trees), one thing you can keep in mind is that you can
nest branches. Some people find this odd, especially when they come from
something like SVN, where a "branch" location is shared with the working
I personally think it is useful, since you can create branches, and then
realize after the fact that you need a sub-branch. For example:
Oh, I just created a specific fix for jerry. You could do 2 things:
$ cd $repo/customers/
$ mv jerry jerry-tmp
$ mkdir jerry
$ mv jerry-tmp jerry/last
$ bzr branch $OTHER jerry/bugfix
Which gives you
However, anyone who was using 'repo/customers/jerry' as their location,
now have to update their reference since it has been moved. So instead,
you could just do:
$ bzr branch $OTHER $repo/customers/jerry/bugfix
All this to say that you should think of the repository layout as a
namespace. And lay it out in whatever way makes the most sense to you.
More information about the bazaar