Friday, June 22, 2007

Synchronizing with CVS in JDeveloper

Whatever your mechanism for working with CVS during development one of the things that we all like to avoid is unresolveable conflicts. But when working in a team environment it's an ever present evil.

Using the Incoming Changes tab of JDeveloper's Pending Changes window can help in pre-empting conflicts and managing them.

Here is a very simple example. I have an application under CVS source control that contains a number of classes. I'm working with a team who are also working on these files. In the Pending Changes window I can see that 2 of the files have been modified and checked in since I checked out my copy. This is shown in the Incoming Changes tab:

My local change is reflected in the Outgoing pane (I haven't bothered to insert an image of the outgoing pane here, but in this view I can quickly see that there is only outgoing change - and I know this is the only file I am working on). has been updated and checked-in by someone else but doesn't cause a conflict with my version. appears to have an unresolveable conflict. Double-clicking on the file in the Incoming Changes window returns me to the file in the code editor (or opens it), moves the focus to the History Tab, selects the Head revision to compare my local version of the file with and highlights the first change.

From here I have a number of options. Knowing that there is a conflict I could make changes to my code. Or perhaps I want to run Update and then use JDeveloper's Merge feature to resolve the conflict or perhaps I just carry on with my coding and choose to deal with the conflict at some later date, whilst keeping it in the back of my mind (and in my Incoming Changes window!) Whatever route I take, I'm able to keep my local copy and the repository synchronized and view/act on any conflicts as I choose.

I've kept my example very simple and have used JDeveloper In a future post I'll give you a taste of enhancements we've made to Pending Changes for the JDeveloper 11g


i am a simple registry said...

thanks for this Susan , can you tell as how to create the cvs connection step by step ..please

Anonymous said...

please tell me the steps of cvs jdev connection.

Susan said...


Establish from your CVS administrator the access method and connection details for your CVS repository.
In JDeveloper 11g open the Versioning Navigator (View menu) or in earlier versions the CVS Navigator.
Open the CVS Connection wizard and enter the details for your repository
Hope this helps