Branching and Merging of PubMan subversion projects

Please Note: Page under development

= Create branch =
 * Create new development branches in the affected repositories.

$ svn copy https://subversion.mpdl.mpg.de/repos/ /trunk/ \ https://subversion.mpdl.mpg.de/repos/ /branches// \ -m "Creating a branch of / /trunk/ for ..."

where,.


 * Checkout branches in new local working directory

$ mkdir path_to_escidoc_dir/branches/ $ cd path_to_escidoc_dir/branches/ $ svn co https://subversion.mpdl.mpg.de/repos/ /branches//

= Eclipse setup =

Prerequisites

 * subclipse plugin (1.6.10+)
 * maven plugin (0.10.0+)

Create new eclipse workspace

 * 1) File->Switch Workspace->Other
 * 2) Add new name of workbench, e.g. "/workspace_"
 * 3) Check

Import eSciDoc top-modules
in created workspace as Maven Projects (is needed for SVN update of top-module and changes in /pom.xml, etc.)
 * 1) File->Import->Existing Maven Projects->Next->Root Directory->Browse
 * 2) Select  folder in path_to_escidoc_dir/branches//
 * 3) Uncheck all sub-modules
 * 4) Press button "Finish"
 * The top-modules can be added to the eclipse Working Set of Package Explorer, it can be named, e.g. "Top modules".

Import eSciDoc sub-modules
which will be changed as Maven Projects. Same procedure as top-module above

= Workcycle =

Switching between main trunk and development branch
Modules, which will not be changed can be switched to the main trunk. It ensures a recent state of the modules after As soon as a module is supposed to be changed, it should be switched to the branch You can work now on the branch and you need not be afraid to make any changes in main trunk
 * Right mouse button click on the module->Team->Switch to another Branch/Tag/Revision ...
 * Select...->trunk// ->OK
 * Right mouse button click on the module->Team->Switch to another Branch/Tag/Revision ...
 * Select...->branches/<name-of-the-new-branch>/<top-module>/ ->OK
 * Subversion url of the selected module can be checked in Properties->Subversion

main trunk -> branch
is needed to replicate the changes in the main trunk to your branch. It can happen if development of your branch and main trunk goes parallel.
 * 1) check status of the branch with
 * $ cd path_to_escidoc_dir/branches/<name-of-new-branch>/<top-module>
 * $ svn status
 * or in eclipse (Package Explorer subversion icons)
 * 1) commit changes in the branch, if changes have been done
 * 2) Right mouse button click on the module->Team->Merge->Merge a range of revisions->Button Next->Merge from: (Select trunk/<top-module>/ )
 * 3) Check radio button "Select revisions on next page"->Button Next
 * 4) Check all revisions in the list since the branch has been created.
 * You can check the start revision of the branch in svn history of <top-module>
 * 1) Press Next Button
 * 2) Resolve merging conflicts if needed
 * You can revert merge results with Right mouse button click on the module->Team->Revert
 * 1) commit changes to the branch
 * You can revert merge results with Right mouse button click on the module->Team->Revert
 * 1) commit changes to the branch

branch -> main trunk
is needed after complete implementation of the features in the branch.
 * 1) switch url of the branched module to the url of main trunc module.
 * 2) commit changes

= Related links =
 * Subversion Branching and Merging

Please add your comments: Talk:Subversion_Branching_and_Merging