Difference between revisions of "Creating and Applying Patches"

From Opentaps Wiki
Jump to navigationJump to search
Line 1: Line 1:
= Creating Patches =
= Creating Patches =
== Patch of Changes that I Made ==
== Patch of Changes that I Made ==

Revision as of 21:32, 2 October 2008

Creating Patches

Patch of Changes that I Made

To make a patch of the changes you made to opentaps, you can use the svn diff command from a terminal or command prompt.

First, ensure you are in the root directory of opentaps,

  prompt> cd opentaps

To verify that you're in the right directory, ensure that it contains the build.xml and startofbiz.sh files. Next, execute the svn diff command,

  prompt> svn diff

It will print the patch of all changes you made to the screen. To save the output to a file instead, use a redirect,

  prompt> svn diff > mychanges.patch

This command will create a mychanges.patch file that contains all changes you made to opentaps.

If you wish to see changes of only one file or directory, you can specify the file or directory explicitly,

  prompt> svn diff applications/product

This command will make a patch of all your changes to the applications/product/ directory and its children.

Patch of Specific Revision of Opentaps

Let's say you want to create a patch against a specific revision of opentaps, such as the bugfix revision 9593. In order to do this, you will need either a complete checkout of opentaps that's fully up to date or internet access to the opentaps subversion repository. Since it's simpler to use the online opentaps subversion repository, we will go over this technique here.

To make the patch, use the svn diff command and use the -c argument to specify the revision,

  prompt> svn diff -c 9593 svn://svn.opentaps.org/opentaps/versions/1.0/trunk > bugfix.patch

The file bugfix.patch is created and it contains a specific revision of the opentaps repository.