Changes between Version 14 and Version 15 of TimingAndEstimationSVNPostCommitHook
- Timestamp:
- Sep 8, 2015, 9:20:33 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimingAndEstimationSVNPostCommitHook
v14 v15 1 = Using a Subversion commit hook To Interact With TimingAndEstimationPlugin = 2 == DOWNLOAD == 3 * ''' [browser:timingandestimationplugin/branches/trac0.10/scripts/trac-post-commit.py This plugin's version of the post-commit-hook for trac 10] ''' 4 * ''' [browser:timingandestimationplugin/branches/trac0.11/scripts/trac-post-commit.py This plugin's version of the post-commit-hook for trac 11] ''' 1 [[PageOutline(2-5,Contents,pullout)]] 5 2 6 '''Note: This information was taken from http://trac.edgewall.org/wiki/TimeTracking#UsingaSubversioncommithookoptional and modified to show how it works with this plugin.''' 3 = Using a Subversion commit hook to interact with TimingAndEstimationPlugin 7 4 8 == Description ==5 == Description 9 6 10 The {{{contrib/trac-post-commit-hook}}} script is a very convenient tool to interact with Trac's ticket system on commit. It allows to modify time tracking values and ticket state through special commit messages. 7 The {{{contrib/trac-post-commit-hook}}} script is a very convenient tool to interact with Trac's ticket system on commit. It allows to modify time tracking values and ticket state through special commit messages. This script references the TimingAndEstimationPlugin. 11 8 12 9 * Copy {{{trac-post-commit-hook}}} into /usr/share/trac/contrib. … … 14 11 * Set the executable bit: {{{chmod 755 hooks/post-commit}}}. 15 12 16 {{{ 13 {{{#!sh 17 14 #!/bin/sh 18 15 REPOS="$1" … … 36 33 ||fixes #id||Closes the ticket|| 37 34 38 The time spent is specified in parenthes is.:35 The time spent is specified in parentheses: 39 36 40 37 {{{ … … 42 39 }}} 43 40 44 45 46 41 See {{{contrib/trac-post-commit-hook}}} for details (after applying the patch). 47 42 48 '''Examples:'''}} 43 == Download 49 44 50 {{{ 45 This plugin's version of the post-commit-hook: 46 * [browser:timingandestimationplugin/branches/trac0.10/scripts/trac-post-commit.py for Trac 0.10] 47 * [browser:timingandestimationplugin/branches/trac0.11/scripts/trac-post-commit.py for Trac 0.11] 48 49 '''Note''': This information was taken from http://trac.edgewall.org/wiki/TimeTracking#UsingaSubversioncommithookoptional and modified to show how it works with this plugin. 50 51 == Examples 52 53 {{{#!sh 51 54 svn commit -m 'closes #1 (1), refs #2 (.5) Added time tracking' 52 55 }}} … … 54 57 This closes ticket #1, increases the time spent by 1 hour. It adds an entry to the Changelog of ticket #2, increases the time spent by .5 hours. 55 58 56 == Gotchas == 59 == Gotchas 60 57 61 The script is pretty picky about what input it accepts. I would suggest entering all of the commit hook commands on separate lines at the beginning of the message for best results. 58 62 59 == Open Questions ==63 == Open Questions 60 64 61 This section contains requests for clarification. 65 === Relationship with normal ticket commit script 62 66 63 === Relationship with normal ticket commit script === 64 65 There is a commit hook trac-post-commit-hook that comes with trac that enables closing tickets and adding references to tickets. This plugin provides a modified version that should be used instead, that also allows tracking hours. 67 There is a commit hook trac-post-commit-hook that comes with Trac that enables closing tickets and adding references to tickets. This plugin provides a modified version that should be used instead, that also allows tracking hours.