GOAL: draft for a quick start guide to set up a simple strategy that allows you to maintain a customized version of OFBiz under SVN revision control and synchronized with the standard OFBiz SVN.
- This strategy is a simple implementation of the Vendor Branch Pattern; for more details about Vendor Branches refer to the "Version Control with Subversion" manual (see here)
- Here is a specific simple strategy for Windows
- Note that for the development phase you may prefer to directly work with the trunk following this strategy. You may even use it in production see these threads
Overview: The plan is to develop a customized version of OFBiz called customofbiz, but we want to stay up to date with the official OFBiz development. We will target to do the update once every month but it can be done at any point in time.
- Get OFBiz from the official Apache SVN server (let's say r482800 - this in no way suggests that revision is good, bad or otherwise it's just a number);
- Import it into the local SVN repository as the ofbiz project; and tag it as ofbiz r482800;
- Use it as the base for my customofbiz project making changes as needed to do the customisation.
- Next month get the latest OFBiz revision, let's say r483333, from the official Apache SVN and update the local ofbiz project in the local repository with it (also adding a tag to it, for example ofbiz r483333).
- Finally do a merge between ofbiz r482800, ofbiz r483333 and my working copy (containing the up to date customofbiz project), resolve the conflicts and commit everything to the local customofbiz.
Here is the local repository structure to maintain:
ofbiz/current ---> this will contain the latest official OFBiz release
ofbiz/ofbiz-<revnumA> ---> these are the monthly tags for the official OFBiz release (e.g. ofbiz-r482800, ofbiz-r483333, etc...)
customofbiz/trunk ---> this is the trunk of the customofbiz project (initially it will be the same as ofbiz <revnumA>)
How to set up an SVN repository and start the svn service
Initialization of an empty repository
- Edit the ./svn-repos/conf/svnserve.conf file
- Edit the ./svn-repos/conf/passwd file
Start the service
Import Apache OFBiz for the first time and create the customofbiz project
Get the revision or latest version of OFBiz you will be starting from for this sample its r482800:
Import it as the ofbiz project in the repository
Make a tag for ofbiz r482800
Create the "ofbizcustom" project (initially it's a copy of the OFBiz r482800 tag)
Working with the customofbiz project
Checkout the trunk of customofbiz
- Make changes to customofbiz and then commit the new revisions to the local repository etc...
How to synch customofbiz with ofbiz every month
Every month we get a new OFBiz revision (in this example, we get revision r483333)
Update the current version of "ofbiz" project in the local svn repository and automatically create a tag (r483333, see the -t argument)
question: are the svn properties that need to be applied to new files correctly retrieved from the .svnversion/conf file?
answer: probably not; you have to setup a config file (as described at the bottom of this page) and pass it to the svn_load_dirs.pl script with the -p argument.
We have to synch customofbiz, that was based on the ofbiz-r482800 tag, with the new ofbiz tag ofbiz-r483333; we do this in a working copy, not directly in the repository (before doing this, make sure that your working directory is up to date "svn up" and has no local changes "svn st").
- Conflicts are possible and you will need to fix those in your local working folder, test and then commit the changes.
It is also a good idea to tag the new customofbiz revision.
Continuing with the example, let's say that one month later, you want to export a new OFBiz release (r486422) and import it with (svn_load_dir.pl) in the ofbiz/current and as a new tag ofbiz-r486422; Use the following command to perform the merge (thanks to Kenneth Porter for the tip):
Tip: export a local svn rather than direct from the OFBiz SVN server
Taking a complete snapshot from the live SVN server every merge can be a long job and place additional load on those servers. The export process describe above can also be done from a locally held OFBiz version that you update using standard "svn up" command.
First time round do a clean checkout to a local folder "ofbiz_clean"
Next export the local "ofbiz_clean" rather than the OFBiz SVN server
Then you follow on with the instructions above to import and merge until you come to your next update at which point you
and then again export the local copy