We currently operate an SVN repository which integrates with Atlassian Jira and FishEye products. For reference of those unfamiliar to those products, Jira is an issue management and tracking tools, and FishEye is a source code repository GUI which caches repository information from the repository and presents it very well (along other things).
This integration all works perfectly without issue, but I would like to start utilising FishEye smart commit functionality. This functionality reads the log messages of commits in SVN for certain text, and can then perform certain functional operations in the FishEye application based on that text it finds.
We currently commit using Tortoise SVN and have controls in place server side during pre-commit that validate the log message inputted to find the Jira reference and perform various checks against that Jira to ensure this is really an ok commit. This all works fine!
So, my question in relation to SVN, and let me preface this that I'm aware that you should not change log messages during pre-commit. The text I need to add to the log message during commit is not known to the developer, and needs to be added systematically based on a set of rules. These rules must be enforced systematically. During the commit, the user will input their Jira reference within the log message of the commit, then we want to be able to have functionality on pre-commit to read said log message, lookup the Jira reference which is know to the developer , then perform some database queries to establish what additional text needs to be added to the log message to allow us to utilise the smart commit functionality in FishEye.
As I said earlier, I know you shouldn't change log messages on pre-commit. The problem is that I cannot change retrospectively in post-commit. This is because FishEye does not pick up changes to existing commits, it's only picking up the commit as it occurs because it caches the repository data. So my question is, how can I achieve this without doing it on pre-commit, which is not recommended? So what other options are there, if any?
I could try to customize the client to add the text before it actually issues the commit to the server, but I need the logic to be enforced server side so there is no chance somebody performs a commit client side with the customization inactive. This leads me to the question of why is it ill-advised to change a log message only in pre-commit? I understand the local repo will be out-of-sync with the server, but if it's just the log message then frankly I don't care. We do not need to review these log comments locally as we'll always look at them server side. The issue for me of course is if tortoise SVN sees the file as different locally than server side, then doesn't allow you to commit back up. Or if it see's the file as different and it always shows as a changed file that needs to be committed.
Anyway, sorry for the long-winded question. Look forward to responses
Last updated