svntortoisesvnjiraatlassian-fisheye

How to get all SVN commits that do not include Jira bug key in the comment?


I have Jira and Fisheye setup so that I can include Jira key in the commit comment (Smart Commits). Fisheye will link source code and Jira issue mentioned in the commit.

I would not like to use something like JIRA Commit Acceptance Plugin to decline commits without Jira keys. As it is too restrictive. But would still like to monitor commits without Jira keys.

How to get a report of all SVN commits that do not include Jira bug Key in the comment?


Solution

  • You can run following command on UNIX in the directory with your working copy:

    svn log | grep -v '\--' | awk 'ORS=(NR%3)?" ":"\n"' | grep -v "[ISSUE_PREFIX]"
    

    where [ISSUE_PREFIX] is your JIRA issue prefix. For example, JPA for such issues as JPA-123.

    It will have following output:

    r33 | user3 | 2011-12-21 16:29:29 +0200 (Wed, 21 Dec 2011) | 1 line  Third commit log without JIRA key
    r22 | user2 | 2011-12-21 16:28:19 +0200 (Wed, 21 Dec 2011) | 1 line  Second commit log without JIRA key
    r11 | user1 | 2011-12-21 16:27:18 +0200 (Wed, 21 Dec 2011) | 1 line  First commit log without JIRA key