Over a million developers have joined DZone.

Subversion - We don't need no stinking trunk!

· Java Zone

Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management, brought to you in partnership with Stormpath.

Most software developers seem to use a directory called 'trunk' in Subversion. I always wondered what trunk is good for.

In real life software development in a team of, let's say, about 20-30 developers some coordination is needed when making a release version. Often this happens as follows (and I am simplifying):

  1. All developers commit their stuff to the trunk.
  2. The trunk is copied to a release branch, e. g. RB-2.
  3. The new release (with 3) starts on the trunk.
  4. Every developer has to check out the version he needs for further programming, either the trunk for the new release, or the release branch.

Now when a typical developer who is not interested too much in organisational things wants to add an incredibly important, last second change to the release version, he often asks the following question - and I have heard it so often that I decided to write this post:

"Where can I commit my stuff for the current release? On the trunk or...?"
Usually another developer answers slightly irritated: "On the relase branch, of course, we created it yesterday."
- "Ah, sorry, I missed that somehow."

There is a very small idea to improve such a situation (without kicking someone somewhere):
Don't use the word 'trunk' for the trunk, but give it the name of the release branch.

So we might have a few SVN directories like RB-1, RB-2, RB-3.
And everybody knows what stuff goes to which branch.

I admit, for a good developer this idea might sound strange or ridiculuous, but in real life, you know, not everybody is perfect or takes care of all those coordination issues.

Another good idea would be to jump to a more modern system like GIT:-)
But that's a different story.

Building Identity Management, including authentication and authorization? Try Stormpath! Our REST API and robust Java SDK support can eliminate your security risk and can be implemented in minutes. Sign up, and never build auth again!


The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}