Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should be the "trunk" development, or release

I have the unfortunate opportunity of source control via Borland's StarTeam. It unfortunately does very few things well, and one supreme weakness is its view management. I love SVN and come from an SVN mindset. Our issue is post production release we are spending countless hours merging changes into a "production support" environment.

Please do not harass me this was not my doing, I inherited it and am trying to present a better way of managing the repository. It is not an option to switch to a different SCM tool.

Current setup

  • Product.1.0 (TRUNK, current production code, and at this level are pending bug fixes)
    • Product.2.0(true trunk anything checked in gets tested, and then released next production cycle, a lot of changes occur in this view)

My proposal is going to be to swap them, have all development be done on the trunk (Production), tag on releases, and as needed create child views to represent production support bug fixes.

  • Production
    • Production.2.0.SP.1

I can not find any documentation to support the above proposal so I am trying to get feedback on whether or not the change is a good idea and if there is anything you would recommend doing differently.

like image 225
Nix Avatar asked Feb 02 '26 06:02

Nix


2 Answers

I use an intermediate approach inspired by Henry Kniberg's article Version Control for Multiple Agile Teams. I'm quoting a small part below:

The big picture

OK, now I've gone through a fairly detailed example of how to put this pattern to use. Now let's back out a bit and look at the big picture.

In the mainline model, a branch is called a codeline (in fact, branch is considered to be an implementation of a codeline). Sometimes these are called streams.

A codeline's parent (i.e. the codeline that it originated from) is called its baseline. Mainline is the codeline that has no baseline.

So in our examples above we could conclude that:

  • The trunk is our mainline. It has no parent right?
  • All other codelines (release 1.0, team A work, team B work) have the trunk as baseline.

Here's a more complex example:

alt text
(source: infoq.com)

This picture tells us that:

  • The project X codeline was spawned from the mainline. The project is now complete, so the branch is closed.
  • Team A has an active work branch that was spawned from the mainline.
  • Team A also has an ongoing spike that was spawned from the work branch.
  • The release 2.3 branch is closed, since 2.3 is no longer in production and won't be maintained.

Each codeline has a relative firmness level with respect to its baseline, i.e. each codeline is either more firm or less firm (softer) than its baseline.

  • A firm codeline is stable, thoroughly tested, changes seldom, and is close to release.
  • A soft codeline is unstable, barely tested, changes often, and is far from release.

When drawing codelines, firm codelines branch upwards and soft codelines branch downwards. So looking at the picture above, we can conclude that:

  • Release 2.3 is firmer than mainline.
  • Team A work is softer than mainline.
  • Team A spike is softer than team A work.

To summarize:

  • The trunk is the DONE branch (always releasable)
  • Work is done in work branches (one per team) that may be less stable than the trunk
  • Release branches are created based on the trunk at the time of the release.

I warmly recommend reading the whole article.

like image 166
Pascal Thivent Avatar answered Feb 05 '26 07:02

Pascal Thivent


Here's my general advice for structuring build streams:

+HEAD - master -> current development 
+ tags
   + version1 
   + version1.sp1 
   + version1.sp2 
   + version2
+ branches
   + version1.sp2.fixes <- at some point, this will get promoted to version1.sp3 
   + version2.fixes <- at some point, this will get promoted to version2.sp1 
   + version2.nix.feature1 <- this is your (nix's) private version2.feature branch 
   + master.nix.feature2  <- this is your (nix's) private new development feature branch.

Basically, you NEVER commit directly to a .fixes or the master branch - only an integration process does that.

Anyhow, pretty much any source control tool will support this model.

like image 26
Chris K Avatar answered Feb 05 '26 08:02

Chris K



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!