Home | Download/Install | Documentation | Packages | Screenshots | News | Forum/Mailing-lists | Contact | GForge

Branching and merging

Using alea_branch

Starting with Openalea 1.0, you now have a tool to branch/merge your versions. By default it just print commands and doesn't do anything. This lets you check what is about to happen. You also need write access to the repository you want to modify.

Creating a branch for release 1.1

alea_branch openalea 1.1
#check output
alea_branch --not-dry-run openalea 1.1

Re-creating a branch for release 1.1 (because of a mistake)

alea_branch -e openalea 1.1
#check output
alea_branch --not-dry-run -e openalea 1.1

Branching a particular package that was forgotten

alea_branch -p forgottenpackage openalea 1.1
#check output
alea_branch --not-dry-run -p forgottenpackage openalea 1.1

Sync a particular package with trunk

alea_branch -u thepackage openalea 1.1
#check output
alea_branch --not-dry-run -u thepackage openalea 1.1

Sync some packages with trunk

alea_branch -u pkg1 -u pkg2 openalea 1.1
#check output
alea_branch --not-dry-run -u pkg1 -u pkg2 openalea 1.1

Sync all packages with trunk, one-by-one

alea_branch -u ALL openalea 1.1
#check output
alea_branch --not-dry-run -u ALL openalea 1.1

Sync all packages with trunk, single commit

alea_branch -u ROOT openalea 1.1
#check output
alea_branch --not-dry-run -u ROOT openalea 1.1

HELP!

alea_branch --help
This tool is implemented in openalea/misc/src/openalea/misc/alea_branch.py

Further information

About branching with SVN, have a look at the subversion manual.

Manual Instructions

create a branch

  
    svn copy https://scm.gforge.inria.fr/svn/vplants/vplants/trunk \
         https://scm.gforge.inria.fr/svn/vplants/vplants/branches/release_0_7 \
    -m "Creating a branch of vplants/trunk."
Keep track of the SVN revision at which the branch was created !! and note the usage of https instead og http.

Merging the trunk on the branch

If an important revision has been made on the trunk and you want to merge it on your branch, proceed as follows. If you are in the package PlantGL of your branch at and you want to get the trunk changes from revision xxxx to revision yyyy, then type:

  svn merge --dry-run -rxxxx:yyyy https://scm.gforge.inria.fr/svn/vplants/vplants/trunk/PlantGL

where –dry-run prevent to do any physical change. If you are sure about what you are doing, remove this options.

Once happy with your new version (e.g., compilation is fine), remember to commit the new version you have on your branch

Committing

When you commit the local modification, make sure your log message mentions that you're porting a specific change from one branch to another. For example:

  $ svn commit -m "integer.c: ported r344 (spelling fixes) from trunk."
  Sending        integer.c
  Transmitting file data .
  Committed revision 360.

Get the version when was created the branch

  
  svn log --verbose --stop-on-copy

Merging the branch on the trunk

This step should be done only once when your branch is stable.
  svn merge  -rxxxx:yyyy https://scm.gforge.inria.fr/svn/vplants/vplants/branch/release

where xxxx is the version of the branch (when was created the branch) and yyyy the version of the trunk (HEAD). Resolve any conflicts you may have, followed by

  svn resolved <filename>

and commit the results. Specify the xxxx and yyyy revision precisely !!!

   svn commit -m "Merged release_X.Y changes rxxxx:yyyy into the trunk (package NAME)."
 
documentation/tools/how_to_use_svn/advanced_operations.txt · Last modified: 2011/12/05 21:23 by user   Back to top
INRIA   INRA     CIRAD     AGROPOLIS
INRIA GForge RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki