My eventual goal is as follows:
We want to create full traceability of code changes in our issue management software (Atlassion Jira in our case). We already force user to require Jira ticket numbers (although it is a soft requirement). One of the things our developers often have to do is fix small issues in the code as they encounter them. For proper traceability they would need to go to jira and register a ticket and use that ticket number to commit the change. But this is really tedious and time consuming.
So our plan is to make it easier to commit small fixed to the code base but do have individual tickets for those changes in our issue management system.
So the best way to do this is to simply process a macro defined in the commit message that automatically creates the ticket. e.g.
#improvement NPE fix on whatchamacallit it. This will gracefully handle
empty values. But in places when thingamabob expects an exception, it will
no longer receive it.
This should log automatically log a ticket in our jira on the project "Quick Fixes". This ticket generation would result in a ticket with id QF-1234.
This is all doable from a pre-commit hook. However, we want to have the ticket number QF-1234 in the commit message rather than the '#improvement' macro. This way the SVN clients can link to the ticket number.
I would prefer to have this mechanism work in a synchronous and block manner. The obvious side effect would be, if jira cannot be reached, the commit fails. But this is ok/acceptable.
The automatic ticket creation is achievable from within a pre-commit hook. But I do not see a method to update the commit message before the commit is finalized.
So my question is as follows, does anyone know how I would be able to update the commit message within a SVN transaction (without creating a modified SVN library). Or have some other reliable way to achieve the same result. I know I can update a commit message in a new transaction, but this has a lot of undesired side effects.
Note, I am perfectly happy with an fragile solution that will fail the commit if anything goes wrong. Recommitting is cheap, and creating issues manually takes less than 1 minute (but I rather not waste that minute).