Changes between Version 16 and Version 17 of CommitPolicy


Ignore:
Timestamp:
Jun 9, 2007, 8:50:26 PM (14 years ago)
Author:
Dominic Hargreaves
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CommitPolicy

    v16 v17  
    5959When you commit a change that fixes a issue reported in a Trac ticket you can (and should, if possible) close the ticket automatically by including the string: "closes #nn" (where nn is the ticket number) in the log message. This will automatically close the ticket with a reference to the changeset. Note that this is a change from the way bugs were handled in RT (they were only closed when in a released version) but this functionality is too useful to not make use of. Hopefully we will get back to a release early, release often mode of operation so this won't hamper us too much.
    6060
    61 NB this doesn't work at the moment (confirmed on the mailing list by DominicHargreaves) --KakePugh
     61This should work again - more docs at
     62http://trac.edgewall.org/browser/branches/0.10-stable/contrib/trac-post-commit-hook#L26
    6263
    63 {{{
    64 # It searches commit messages for text in the form of:
    65 #   command #1
    66 #   command #1, #2
    67 #   command #1 & #2
    68 #   command #1 and #2
    69 #
    70 # Instead of the short-hand syntax "#1", "ticket:1" can be used as well, e.g.:
    71 #   command ticket:1
    72 #   command ticket:1, ticket:2
    73 #   command ticket:1 & ticket:2
    74 #   command ticket:1 and ticket:2
    75 #
    76 # In addition, the ':' character can be omitted and issue or bug can be used
    77 # instead of ticket.
    78 #
    79 # You can have more then one command in a message. The following commands
    80 # are supported. There is more then one spelling for each command, to make
    81 # this as user-friendly as possible.
    82 #
    83 #   close, closed, closes, fix, fixed, fixes
    84 #     The specified issue numbers are closed with the contents of this
    85 #     commit message being added to it.
    86 #   references, refs, addresses, re, see
    87 #     The specified issue numbers are left in their current status, but
    88 #     the contents of this commit message are added to their notes.
    89 #
    90 # A fairly complicated example of what you can do is with a commit message
    91 # of:
    92 #
    93 #    Changed blah and foo to do this or that. Fixes #10 and #12, and refs #12.
    94 #
    95 # This will close #10 and #12, and add a note to #12.
    96 }}}
    9764
    9865You can also just refer to a ticket, which means that hyperlinks between the two will appear but the status will not change. The full specification of this functionality is as follows: