Example Subversion Integration Scenario

The following is a simple Subversion integration scenario where source control work is done at the command line (many of these steps may be automated via scripting or direct calls from the web-based interface). Though this scenario assumes a Microsoft Windows interface, UNIX, Linux and web interfaces are also supported. The scenario is as follows:

  • Some files are detected that have defects
  • An ExtraView issue is created against the defects
  • The files with the defects are checked out from Subversion and edited
  • With a single command, the files are checked in to Subversion and the issue in ExtraView is updated with the pertinent details.

Following is a step-by-step example of this scenario. Though overly simplified, the basic elements of integration are made clear.

Subversion is invoked at the command line

C:\tmp\project>svn log flavors.txt
--------------------------------------------------------------------
r37 | daniel | 2007-04-10 10:29:28 -0700 (Tue, 10 Apr 2007) | 3 lines

New files
--------------------------------------------------------------------

C:\tmp\project>svn log colors.txt
--------------------------------------------------------------------
r37 | daniel | 2007-04-10 10:29:28 -0700 (Tue, 10 Apr 2007) | 3 lines

New files
--------------------------------------------------------------------

C:\tmp\project>svn cat flavors.txt
vanilla
peppermint
yellow
chokolate

C:\tmp\project>svn cat colors.txt
red
blue
majenta

 

Create the defect in ExtraView

This is entered in ExtraView via the CLI, Web interface, or through an API integration with another tool. This step is not shown in detail here, but the details of the issue will include these fields: Bug # 10470 Title: Misspellings Description: misspellings in flavor and color; misplaced color From the command line, the user can confirm the details of the issue in ExtraView

 

C:\ExtraView\Perl\evapi\bat>evget 10470
               Assigned To: George Miller
              Date Created: 4/10/07 10:47 AM
               Description: misspellings in flavor and color; misplaced color
                      ID #: 10470
           Last Changed By: Bill Smith
             Last Modified: 4/10/07 11:05 AM
                Originator: Bill Smith
                  Priority: P 4
                   Privacy: Private
                   Product: Tracker
                    Status: New
                     Title: Misspellings

 

Edit each file, repairing the defects

 

C:\tmp\project>notepad flavors.txt
vanilla
peppermint
chocolate

C:\tmp\project>notepad colors.txt
red
blue
yellow
magenta

C:\tmp\project>svn status
M      colors.txt
M      flavors.txt

 

Check in the changes and update ExtraView

Note that a single command passes arguments and values to Subversion, yet also updates ExtraView.

 

C:\tmp\project>svn commit -m "corrected misspellings and misplaced color for
Bug Id: 10470"
Sending        colors.txt
Sending        flavors.txt
Transmitting file data ..
Committed revision 38.

 

Check the history within Subversion

 

C:\tmp\project>svn log flavors.txt
--------------------------------------------------------------------
r38 | daniel | 2007-04-10 11:10:05 -0700 (Tue, 10 Apr 2007) | 1 line

corrected misspellings and misplaced color for Bug Id: 10470
--------------------------------------------------------------------
r37 | daniel | 2007-04-10 10:29:28 -0700 (Tue, 10 Apr 2007) | 3 lines

New files
--------------------------------------------------------------------

C:\tmp\project>svn log colors.txt
--------------------------------------------------------------------
r38 | daniel | 2007-04-10 11:10:05 -0700 (Tue, 10 Apr 2007) | 1 line

corrected misspellings and misplaced color for Bug Id: 10470
--------------------------------------------------------------------
r37 | daniel | 2007-04-10 10:29:28 -0700 (Tue, 10 Apr 2007) | 3 lines

New files
--------------------------------------------------------------------

 

Check the changes in ExtraView

This can be done from the web interface or from the command-line interface. The example shows the check being performed from the CLI.

 

C:\ExtraView\Perl\evapi\bat>evfiles 10470
Date Created  File Size Owner           Name            Description
============  ========= =====           ====            ===========
2007-04-10          517 SCM Daemon      diff864.txt     Revision 38 committed by
                                                        daniel on 2007-04-10 11

The diffs can be checked from the web interface or the CLI. The example shows the check being performed from the CLI

C:\ExtraView\Perl\evapi\bat>evdownload 10470 diff864.txt

C:\ExtraView\Perl\evapi\bat>type diff864.txt
Modified: colors.txt
===================================================================
--- colors.txt  2007-04-10 17:29:28 UTC (rev 37)
+++ colors.txt  2007-04-10 18:10:05 UTC (rev 38)
@@ -1,3 +1,4 @@
 red
 blue
-majenta
+yellow
+magenta

Modified: flavors.txt
===================================================================
--- flavors.txt 2007-04-10 17:29:28 UTC (rev 37)
+++ flavors.txt 2007-04-10 18:10:05 UTC (rev 38)
@@ -1,4 +1,3 @@
 vanilla
 peppermint
-yellow
-chokolate
+chocolate