Discussion:
Problems with tagging files
Ziggy
2010-07-22 16:30:32 UTC
Permalink
Hi guys,

I am having some trouble with checkout out files using a release tag and
hope someone here can help.

Basically my repository is structured like this

module1
- src
- jsp
- conf

module2
- src
- jsp
- conf

A release can include changes in either module1 or module2 or both. There
are several developers that could be working on any files in any of the
modules.

To work on a new release, we checkout the latest release (e.g. LIVE-REL-2.4)
using the following command

--
cvs checkout –r “LIVE-REL-2.4” moduleName
--

Note that we dont check out from trunc. The reason for this is that if you
checkout from trunc you are including files which other developers have
checked in but you dont want to include in the next release.

After we've checked out the latest release, we make the changes and check
back in the new files. For the delivery, we label all the new files we've
checked in with a bug specific tag.

--
cvs tag BUG434 file1
cvs tag BUG435 file2
--
We then apply a new label to every file that is on the current release.

--
cvs tag – r “LIVE-REL-2.4” “LIVE-REL-2.5”
--
We then add the new release tag for the new files we've checked in

--
cvs tag –r “BUG434” “LIVE-REL-2.5”
cvs tag –r “BIG435” “LIVE-REL-2.5”
--
The above ensures that the new release will include all the files from the
"latest delivered release" plus bug fixes that we want to include in the
release. To checkout the new release we just do this

--
cvs checkout –r “LIVE-REL-2.5” moduleName
--

There is a bit of a confusion as to whether this process actually work.
We've suddenly had people complain that they cant check in any new files if
they check out by tag. The error that is generated is shown below

--
sticky tag `LIVE-REL-2.5' for file `DatabaseFacade.java' is not a branch
--


I have been doing some reading on this error but i havent been able to find
a solution to it.
Jim Hyslop
2010-07-24 13:19:10 UTC
Permalink
Post by Ziggy
To checkout the new release we just do this
--
cvs checkout –r “LIVE-REL-2.5” moduleName
--
There is a bit of a confusion as to whether this process actually work.
We've suddenly had people complain that they cant check in any new files if
they check out by tag. The error that is generated is shown below
--
sticky tag `LIVE-REL-2.5' for file `DatabaseFacade.java' is not a branch
--
That's correct.

This exactly proves the other email I just sent - you must use branches
to do what you want. There's no way around it.
Post by Ziggy
I wish i can do this but i cant seem to be able to convince any of my
bosses
that we should support branching. We dont support it because it
apparently
makes things a lot more complicated than they need to be.
Any scheme you come up with to avoid using branches will be far more
complex, tedious and error-prone than creating and using branches
effectively. Branches are like making left turns while driving (or right
turns, if you normally drive on the left). The turns are more
complicated, but unless you want to be going around in circles your
whole life, you have to use them.

Branches exist to simplify software development. They are a basic, core
concept of any version management software.

CVS has been around for over 20 years, and RCS who knows how long before
that. If branches were the bane of developers' lives, then *nobody*
would use them, and support for branching would have been dropped long
ago. The fact that every major version management tool supports branches
(and some software, such as ClearCase, automatically creates branches)
is a pretty strong testimony to their effectiveness.

Find out what /specific/ objections your bosses have, and feel free to
post them here so we can provide you with effective counter-arguments to
their objections.
Post by Ziggy
- Prevent people from checking in files that are not ready to be
delivered
in the next release.
This might work as i would then be able to just checkout from 'HEAD'
everytime there is a new release.
That is a bad idea. That means developers can go weeks (or even months)
before checking work into the repository. The longer developers wait to
check in, the harder it becomes to merge changes between different
developers. Not to mention the risk of losing data in the event of a
hard drive failure.

It also does not address the issue of a critical bug that gets
discovered after you have created the release. Even with the most
diligent testing, sooner or later you *will* encounter a bug that slips
through, and absolutely has to be fixed NOW, even though developers have
checked in their work for the next release.
Post by Ziggy
Now my questions are as follows,
- Is there some way i can checkout using the above procedure without
coming
across the "sticky tag is not a branch" error?
No.
Post by Ziggy
- Is there a better way i can achieve the same steps above without
having to
use branching?
No.
Post by Ziggy
- This sounds to like its one of the most common situations in a
development
environment. How do other people do it without using branching?
They don't. They use branches.
Post by Ziggy
- And finally if you have any knowledge of subversion, do you know if
it
works the same way and i will have the same problems if i change to
subversion?
I haven't used subversion, but I strongly suspect it will have the same
issues. Branches are a core concept of any version management system.

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
Consulting * Mentoring * Training in
C/C++ * OOD * SW Development & Practices * Version Management

Loading...