wiki:Obsolete/UpdatingVendorBranches

THIS PAGE IS STILL EARLY WORK IN PROGRESS!! Just jotting down what's fresh in my head /TQH

Some notes on vendor branches under Haiku, because I always forget and svn-load or svn-load-dirs.pl has almost no documentation.

Vendor branches in Haiku follows the description here: http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html

All our vendor branches exist under http://svn.haiku-os.org/haiku/haiku/vendor/

When updating a vendor branch with a newer version we want to achieve the following:

  • Update the vendor branch 'current' tree with the new version.
  • Tag the 'current' tree as a release tag.
  • Merge 'current' into our ordinary code.

To do so we use svn-load or svn_load_dirs.pl. Afaik they use the same syntax and neither has any proper documentation. You should note that it will also commit and tag the code when run, so make sure you do it right.

These are the steps:

  • Download the new version to a dir. In this example we use someApp-1.1.
  • Use svn-load to update, commit and tag.
    $ svn-load --help
    Usage: svn-load [options] svn_url svn_import_dir dir_v1 [dir_v2 [..]]
    
    Options:
      -h, --help            show this help message and exit
      -t tag_dir            create a tag copy in tag_dir, relative to svn_url
      --no-prompt           non-interactive mode - don't ask any questions
      --wc=working_copy     use the already checked-out working copy at path
                            instead of checking out a fresh working copy
      -m FILE, --move-map=FILE
                            Load a mapping of regular expression patterns to
                            lambda functions of match objects from FILE
    
  • Since we want to have a tag for the release we need to specify it. We do that with -t 1.1 for a 1.1 release.
  • We want the svn_url to point to one of the different vendors in http://svn.haiku-os.org/haiku/haiku/vendor/ . You should use a svn+ssh url though so you can commit. For someApp it could look like this:
    svn+ssh://DEVNAME@svn.haiku-os.org/srv/svn/repos/haiku/haiku/vendor/someApp
    

(Replace DEVNAME with your dev username.)

  • The svn_import_dir is always current.
  • Finally we need to specify the local dir where we have the new version. ~/somwhere/someApp-1.1
  • If we put all this together we get the command like this:
    svn-load -t 1.1 svn+ssh://DEVNAME@svn.haiku-os.org/srv/svn/repos/haiku/haiku/vendor/someApp current ~/somwhere/someApp-1.1/
    

This will commit the new version of someApp to current adding, removing and modifying files as necessary. it will also tag it as a 1.1 release.

All we need to do now is merge it into the real code.

TBD but here is an example: Stand in your haiku working directory (src and others are childs)

svn merge --ignore-ancestry svn+ssh://DEVNAME@svn.haiku-os.org/srv/svn/repos/haiku/haiku/vendor/SomeApp/SomeOlderVersion/ svn+ssh://DEVNAME@svn.haiku-os.org/srv/svn/repos/haiku/haiku/vendor/SomeApp/SomeNewerVersion/ PATH_TO_VENDOR_CODE_INSIDE_HAIKU_TREE

ignore-ancestry is to do a path-based comparison only, ignoring any relations between files and directories. Similar to what diff does, and should usually be used for vendor branches.

To Be Done!

Last modified 8 years ago Last modified on Dec 29, 2010 9:38:59 PM