1

We are using Subversion as a version control system and JIRA as an issue tracker tool for our project. While committing in SVN (using TortoiseSVN Client), we provide JIRA ticket reference so it will automatically display commited files in JIRA against that particular JIRA ticket.

But is there any API available to query find out files committed against particular JIRA ticket?

Chad Nouis
  • 6,861
  • 1
  • 27
  • 28
user989010
  • 137
  • 1
  • 16

3 Answers3

2

There's not a direct way to search through Subversion commit messages, unfortunately.

If this is something that you need to do frequently, then I definitely recommend setting up some sort of tool that indexes commits as they are made and keeps cross-referencing information in a database (we've used trac for this). I'm not familiar with Jira, it may have something like this available.

Another option is to write a script that pulls the complete repository log and parses it to look for a reference to a particular ticket. There are Subversion library bindings for most popular scripting languages that should make this fairly straightforward (pull a log and for each revision, search the commit message for a regular expression matching your ticket reference format, and print out the revision number if a match is found). This may take a long time to run as your repository grows larger, so I don't recommend this approach unless this is only something that you need to do once or twice.

bta
  • 43,959
  • 6
  • 69
  • 99
0

I'm not sure why this option (available via TortoiseSVN client) doesn't help you > Right click inside the repo folder > TortoiseSVN > Show log. This should open up all commit history of the repo and you should be able to find your commits (against your JIRA ID) here. I use this method to find out my commits in a branch. Is this what you're looking for??

0

This works by filtering the output of the "svn log" command to only the commit messages that contain the issue tracking number plus enough previous adjacent lines (-B option) to see the revision number(s) in the output.

svn log -vl numCommitsToGoBack | grep -B numPreviousLines issueTrackingNumber

grep a file, but show several surrounding lines?