link bugs/issues to revisions and to files changed
-
22-04-2021 - |
Question
I use TortoiseHG and whenever I commit, I put a lot of comments in the commit message. For example, revision 89 message may be:
parser.py:
bug fix:
incorrectly applied overrides
analyze.py:
new feature:
print all suspicious records
numpy_wrapper.py:
refactoring:
import numpy is now conditional, and encapsulated in numpy_wrapper
I want to enter these comments in some issue tracking system instead, but have the ability to link each issue with:
- the revision it was observed in (if a bug) or proposed in (if a feature)
- the revision it was fixed (if a bug) or added (if a feature)
- the file(s) affected by the change
I then want to be able to look at any revision, and see what issues were observed/fixed in this revision.
Or to look at any file, and see which changes in the file were due to which issue.
What systems should I look into? (I am using TortoiseHG on Windows.)
Solution
We use Redmine which we installed using the Bitnami Windows Application Stack. We also use TurtleMine to get a list of Redmine issues in TortoiseHg when committing.
Redmine has all the features that you want when configured appropriately:
- You can add versions to projects and can then add a custom field to allow users to say which version a bug was found in.
- Redmine has a target version field for new issues that can be used for your second requirement. If you'd prefer a target version and a fixed version then you can add another custom field for that.
- It does this out of the box - if you enter "refs #123" or "references #123" in the commit message then the issue page will show all commits that referenced it. TurtleMine puts "Issue #123" but you can add "issue" as a keyword to watch out for so it works with Redmine.
OTHER TIPS
There are a number of systems out there that will do exactly what you need, however it all depends on if you will be hosting it yourself or having it hosted for you.
I personally use a self hosted RedMine server that I have installed myself for better control and management. I have some installation notes available publicly here.