Monday, 4 March 2013

Using JDeveloper with Subversion


Introduction

This guide takes you through the necessary steps to install Subversion and configure JDeveloper for use with it.  You will then be taken through some common scenarios encountered when working with Subversion in JDeveloper.

Installing the JDeveloper Subversion VCS extension

The JDeveloper Subversion VCS extension is available via the official Oracle update center. You install updates using the Check for Updates feature available from the Help menu:
JDeveloper Check For Updates
Using the Check for Updates wizard, search the Official Oracle Extensions and Updates center:
Choose Official Oracle Extensions and Updates
Locate and select the Subversion VCS Extension entry.  Selecting this will automatically select the VCS Framework Extension update too.
Locate and select the Subversion VCS Extension (EA2) entry
Proceed to the download stage:
Downloading using the update center
After downloading the updates, you will see a summary page with information similar to the following:
Download Summary
On completion of this wizard, you may be asked whether you want to automatically restart JDeveloper:
Restart JDeveloper
Choose "Yes".
When JDeveloper has restarted, open the Versioning menu, choose Select Version System and then Subversion.
If configuration was successful, you will see a status message below the structure pane:
Successful configuration
Assuming success, view the preferences for Subversion to check that the JavaSVN client library has been installed as expected: Open the Preferences dialog ( Tools > Preferences) and in the left pane select Versioning | Subversion.
With the extension correctly installed, you will see something like:
Preferences, JavaSVN Binding

Connecting to a Subversion repository

TIP: If you want to follow the examples given in this Developer's Guide, you will need to install a local Subversion repository named c:/svn-repos and connect to it using the svn:// protocol. The JDeveloper Subversion VCS extension will allow you to install a local repository if you also have separate Subversion client software installed. See Creating a local Subversion repository.
If you want to save the details of your Subversion repository connections so that you can use them later or on another machine, you can export them to a text file. You can then recreate the connections by importing the details from the file. To export, right-click the Subversion node in the Subversion Navigator and choose Export Connections. Complete the Export Subversion Connections dialog, then click OK. To reimport connection details from a file, right-click the Subversion node and chooseImport Connections. Through the Import Subversion Connections dialog, browse to the file that contains the connection details that you wish to import, then click OK.

Importing JDeveloper projects into Subversion

New test application details
New test application as navigator tree
svn://localhost/
c:\jdev1013\jdev\mywork\test
Repository Connection dropdown
Source Directory box
Perform Checkout checkbox
Navigator tree showing unmodified files

Checking out files

Navigator tree showing unmodified files

Adding and committing files

Navigator tree showing a new file
Pending changes window showing new file
Navigator icon showing file added
TIP: In a live development environment, to avoid unnecessary conflicts and the subsequent work in resolving them, you should update your files before committing them.

Updating files

Commit prohibited dialog

Editing files

TIP: To be certain that you are seeing the most up-to-date status of files in JDeveloper, click the Refresh button Refresh icon on the Application Navigator toolbar.
An alternative to the above is the lock-modify-unlock model, in which a developer locks a file, modifies it, adds it back to the repository, then unlocks it. Locking a file does not prevent another developer from working on a copy of the file: it prevents the content of that copy from being returned to the repository until the lock is removed. So there is still potential for wasted effort in this model.
The lock-modify-unlock model is more suitable for working with files in binary formats, where it is impossible to merge conflicting changes. It ensures that developers take it in strict turns to submit changes to a file.
In this release of JDeveloper, support for locking is limited to retaining locks on files that you are about to commit. You must previously have locked the files using the Subversion lock command. In a future release, locking and unlocking will be fully supported.
Commit resources showing keep locks
Retaining a lock will mean that other developers will still not be able to commit changes they made to their copies of the files.
To lock a file using the Subversion lock command, enter the following at a command prompt:
svn lock [file name] -m "[message]"
To unlock a file, use:
svn unlock [file name]

For more info please refer
http://www.oracle.com/technetwork/developer-tools/jdev/subversion-085144.html 

No comments:

Post a Comment