Hello, you are not logged in.  Login or sign up
Community >> Blogs
Search Toad World Search

Blogs
Toad and Database Commentaries

 Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies.

Do you have a topic that you'd like discussed?  We'd love to hear from you.  Send us your idea for a blog topic.

Configuring Toad’s Team Coding with Subversion
 
Location: Blogs John Pocknell    
 JohnPocknell Monday, September 22, 2008 6:03 PM
With Toad for Oracle 9.7 now available, I thought I’d cover how to configure and use Subversion with Toad’s code sharing utility – Team Coding. We had a lot of requests for this integration and here it is !
 
The Subversion implementation in Toad allows you to use the conventional file-based check-out and check-in via the Editor’s File Open button. All you have to do is browse to the working folder, select your file and open.


 
However, Team Coding, a standard feature in Toad, makes using Subversion much simpler where you have a team of developers and you require visibility of the project’s code, who has access to it, what it’s status is, what the version history is and maybe compare versions. And this is the subject of this blog.
 
First things first, though – so what exactly is Team Coding?

This link directs you to a blog written by Jeff Smith last year on what Team Coding is, so if you’re not familiar with it, have a read of it before you read this blog. 

http://toadworld.com/Community/Blogs/tabid/67/EntryID/136/Default.aspx 

OK... back already?
 
Step 1 – Installing a Subversion client - TortoiseSVN
 
To use Subversion on Windows, you will need to use TortoiseSVN.
 
TortoiseSVN is a Subversion client, implemented as a Microsoft Windows shell extension. It is free software released under the GNU General Public License.

