Hi Noah, I didn't see your post until I made mine. It looks like I could have done that, but I also wanted it to make a comment if any #number was mentioned (not requiring the "refs" etc). Editing the _supported_cmds may have done that, but I simply removed it and made funcname (line 162 of old script, line 101 of new script) equal '_cmdRefs' all the time.
This circumvents the "if funcname:" below which I assume is designed to make no functions fire if it doesn't see a valid command keyword. I wanted to use to command keywords, so I tried this instead. Don't really know what the rest of the script does, but I could probably trim a lot of it down with trial & error. On Dec 27, 1:28 am, Noah Kantrowitz <[email protected]> wrote: > Line 129 has the dict that maps keywords to commands. Remove all the > entries resulting in cmdClose. > > --Noah > > On Dec 26, 2009, at 9:00 PM, ThrowawayWAP wrote: > > > > > Hello! > > > I was poking around the Python script somebody contributed for an SVN > > commit: > >http://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hook > > > But I was hoping for something a little simpler - specifically, I > > would like and ticket mentioned in the commit message by "#N" to have > > the commit message added to that ticket's log, but not have support > > for closing or causing other actions. (The idea here is to make it > > easier to link ticket IDs without using commands, but require use of > > the web interface to change a ticket's status - I run an educational > > environment). > > > In theory, I should be able to just cut down on the hook mentioned > > above, but I'm no good at python. I was wondering if anybody has a > > simple script they use, or any ideas how I could approach adapting the > > above? > > > Many thanks! > > > -- > > > You received this message because you are subscribed to the Google > > Groups "Trac Users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected] > > . > > For more options, visit this group > > athttp://groups.google.com/group/trac-users?hl=en > > . -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
