Merging the changes from the HEAD stream (Java 5) into the Java 6 stream

You'll need to check out a working copy of the Java 6 stream. Let's assume that you have the Java 6 stream is checked out as "Harmony-java6", i.e.

svn co https://svn.apache.org/repos/asf/harmony/enhanced/classlib/branches/java6 Harmony-java6

To perform a merge, ensure the working copy is up to date:

cd Harmony-java6
svn up

Note the number of the working revision. You get this from the last line of the SVN command output that reads something like:

Updated to revision 767262.

We maintain a repository tag that represents the last successful merge point from the HEAD stream. So you need to merge from that last successful merge point up to the current revision. The changes between those two points are applied to the Java 6 working copy, i.e.

svn merge https://svn.apache.org/repos/asf/harmony/enhanced/classlib/tags/latest-java6-merge https://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk@767262

where "767262" is the revision number of the Java 6 stream workspace as determined above. A useful tip is to do a merge with  --dry-run  first to see what will happen!

Check to see if there are any conflicts reported by the merge. Manually resolve any conflicts by merging the code, and marking the merged file as resolved. Once the merge is completed, check that the Java 6 working copy is still ok:

ant rebuild
ant test

Check that the test results look fine.

Now we need to commit the updates to the Java 6 branch, with a message that shows the span of HEAD revisions we merged into the Java 6 branch. Still in the Java 6 workspace:

svn commit -m "Merge updates from classlib trunk@767262 since r765922"

Finally, update the tag to show the last successful merge point:

svn rm https://svn.apache.org/repos/asf/harmony/enhanced/classlib/tags/latest-java6-merge -m "Remove the old tag based on r765922"

svn copy -r 767262 https://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk  https://svn.apache.org/repos/asf/harmony/enhanced/classlib/tags/latest-java6-merge -m "Create tag based on trunk@r767262 to mark the latest merge revision from trunk to java6 branch"

If during these last steps you get an error saying:

svn: The specified baseline is not the latest baseline, so it may not be checked out.

then this is probably a syncing problem with the svn.apache.org mirrors so try using the master server (currently eris.apache.org) rather than svn.apache.org.

BranchMerge (last edited 2009-09-20 21:55:34 by localhost)