First download and install Tortoise SVN (http://tortoisesvn.net/downloads ). Please follow the instructions in this document (“Using Toad with TortoiseSVN.doc” ) on AskToad which can be found here:

http://asktoad.com/DWiki/doku.php?id=howtos&DokuWiki=ffb154ea8e0221a691f1805e1516f49f

Step 2 – Installing an SCC plug-in
 
In order to use Subversion with Team Coding, you will need to install an SCC plug-in.
 
Although there are a number of SCC plug-in programs you could use, the Toad Development team have tested a program called PushOK which can be downloaded from http://www.pushok.com/soft_download.php?idprogram=3 . Use the download which is most compatible with the version of Subversion you are using.
 
The PushOK SVN SCC proxy is an SCC API plug-in for any Microsoft SCC enabled IDE, including Toad for Oracle.
 
Please note: PushOK provide a free trial, but there is a charge for their software after the trial period. There are other plug-ins you could use (e.g. Unified SCC (30-day trial) and TamTam (unlimited eval period)) which will also require a purchased license. We may develop a direct interface to the SVN API for a future version of Toad to obviate the need to install this software.
 
Follow all the steps described in the “Using Toad with TortoiseSVN” document. If you have it set up correctly, then when you open the Repo-browser from your repository directory, you should see your Work folder registered and any files added displayed.


 
Step 3 – Configuring Team Coding
 
In your Team Coding settings windows, you can select the PushOK SCC from the list of available vendors. A login to PushOK should already have been established.
 

 

Step 4 – Create a Code Control Group
 
The next task is to create a Code control Group (CCG) in order to assign your code and other objects to a specific working group. Again, ensure you specify the correct working directory:

Now you need to define a CCG Mask to specify which schema and which code and other files you want associated with this CCG. Open the CCG and define the object types, schema and exclusion mask (or filter) you wish to apply.

Step 5 – Synchronizing code between database and Subversion

In order to synchronize the code you have in the database with Subversion, you need to perform an Export to VCS using thebutton.

 

This will create a copy of the code and other objects you specified in your CCG into your Subversion working folder. A list like this, which shows, based on how you defined the CCG, the code and other objects from which you can select or deselect what you would like to export.

Specify which export options you want, including comments and click OK

Before anything is exported to the Subversion working folder, TortoiseSVN will ask you to confirm the URL, Module and local path to its repository.

If everything is setup correctly, the export should proceed as follows:

Step 6 – Viewing your code
 
You can confirm that your files have been exported by right-clicking the repository folder and selecting Repo-browser. You should now see all the files located under the Work folder:

You will also open this window if you select “VCS Browser” from the Team Coding menu.

You should also see these files listed in the Team Coding Viewer window:

Select a program from the Toad Editor using the “Open from Database” button will initiate a pull from the VCS. The first time you do this, you will see a Question window (lower left screenshot).
 
The other window (upper left screenshot) you don’t normally see because it’s kept hidden, but shows how PushOK is accessing the Subversion working folder.
 
Clicking the Yes button will open the Team Coding Check-Out window (right screenshot) confirming the project from which the code will be accessed and (depending on which Team Coding options you have set) allow you to enter comments for the check-out operation.

 

Once the code is displayed in the Editor, you should have a “Checked Out” message displayed at the bottom of the window. This code is now write-locked until it is checked back in by the original user (or someone with Team Coding administrator rights).

To view the version history for an object, right-click the object in the Repository Browser and select “Show Log”.

This screenshot shows the revision history for the PL/SQL Function OW_CALC_ORDER_COST. By default, the Repository Browser will show the “Head” or highest version of each object. This can be changed to show specific versions.
 
The beauty of using Toad’s Team Coding feature with your VCS, is its seamlessness and visibility into your project code. It also enables much better protection of your code’s integrity since it checks the version of the checked-out code against the compiled version in the database, and offers a warning message to the user if they are out-of-sync. The user then has the choice of accepting the VCS version, the database version, or performing a file compare on-the-fly to determine which version to use.
 
Feel free to post comments on this blog, through ToadWorld, about your experiences of using Toad with your VCS and suggestions on how we can make improvements.
 
Thank you for reading !
 
Additional References:
 

There is also a paper available from ToadWorld written by Norman Dunbar about a year ago on how to configure Toad with Subversion (before we officially supported it in 9.7) if you prefer to use standard file check-out/in which contains some additional information about Subversion which can be found here:

http://www.toadworld.com/Education/ToadWorldPapersandPodcasts/tabid/82/Default.aspx (bottom of page)
 

Permalink |  Trackback

Comments (1)   Add Comment
By KevinNoel on Thursday, October 16, 2008 3:03 AM
Hi,

I'm using Toad 9.7, TSVN 1.54 and TSVNSCC.

Used parameters:
url of repository : file:///S:/svn-repos/DEV
working directory : c:\svn-repos\DEV
CCG name : DEV
CCG project name : DEV
CCG working directory : c:\svn-repos\DEV

Repository works fine, team coding without 3rd party works fine too.

But, I've got an error when I want to export objects to my svn repository:
'C:\Documents and Settings\myuser\Local Settings\Temp\svnE.tmp' is not a working copy.
Can't open file 'c:\Documents and Settings\myser\Local Settings\Temp\svnE.tmp\.svn\entries': The system cannot find the path specified.

In my working directory, after this failed export, I find all the exported objects but not committed to the repository.

Anyone can help me? It's driving me mad.

Kevin


Comment:
Add Comment   Cancel 
Search Blog Entries
 
Blogger and Topic List
 

 

All Recent Entries
 

 

Johannes Ahrends
Unicode

Steven Feuerstein
Oracle PL/SQL

Daniel Norwood
Toad for Data Analysts
John Pocknell
Toad for Oracle
Bert Scalzo
Toad for Oracle, Data Modeling, Benchmarking
Jeff Smith
Toad product family
Richard To
SQL Optimization
Jim Wankowski
DB2 - LUW and z/OS
John Weathington
Compliance
Doug Williams
Database Musings
  Henrik "Mauritz" Johnson
Toad Tips & Tricks on the "other" Toads
  Toad World Editor
Toad World issues

  Toad Data Modeler Opens in a new window
Data Modeling
 

Copyright 2008 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us