Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

Creating SVN Mirror Repository Using SVK

This is an alternative to "vendor branch" method for source code management. I have used it for last 3 months and takes about 30 seconds to merge all ofbiz updates except when you get conflicts. This description does not include trunk/branches for simplicity.

  1. Install SVK.
  2. Create a local SVN (NOT SVK) repository in your system using regular svn command. Under Unix/Linux, you must be logged in as the user of the repository. You can not change owner/group/permission of the repository and have things work correctly. If you need to change any of that, you are better off deleting the repository and recreating it. I also found that I had to make apache (the user of the httpd) the the owner of the repository on my server to make it work correctly over the http.
  3. Tell SVK about this repository. SVK calls it depot.
    svk depotmap
    An editor will pop-up (which can be changed using $EDITOR environment variable). Edit it to point to your repository and save.
  4. Create a mirror of http://svn.ofbiz.org/svn/ofbiz/trunk in your local PC/LAN. We will call it uplink.
    svk mirror http://svn.ofbiz.org/svn/ofbiz/trunk //uplink
        svk sync --skipto HEAD //uplink
    This will mirror the current HEAD rather than the entire history, and shouldn't take much longer than a regular SVN checkout.
  5. Create a working repository for SVN users (it uses the same copy command)
    svk copy //uplink //local
    //local is now the SVN local repository.

Usage

  1. Checkout using SVN (not SVK) from file:///<repository location>/local
  2. Make changes as usual
  3. Use regular svn client commands (e.g. commit, update) for code management which now talk to //local repository
  4. To download updates from OFBiz
    svk sync //uplink
  5. To bring in changes from OFBiz repository but not send changes back
    svk pull //local
  6. To bring in changes as well as send changes up
    svk smerge //uplink //local
  7. To update working copies, use svn update command.
  8. To create a patch of all changes in local repository compared to ofbiz/trunk and store in patchfilename.patch
    svk push -P patchfilename //local
  9. To apply a patch (say bug1.patch) to the repository, place the patch in .svk/patch directory and run
    svk patch --apply bug1 //local 

Thanks to Vinay Agarwal for this tip

  • No labels