Has anyone tried using the tofu-scale descriped in Practical Perforce by Laura Wingerd together with svn?
The tofu-scale tells us how to propagate changes between branches (codelines). Changes in stable branches should be merged to less stable branches (firm-to-soft), and changes in the less stable branches should be copied to the stable branches (soft-to-firm). See How Software Evolves
This results in development branches where changes made to more stable branches are being merged, and thus improving code in the development branch bringing in new development and bugfixes.
Figure taken from Practical Perforce (ISBN 10: 0-596-10185-6) http://dl.getdropbox.com/u/136976/tofu%20scale.png
So the question is: Can you do this in svn and if; how do you update from the parent when working on a branch? I know from CVS, that updating from one branch to another gives you a lot of problems when you want to merge your changes back into the parent branch (often being the mainline)
trunk/
, branches/
, tags/
structure
trunk/
as your mainline
branches/
- you can distinguish them using a naming convention or even replace branches/
with development/
and release/
svn merge
to perform both merges and copies - read Advanced Merging firstReading more on the subject I found what I believe is a precise description of what is needed in order to do this kind of change propagation between branches in svn.
It is descriped in the book Version Control With Subversion by C. Michael Pilato et al. in the subchapter Basic Merging - Keeping a Branch in Sync
The follwing is cited from the book.
Subversion is aware of the history of your branch and knows when it divided away from the trunk. To replicate the latest, greatest trunk changes to your branch, first make sure your working copy of the branch is “clean”—that it has no local modifications reported by svn status. Then simply run:
$ svn merge http://svn.example.com/repos/calc/trunk
Once you have a clean working copy of the trunk, you're ready to merge your branch back into it:
$ pwd
/home/user/calc-trunk
$ svn update # (make sure the working copy is up to date)
$ svn merge --reintegrate http://svn.example.com/repos/calc/branches/my-calc-branch
$ svn commit -m "Merge my-calc-branch back into trunk!"
Please read the whole chapter (and maybe even the book) before starting on this. It is recommended reading.
Yes, you can do that in Subversion, it is more or less standard practice.
The idea is to merge from the more stable with less change to the less stable, in order to minimize unrelated changes that would make merging more difficult.
Merging back to the mainline is done by first merging all changes from the mainline into the branch, and then copying the branch, that is replacing the mainline by the merged branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With