The following is a simple Git 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 Linux system, UNIX, Microsoft Windows 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 Git and edited
  • With a couple commands, the files are checked in to Git 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.

Git is invoked at the command line

$ git log colors.txt flavors.txt
commit ce5f98b0c7ca6a9b5d78b7f87497069f81c1ad08
Author: Daniel Borlean 
Date:   Wed Oct 12 11:56:56 2011 -0700

    new files

$ cat flavors.txt
vanilla
peppermint
yellow
chokolate

$ 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 # 10115
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

$ evget 10115
   Assigned To:
      Category:
      Comments:
  Date Created: 10/12/11 12:10 PM
     Days Open: 0
Days in Status: 0
   Description: misspellings in flavor and color; misplaced color
          ID #: 10115
 Last Modified: 10/12/11 12:10 PM
        Module:
    Originator: Git Integration
      Priority:
       Product:
Repeating Rows:
      Severity:
        Status: Open
         Title: Misspellings

Edit each file, repairing the defects

$ vim flavors.txt
vanilla
peppermint
chocolate

$ vim colors.txt
red
blue
yellow
magenta

$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working directory)
#
#       modified:   colors.txt
#       modified:   flavors.txt
#
no changes added to commit (use "git add" and/or "git commit -a")

Check in the changes and update ExtraView

Note that a couple commands pass arguments and values to Git, yet also updates ExtraView.

$ git commit -a -m "corrected misspellings and misplaced color for Bug Id: 10115"
[master 9ef7b1d] corrected misspellings and misplaced color for Bug Id: 10115
 2 files changed, 3 insertions(+), 3 deletions(-)

$ git push
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 401 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
remote: ExtraView update result: ID #10115 updated.
To c:/dev/git/my_server.git
   ce5f98b..9ef7b1d  master -> master

Check the history within Git

$ git log flavors.txt
commit 9ef7b1d76e2b5ef17caeea82b62444502d0993cd
Author: Daniel Borlean 
Date:   Wed Oct 12 13:59:00 2011 -0700

    corrected misspellings and misplaced color for Bug Id: 10115

commit ce5f98b0c7ca6a9b5d78b7f87497069f81c1ad08
Author: Daniel Borlean 
Date:   Wed Oct 12 11:56:56 2011 -0700

    new files

$ git log colors.txt
commit 9ef7b1d76e2b5ef17caeea82b62444502d0993cd
Author: Daniel Borlean 
Date:   Wed Oct 12 13:59:00 2011 -0700

    corrected misspellings and misplaced color for Bug Id: 10115

commit ce5f98b0c7ca6a9b5d78b7f87497069f81c1ad08
Author: Daniel Borlean 
Date:   Wed Oct 12 11:56:56 2011 -0700

    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.

$ evget 10115
   Assigned To:
      Category:
      Comments: 10/12/11 1:59 PM Git Integration
                tree 782d3f97c3eb885733a4dbc8fdb0f36b2dd17d52
                parent ce5f98b0c7ca6a9b5d78b7f87497069f81c1ad08
                author Daniel Borlean  1318453140 -0700
                committer Daniel Borlean  1318453140 -0700

                corrected misspellings and misplaced color for Bug Id: 10115

                diffs:
                diff --git a/colors.txt b/colors.txt
                index 3b34bea..6021d1e 100644
                --- a/colors.txt
                +++ b/colors.txt
                @@ -1,3 +1,4 @@
                 red
                 blue
                -majenta
                +yellow
                +magenta
                diff --git a/flavors.txt b/flavors.txt
                index f812774..1b4c842 100644
                --- a/flavors.txt
                +++ b/flavors.txt
                @@ -1,4 +1,3 @@
                 vanilla
                 peppermint
                -yellow
                -chokolate
                +chocolate
  Date Created: 10/12/11 12:10 PM
     Days Open: 0
Days in Status: 0
   Description: misspellings in flavor and color; misplaced color
          ID #: 10115
 Last Modified: 10/12/11 1:59 PM
        Module:
    Originator: Git Integration
      Priority:
       Product:
Repeating Rows:
      Severity:
        Status: Open
         Title: Misspellings