Edgewall Software
Modify

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: sbranden@… 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 dtreth@…, 16 years ago

Component: ticket systemversion control
Keywords: contrib added

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.

comment:2 by dtreth@…, 16 years ago

Cc: dtreth@… added

I'm adding myself to the cc as I am interested in using these hook scripts in the future.

comment:3 by Remy Blank, 15 years ago

Milestone: 1.0

comment:4 by Christian Boos, 14 years ago

Milestone: 1.0unscheduled

Milestone 1.0 deleted

comment:5 by Anthony O., 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 Ryan J Ollos, 9 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.