Publish to deliver instead of deliver to publish
The long
prehistorical CM tradition of doing the development in a single branch with the lack of
tool support, has left a legacy (which is still very popular nowadays): the belief that one must physically deliver (by merging) all the versions to be published to one single designated
integration branch, which should then be the exclusive place for making baselines and creating builds.
This might seem as a simple and clear approach at the first sight, but it hides very important drawbacks: the delivery done in such way is bulky and non-reversible. I.e. it is not possible to include/exclude separate changes atomically from the delivery or correct/tune the included changes individually.
Apart from that there is extra harm caused by the
trivial merging (i.e. pure duplication), which is often extensively used at the bulky deliveries. This brings ambiguity to the system, which would make it
unmanageable and thus would call into question the whole idea of the
SCM itself.
Creating trivial merges and having bulky deliveries to a single branch have the same root cause: inability to decouple between the physical and logical layers.
In regard to baselining one should consider baselines as a logical (upper) level to be decoupled from the physical (lower) level of versions. The baseline is a logical representation of a set of versions and it shouldn't be confused with the physical aligning of the selected versions by e.g. the (integration) branch type.
The
described deliver by publishing strategy strives for designing an
atomic and
reversible delivery and it relies on the two important points:
- There should never be a need for
trivial merging. Instead of creating physical clones, logical references to a single unique physical instance should be created instead. If one needs to publish something, then one can just do it by marking it explicitly without a need to physically move it anywhere: the versions located in the developer's branch are not any worse than if they were located elsewhere.
- If there is a need for an actual merge, do the
home merge and
publish it in place.
--
TatyanaShpichko - 03 Sep 2007