29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15.7 Using multiple branches<br />

The current resources in a project in the repository are stored in a branch. The<br />

CVS repository always has a default branch called HEAD. This is the main trunk<br />

in the repository where development typically takes place.<br />

In some circumstances it may be convenient to create a new branch. This allows<br />

you to isolate the work you are doing from other developers. For example, if you<br />

are trying to debug a problem you could create a separate branch to work from.<br />

This keeps changes that others are making from affecting your debugging efforts.<br />

It also gives you the freedom to change things that might normally affect other<br />

components. In the meantime, the primary development efforts can continue to<br />

take place in the HEAD branch.<br />

When you have accomplished your task in the secondary branch you can merge<br />

the relevant changes back into the HEAD branch.<br />

15.7.1 Creating a new branch<br />

Creation of a new branch in the CVS Repositories view can be seen as defining a<br />

new branch name. The underlying CVS branch is not created until you explicitly<br />

copy a project version or commit contents to the repository. Branch name<br />

definitions persist between workspace sessions until explicitly removed within the<br />

CVS Repositories view.<br />

Note: You need to be careful when using alternate branches. Adding a project<br />

from the branch to the workspace via the CVS Repositories view or<br />

associating it with another branch in another repository deletes all existing<br />

synchronization information currently managed for the given project and<br />

reinitializes with the new information for the newly added/reassigned project.<br />

Using another branch in the same repository does not change the<br />

synchronization information.<br />

There are two options for putting a project in a branch:<br />

► Based on a project version<br />

Choose this option if you are splitting based on an existing project version in<br />

the repository, for example, to fix a bug in a previous version of your project.<br />

Chapter 15. Development in a team environment 537

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!