29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

15.1.4 Change history<br />

CVS maintains a history of source code in a tree structure that shows all<br />

changes. Each change is stamped with the time it was made and the user name<br />

of the person who made it. As a rule, developers will also provide a description of<br />

the change. Given that information, CVS can help developers find answers to<br />

questions such as:<br />

► Who made the change?<br />

► When was it made?<br />

► Why was it made?<br />

► What other changes were made at the same time?<br />

CVS records all changes to a given project in a directory tree called a repository.<br />

CVS does not work with ordinary directory trees; you need to work within a<br />

directory that CVS created for you. Just as you check out a book from a library<br />

before taking it home to read it, you use the cvs checkout command to get a<br />

directory tree from CVS before working on it.<br />

15.1.5 Making changes available to the team<br />

While you are working on the project on your workstation, all changes are local.<br />

For others to access a resource you have changed you have to commit it to the<br />

branch. At the same time, others may have committed changes to the branch. To<br />

bring your local and repository systems up-to-date you need to synchronize your<br />

local workspace with the repository. Two distinct process are involved in<br />

synchronizing resources: Update and commit.<br />

Conflicts arise when you have modified a resource for which a more recent<br />

version is available in the branch. In this situation, you can do one of three things:<br />

Update the resource from the branch, commit your version of the resource to the<br />

branch, or merge your work and the branch resource.<br />

15.1.6 Conflict resolution<br />

What happens if more then one developer has changed the same file or the<br />

same line? Whose changes should prevail? It is generally impossible to answer<br />

this question automatically and CVS does not make any attempts to resolve such<br />

a conflict. It simply recognizes that a conflict exists. Studio Site Developer<br />

provides the tools to make conflict resolution easy.<br />

It is important to realize what CVS does and does not consider a conflict. CVS's<br />

understanding of conflicts is strictly textual and it does not understand the<br />

semantics of your program. From its perspective your source code is simply a<br />

tree of text files.<br />

Chapter 15. Development in a team environment 517

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

Saved successfully!

Ooh no, something went wrong!