Changes between Initial Version and Version 1 of TracTicketChangesetsPlugin


Ignore:
Timestamp:
Jun 4, 2010, 8:40:17 AM (14 years ago)
Author:
Mikael Relbe
Comment:

New hack TracTicketChangesetsPlugin, created by mrelbe

Legend:

Unmodified
Added
Removed
Modified
  • TracTicketChangesetsPlugin

    v1 v1  
     1[[PageOutline(2-5,Contents,pullout)]]
     2
     3= Ticket Changesets Plugin =
     4
     5== Description ==
     6
     7The TracTicketChangesetsPlugin hooks into changeset notifications and searches commit messages for ticket references. Referenced tickets are updated with the commit message, and all concerning changesets for a ticket are presented in a separate section on ticket pages, just above the ordinary change section.
     8
     9The macros `CommitMessage(repo, rev)` and `TicketChangesets(ticket)` are provided to present a commit message for a given repository and revision, and all changesets that are related to a given ticket.
     10
     11Console administration commands are available for resynchronizing relations between tickets and changesets.
     12
     13The source of this plugin is based on code provided distributed with Trac 0.12 (tracopt/ticket/commit_updater.py).
     14
     15'''This plugin is not compatible with Trac 0.11'''
     16
     17
     18== Bugs/Feature Requests ==
     19
     20Existing bugs and feature requests for TracTicketChangesetsPlugin are
     21[report:9?COMPONENT=TracTicketChangesetsPlugin here].
     22
     23If you have any issues, create a
     24[http://trac-hacks.org/newticket?component=TracTicketChangesetsPlugin&owner=mrelbe new ticket].
     25
     26== Download ==
     27
     28Download the zipped source from [download:tracticketchangesetsplugin here].
     29
     30== Source ==
     31
     32You can check out TracTicketChangesetsPlugin from [http://trac-hacks.org/svn/tracticketchangesetsplugin here] using Subversion, or [source:tracticketchangesetsplugin browse the source] with Trac.
     33
     34== Example ==
     35
     36=== Installation instructions ===
     37 1. Enable the plugin by the following in trac.ini:
     38{{{
     39[components]
     40ticketchangesets.* = enabled
     41}}}
     42 1. Add the section `[ticket-changesets]` to configure the behaviour:
     43{{{
     44[ticket-changesets]
     45check_perms = true
     46collapsed = false
     47commands.close = close closed closes fix fixed fixes
     48commands.refs = addresses re refs references see ticket tickets
     49compact = false
     50hide_when_none = false
     51notify = false
     52resolution = fixed
     53}}}
     54 1. The Trac environment needs to be upgraded:
     55{{{
     56trac-admin $ENV upgrade
     57}}}
     58 1. Re-synchronize repositories (optional, but recommended before next step which will scan all existing commit messages):
     59{{{
     60trac-admin $ENV repository resync "*"
     61}}}
     62 1. Build relations between tickets and changesets:
     63{{{
     64trac-admin $ENV ticket_changesets resync
     65}}}
     66 1. Re-format existing ticket commit messages (DANGEROUS!)
     67    a. Produce a diff-like output for your analysis, which does not affect the database, before re-formatting existing commit messages:
     68{{{
     69trac-admin $ENV ticket_changesets diff > out.diff
     70}}}
     71       Examine out.diff and assert that re-formatting is sensible before next step.
     72    a. Re-format '''(DANGEROUS!)'''
     73{{{
     74trac-admin $ENV ticket_changesets reformat
     75}}}
     76 1. Setup hook-scripts (Windows example, does not differ from official instructions applicable to Trac 0.12):
     77    a. post-commit.cmd
     78{{{
     79:: Trac 0.12 post-commit hook script for Windows
     80::
     81@SET TRAC_ENV=...
     82@SET REPOS=%1
     83@SET REV=%2
     84@trac-admin "%TRAC_ENV%" changeset added "%REPOS%" "%REV%"
     85}}}
     86    a. post-revprop-change.cmd
     87{{{
     88:: Trac 0.12 post-revprop-change hook script for Windows
     89::
     90@SET TRAC_ENV=...
     91@SET REPOS=%1
     92@SET REV=%2
     93@trac-admin "%TRAC_ENV%" changeset modified "%REPOS%" %REV%
     94}}}
     95
     96From here-on, tickets will be updated when referenced in a commit message, and the relation between tickets and revisions are automatically tracked.
     97
     98
     99== Recent Changes ==
     100
     101[[ChangeLog(tracticketchangesetsplugin, 3)]]
     102
     103== Author/Contributors ==
     104
     105'''Author:''' [wiki:mrelbe] [[BR]]
     106'''Maintainer:''' [wiki:mrelbe] [[BR]]
     107'''Contributors:'''