Opened 16 years ago
Last modified 8 years ago
#7263 new defect
/trunk/contrib/trac-pre-commit-hook not stringent enough in supported_cmds
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | unscheduled |
Component: | version control | Version: | 0.10.4 |
Severity: | normal | Keywords: | contrib |
Cc: | dtreth@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
There is a hole in the trac-pre-commit-hook which lets commands through and then they are not processed properly by trac-post-commit-hook.
For example: "arefs #1234" or "ref #1234" or "refa #1234" will all successfully get through the trac-pre-commit-hook. When the trac-post-commit-hook runs it will now be able to identify these commands and link the svn commit to the trac ticket.
Attachments (0)
Change History (6)
comment:1 by , 16 years ago
Component: | ticket system → version control |
---|---|
Keywords: | contrib added |
comment:2 by , 16 years ago
Cc: | added |
---|
I'm adding myself to the cc as I am interested in using these hook scripts in the future.
comment:3 by , 16 years ago
Milestone: | → 1.0 |
---|
comment:5 by , 13 years ago
I think that both post-commit-hook and pre-commit-hook should use the same python component, the CommitTicketUpdater code in order to parse the log string the same way …
comment:6 by , 9 years ago
Owner: | removed |
---|
you could add a "\b" to the beginning of the regexp and a "\b" to the end of the action match section. I am not sure of the full ramifications of this, because as I read it the regexp was designed to be flexible. Assuming the people who are using the repo know that this is what they need to do, we can probably assume it is a typo, and we can probably figure out what is meant by their statement. In which case, the post commit can be written in such a way as to accept "arefs", "ref" and "refa", as well as the others that could possibly slip through the regexp as written, as what is obviously implied by the statement. Also, this is not a ticket system bug, rather I believe it is a version control problem.