Changes between Version 23 and Version 24 of TracTicketChangesetsPlugin
- Timestamp:
- Jun 3, 2015, 12:42:27 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracTicketChangesetsPlugin
v23 v24 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Ticket Changesets Plugin =4 5 == Description ==3 = Ticket Changesets Plugin 4 5 == Description 6 6 7 7 The 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 change history section. 8 8 9 The source of this plugin is based on code distributed with Trac 0.12 (tracopt/ticket/commit_updater.py). The plugin works with multiple repositories. Language is translated if Babel is installed.9 The source of this plugin is based on code distributed with Trac 0.12: `tracopt/ticket/commit_updater.py`. The plugin works with multiple repositories. Language is translated if Babel is installed. 10 10 11 11 '''This plugin is not compatible with Trac 0.11 or older versions.''' If you have ChildTicketsPlugin installed, you should upgrade to 2.4.2 or later (#8755, #8756). … … 13 13 See also: TracTicketChangelogPlugin, TicketModifiedFilesPlugin 14 14 15 == Bugs/Feature Requests ==15 == Bugs/Feature Requests 16 16 17 17 Existing bugs and feature requests for TracTicketChangesetsPlugin are … … 19 19 20 20 If you have any issues, create a 21 [http://trac-hacks.org/newticket?component=TracTicketChangesetsPlugin&owner=mrelbe new ticket]. 22 23 === Defects === 24 25 [[TicketQuery(status=!closed&component=TracTicketChangesetsPlugin&type=defect)]] 26 27 === Wishes === 28 29 [[TicketQuery(status=!closed&component=TracTicketChangesetsPlugin&type=!defect)]] 30 31 The plugin currently does not reformat ticket-commit-messages produced by Trac 0.11 since I am not confident in how those are formatted. Please [http://trac-hacks.org/newticket?component=TracTicketChangesetsPlugin&owner=mrelbe&summary=Reformat+old+commit+messages request this] together with examples of old ticket-commit-messages, and I will add that capability to this plugin. 32 33 == Download == 21 [/newticket?component=TracTicketChangesetsPlugin new ticket]. 22 23 [[TicketQuery(component=TracTicketChangesetsPlugin&group=type,format=progress)]] 24 25 '''Note:''' The plugin currently does not reformat ticket-commit-messages produced by Trac 0.11 since I am not confident in how those are formatted. Please [http://trac-hacks.org/newticket?component=TracTicketChangesetsPlugin&owner=mrelbe&summary=Reformat+old+commit+messages request this] together with examples of old ticket-commit-messages, and I will add that capability to this plugin. 26 27 == Download 34 28 35 29 Download the zipped source from [download:tracticketchangesetsplugin here]. 36 30 37 == Source ==31 == Source 38 32 39 33 You can check out TracTicketChangesetsPlugin from [http://trac-hacks.org/svn/tracticketchangesetsplugin here] using Subversion, or [source:tracticketchangesetsplugin browse the source] with Trac. 40 34 41 == Example ==35 == Example 42 36 43 37 The related changesets are presented just above the ordinary change history: 44 [[Image(ticket_changesets_box.gif)]] 38 39 [[Image(ticket_changesets_box.gif)]] 45 40 46 41 When several repositories contains changesets relating to a ticket, the content will gracefully be split into one sub-section for each repository. … … 50 45 The 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. 51 46 52 53 == Console administration commands == 47 === Console administration commands 54 48 55 49 Console administration commands are available for retrieving and re-synchronizing ticket-changesets relations, and reformatting existing ticket commit messages. … … 101 95 }}} 102 96 103 104 == Installation instructions == 97 == Installation 98 105 99 1. Install the plugin, even with locale support: 106 {{{ 100 {{{#!sh 107 101 cd TracTicketChangesetsPlugin 108 102 python setup.py install 109 103 }}} 110 1. Enable the plugin by the following in trac.ini:111 {{{ 104 1. Enable the plugin by the following in your `trac.ini` file: 105 {{{#!ini 112 106 [components] 113 107 ticketchangesets.* = enabled 114 108 }}} 115 109 1. Add the section `[ticket-changesets]` to configure the behaviour ''(default values are shown below)'': 116 {{{ 110 {{{#!ini 117 111 [ticket-changesets] 118 112 check_perms = true … … 139 133 * '''ticket_comments''': Add a ticket comment based on changeset info, for each referenced ticket. Set to `false` to suppress ticket comments when this plugin is used along with e.g. the commit-ticket-updater plugin offered by Trac (tracopt/ticket/commit_updater.py). If set to `true`, then `tracopt.ticket.commit_updater.*` should be set to `disabled`. (#7529) 140 134 1. The Trac environment needs to be upgraded: 141 {{{ 135 {{{#!sh 142 136 trac-admin /path/to/env upgrade 143 137 }}} 144 138 1. Re-synchronize repositories (optional, but recommended before next step which will scan all existing commit messages): 145 {{{ 139 {{{#!sh 146 140 trac-admin /path/to/env repository resync "*" 147 141 }}} 148 142 1. Build relations between tickets and changesets: 149 {{{ 143 {{{#!sh 150 144 trac-admin /path/to/env ticket_changesets resync 151 145 }}} 152 1. Re-format existing ticket commit messages (DANGEROUS!)146 1. Re-format existing ticket commit messages: '''(DANGEROUS!)''' 153 147 a. Produce a diff-like output for your analysis, which does not affect the database, before re-formatting existing commit messages: 154 {{{ 148 {{{#!sh 155 149 trac-admin /path/to/env ticket_changesets diff > out.diff 156 150 }}} 157 151 Examine out.diff and assert that re-formatting is sensible before next step. 158 152 a. Re-format '''(DANGEROUS!)''' 159 {{{ 153 {{{#!sh 160 154 trac-admin /path/to/env ticket_changesets reformat 161 155 }}} 162 1. Setup hook-scripts (Windows example, does not differ from official instructions applicable to Trac 0.12):[[br]]Note that you may have to set the environment variable PYTHON_EGG_CACHE to the same value as was used for the web server configuration before calling trac-admin, if you changed it from its default location. See http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync for more information.163 a. post-commit.cmd 164 {{{ 156 1. Setup hook-scripts (Windows example, does not differ from official instructions applicable to Trac 0.12):[[br]]Note that you may have to set the environment variable `PYTHON_EGG_CACHE` to the same value as was used for the web server configuration before calling trac-admin, if you changed it from its default location. See t:TracRepositoryAdmin#ExplicitSync for more information. 157 a. post-commit.cmd: 158 {{{#!sh 165 159 :: Trac 0.12 post-commit hook script for Windows 166 160 :: … … 169 163 @trac-admin /path/to/env changeset added "%REPOS%" "%REV%" 170 164 }}} 171 a. post-revprop-change.cmd 172 {{{ 165 a. post-revprop-change.cmd: 166 {{{#!sh 173 167 :: Trac 0.12 post-revprop-change hook script for Windows 174 168 :: … … 178 172 }}} 179 173 180 From here-on , tickets will be updated when referenced in a commit message, and the relation between tickets and revisions areautomatically tracked.181 182 183 == About i18n/l10n support == 174 From here-on tickets will be updated when referenced in a commit message, and the relation between tickets and revisions is automatically tracked. 175 176 == About i18n/l10n support 177 184 178 The development version of this plugin is prepared for localization.[[BR]] 185 But English message texts are still the (POSIX) default. If this isn't your preferred language, you can do it yourself (see the [t:wiki:CookBook/PluginL10N#Dotranslatorswork l10n cookbook page for Trac plugins] for more details). 186 187 You've done a new translation? Superb! Contributing your translation is highly appreciated.[[BR]] 188 You could send it to the plugin's maintainer ~~or contribute to [TracPluginTranslation Trac plugin l10n project] via [http://www.transifex.net/projects/p/Trac_Plugin-L10N/ Transifex]~~ ''(not yet)''. 179 But English message texts are still the (POSIX) default. If this isn't your preferred language, you can do it yourself. See the [t:wiki:CookBook/PluginL10N#Dotranslatorswork l10n cookbook page for Trac plugins] for more details. 180 181 You've done a new translation? Superb! Contributing your translation is highly appreciated. You could send it to the plugin's maintainer. 189 182 190 183 Preparing the plugin from source requires no additional step for compiling message catalog files, that's part of a normal installation: 191 {{{ 184 {{{#!sh 192 185 cd TracTicketChangesetsPlugin 193 186 python ./setup.py install 194 187 }}} 195 188 196 197 == Recent Changes == 189 == Recent Changes 198 190 199 191 [[ChangeLog(tracticketchangesetsplugin, 3)]] 200 192 201 == Feedback ==193 == Feedback 202 194 203 195 [[Poll(Are you using TracTicketChangesets plugin?; Yes, it's usefull.; No, it's useless.; No, I don't need it.; Yes, it helps.)]] 204 196 205 == Author/Contributors ==197 == Author/Contributors 206 198 207 199 '''Author:''' [wiki:mrelbe] [[BR]] 208 '''Maintainer:''' [ wiki:mrelbe] [[BR]]200 '''Maintainer:''' [[Maintainer]] [[BR]] 209 201 '''Contributors:'''