Testing Branches - Project JEDI Wiki

Testing Branches

From Project JEDI Wiki

Jump to: navigation, search


[edit] What is a branch?

A branch is a copy of the main code tree (trunk). Experimental or potentially unstable code is developed on a branch, so code can be developed, reviewed and tested without affecting the trunk (which everyone uses).

The JCL repository looks like this:

Repository (https://jcl.svn.sourceforge.net:443/svnroot/jcl)
The URL that you checkout to get a copy of the JCL on your machine is:

When a branch is created, it is a copy of the trunk.

e.g. /trunk is copied to /branches/StrangeBug
So URL to the jcl folder on the StrangeBug branch would be:

[edit] Example usage of a branch

Peggy reports a strange bug.
Elahn creates a branch called StrangeBug and commits a possible solution to it.
Peggy switches to the branch StrangeBug, tests it and finds that it makes the situation worse.
Peggy switches back to the trunk.
Elahn modifies the code based on Peggy's feedback.
Peggy switches to StrangeBug and finds that it works perfectly.
The branch StrangeBug is merged into the trunk, so now everyone benefits from the bugfix.
Peggy switches to the trunk.
Elahn deletes StrangeBug.

[edit] How do I switch to a branch?

  1. Right-click on the root folder (e.g. jcl) and select TortoiseSVN --> Switch... Note for advanced users: You can also switch a sub-folder (e.g. jcl\source\windows) or a specific file.
  2. Enter the URL of the branch and click OK. e.g. https://jcl.svn.sourceforge.net:443/svnroot/jcl/branches/StrangeBug/jcl
  3. That's it! TortoiseSVN will now convert your jcl folder from the trunk into the branch. (in our example, that's StrangeBug)
  4. To switch back to the trunk, do the same thing, but use the URL: https://jcl.svn.sourceforge.net:443/svnroot/jcl/trunk/jcl
Personal tools
Project JEDI
Code Library
Visual Component Library
Version Control System
Math Library
Code Formatter