Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: No patches when moving files

...

  • Command line (see the howto below)
  • Eclipse internal command (don't use finish but rather select project to avoid the 2 1st lines in the patch)
  • A tool like Tortoise
Warning
titleNo patches when moving files

Patches must never be used to move files. Else if applied we not only lose history when doing so, but also annotations.
The diff and patch commands (even "svn di" and "svn patch") are unable to keep the information about moved files, only deleted and created.

So if you are moving files, simply create patches if some files refer to the paths of the relocated files (and hence need to be changed) and tell the committers which files should be moved (from -> to)

 

We prefer that you build your patch from the root as it's easier for commiters to merge your change. So please make your patch files from the OFBIZ_HOME directory (usually ofbiz/) and with relative file paths.
"Relative file paths" means tha in your patch file names should look like these :
applications/party/widget/partymgr/PartyScreens.xml
framework/webtools/config/WebtoolsErrorUiLabels.properties
and should not have file names like: C:\myfiles\ofbiz\applications\party\widget\partymgr\PartyScreens.xml

Exemples using command line:

Code Block

svn di applications/product > OFBIZ-number_featureDescription.patch

If you have added new files, then use the "add" command first, then make the diff

Code Block

svn add applications/product/<my-file>
svn di applications/product > OFBIZ-number_featureDescription.patch

You can also specify the exact files that you'd wish to include in your patch file, in case there are files that you have modified but do not wish to submit. For example, you can use

Code Block

svn status applications/product

to see which files have been modified (they start with an "M") or added (which start with a "?").
Then do:

Code Block

svn di applications/product/entity/ applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml > OFBIZ-number_featureDescription.patch

...

Make sure that the from/current revision of your local sandbox (checkout) is the current revision, or a very recent one, from the OFBiz SVN repository. The local revision can be checked by doing:

Code Block

svn info

To make sure you have the most recent revision always do an SVN update before doing the patch with svn diff, something like this:

Code Block

svn up

This must always be done before submitting a patch otherwise the patch just won't work. If your local sandbox is checked out from a separate SVN repository following the vendor branch pattern instead of directly from the OFBiz SVN, then you should do a vendor branch update, merge, and then local update in your sandbox before doing the svn diff to create the patch.

...