Date: 2005-02-01T12:08:03
Editor: RichFeit
Wiki: Apache Beehive Wiki
Page: For Beehive Developers
URL: http://wiki.apache.org/beehive/For Beehive Developers
no comment
Change Log:
------------------------------------------------------------------------------
@@ -222,3 +222,36 @@
Tested with NetBeans 4.0 beta 2
Please use New Project > Standard > Java Project with Existing Ant Script for
each subproject. You need to run beehiveCmd.env or beehiveCmd.sh first and
start up NetBeans on the same command window or shell.
+
+
+= Creating and Applying Patches =
+
+== Creating a Patch ==
+
+ 1. cd to the root directory of the Beehive tree.
+ 1. Make sure your ''entire tree'' is updated to a single revision (preferably
the head revision, so you take on the burden of resolving merge conflicts).
{{{svn update}}} here will do the trick.
+ 1. Create the patch. {{{svn diff > patch.txt}}}
+
+== Applying a Patch ==
+
+(This section contains at least one nonobvious step.)
+
+ 1. cd to the root directory of the Beehive tree.
+ 1. Open the patch file (say, patch.txt) and get two pieces of information:
+ a. The root directory for the patch. You'll need to infer this from the
first "Index:" entry. It should be the root of the Beehive distribution, but
it helps to verify this.
+ a. The base revision of the patch. Every file entry should look something
like this:
+
+ {{{
+ ---
netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
(revision 149222)
+ +++
netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
(working copy)}}}
+
+ In this case, the base revision would be 149222.
+
+ 1. (not obvious) '''Sync your tree to the base revision of the patch.'''
{{{svn update -r 149222}}} in the example above. If you don't do this, you
risk applying the patch to a different base, with unpredictable results.
+ 1. Apply the patch. {{{patch -p0 < patch.txt}}} If you use Windows, see
below for information on the {{{patch}}} command.
+ 1. Update the tree to the head revision. {{{svn update}}}. If the patch was
based on an early revision, you may end up resolving merge conflicts. But if
you do, you can thank your lucky stars that you updated to the base revision of
the patch before applying it. :)
+ 1. Build, run DRTs, submit.
+
+== Information for Windows Users ==
+
+If you're running Windows, you can get the {{{patch}}} command as part of
Cygwin (http://www.cygwin.com/). The MKS 6.1 {{{patch}}} command does ''not''
work for this -- if you use MKS, download Cygwin, make sure it's on your path,
and disable the MKS patch.exe.