You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Arnaud Le Hors <le...@us.ibm.com> on 2001/02/14 02:15:51 UTC
Managing CVS branches
Hi all,
I think everybody needs to understand how CVS branches are meant to be
used. We are developing xerces1 on the trunk and xerces2 on a branch.
Several pieces are common to both projects (DOM, JAXP, ...) and we can
benefit from using CVS branches to save us from having to make changes
to common components in both branches. CVS can do it for us
automatically. But this requires everybody to understand how to use CVS
properly.
All it takes really is a little discipline, and a few tags. I'll explain
on the basis of merging changes from the trunk to the branch, because I
think that's going to be the most common case, but the other way around
can be done just the same.
------------
1) In an up-to-date xerces1 checkout, tag the trunk with something like:
cvs tag merge_to_x2_MMDDYY .
2) Merge the changes from the trunk to the branch
You first need to figure out what the version of reference is. The very
first time, it's the one from which you created the branch and you don't
have to worry about it. But that's already over ;-) and then, it's the
version you created from the latest merge. I wish CVS was smarter and
remembered that. But it's pretty lame (despite the fact that's what
everybody uses) and all it knows is the version from which the branch
started. So we have to rely on a tag to mark the latest merged version.
That's what the tag we set in step 1 is about.
In an up-to-date xerces2 checkout, do:
cvs update -j merge_to_x2_MMDDYY -j merge_to_x2_MMDDYY . >
/temp/merge.log 2>&1
make sure to pick the LATEST two tags of this form!!
All this does really is to merge the changes between the two versions to
the branch.
3) Review the results (using merge.log). There may be conflicts, there
may be changes you don't want, etc... Clean everything up and make sure
everything is all right.
4) check that in with something like:
cvs commit -m 'merge from trunk' .
5) Tag the result so that we can later find out what versions on the
branch were created from which merge.
cvs tag x1_sync_MMDDYY .
------------
Note that this operation could be done on smaller sections of the code
rather than the whole source but it then makes it much harder to know
exactly what we have.
The cleanup maybe quite fastidious at times. But it is much less if it's
done quite frequently and if people avoid applying the same change by
hand on both branches.
Also, the merge operation only works on files that have the same name
*and* same location in the source tree. So watch out for files in
directories that have been renamed, such as util vs utils (thanks to
Andy who couldn't live with this awful 's' ;-)
Obviously, we also don't want everybody to do that at the same time. For
that matter the best is probably to send out a message to this list and
let others know what you're doing.
Questions?
--
Arnaud Le Hors - IBM Cupertino, XML Strategy Group
Re: Managing CVS branches
Posted by Andy Clark <an...@apache.org>.
Arnaud Le Hors wrote:
> Also, the merge operation only works on files that have the same name
> *and* same location in the source tree. So watch out for files in
> directories that have been renamed, such as util vs utils (thanks to
> Andy who couldn't live with this awful 's' ;-)
I personally see no problem with fixing what was broken in Xerces
1.x, even if it means renaming some directories. I'm making an
effort to bring the naming conventions back inline with the Java
core. If you don't agree, please throw yourself out of the nearest
window. ;)
--
Andy Clark * IBM, TRL - Japan * andyc@apache.org