Changes between Version 24 and Version 25 of TracTicketChangesetsPlugin


Ignore:
Timestamp:
Nov 12, 2015, 10:57:57 AM (8 years ago)
Author:
figaro
Comment:

Rearranged paragraphs to maintain consistency, further cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracTicketChangesetsPlugin

    v24 v25  
    55== Description
    66
    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.
     7This plugin 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.
    88
    99The 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.
    1010
    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).
     11'''Note:''' 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).
    1212
    1313See also: TracTicketChangelogPlugin, TicketModifiedFilesPlugin
     
    2323[[TicketQuery(component=TracTicketChangesetsPlugin&group=type,format=progress)]]
    2424
    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.
     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 [/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.
    2626
    2727== Download
    2828
    29 Download the zipped source from [download:tracticketchangesetsplugin here].
     29Download the zipped source from [export:tracticketchangesetsplugin here].
    3030
    3131== Source
    3232
    33 You can check out TracTicketChangesetsPlugin from [http://trac-hacks.org/svn/tracticketchangesetsplugin here] using Subversion, or [source:tracticketchangesetsplugin browse the source] with Trac.
    34 
    35 == Example
    36 
    37 The related changesets are presented just above the ordinary change history:
    38 
    39 [[Image(ticket_changesets_box.gif)]]
    40 
    41 When several repositories contains changesets relating to a ticket, the content will gracefully be split into one sub-section for each repository.
    42 
    43 The plugin can be configured to present the box as initially collapsed, or hidden completely when no changesets are related to the ticket. Revision ranges can be presented in compact form, for example [420-422] instead of [420] [421] [422].
    44 
    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.
    46 
    47 === Console administration commands
    48 
    49 Console administration commands are available for retrieving and re-synchronizing ticket-changesets relations, and reformatting existing ticket commit messages.
    50 
    51 
    52  `trac-admin /path/to/env ticket_changesets diff`::
    53  Examine ticket commit messages before reformat.
    54 
    55  Generate a diff-like output for analysis before reformatting. The database will not be changed. Before this operation, you may want to run
    56 {{{
    57 trac-admin $ENV repository resync "*"
    58 }}}
    59 
    60 
    61  `trac-admin /path/to/env ticket_changesets get [ticketid]`::
    62  Get a comma-separated list of related revisions (#7267).
    63 
    64  List format:
    65 {{{
    66 #ticketid: rev/reponame,...
    67 ...
    68 }}}
    69  "/reponame" is left out for the default repository.
    70 
    71  All tickets related to changesets are listed if ticketid is omitted, one ticket on each line. If no ticket-changesets relations exists in the database, "None" is displayed.
    72 
    73 
    74  `trac-admin /path/to/env ticket_changesets reformat` '''(DANGEROUS!)'''::
    75  Reformat ticket commit messages.
    76 
    77  Before this operation, you may want to run:
    78 {{{
    79 trac-admin $ENV repository resync "*"
    80 }}}
    81  and then analyse the output of
    82 {{{
    83 trac-admin $ENV ticket_changesets diff
    84 }}}
    85 
    86 
    87  `trac-admin /path/to/env ticket_changesets resync`::
    88  Re-synchronize ticket changesets with all repositories
    89 
    90  Relations between tickets and changesets are re-built by examining all commit messages, in all repositories, for ticket references. Ticket comments are neither updated nor added due to new discoveries.
    91 
    92  Before this operation, you may want to run:
    93 {{{
    94 trac-admin $ENV repository resync "*"
    95 }}}
     33You can check out TracTicketChangesetsPlugin from [/svn/tracticketchangesetsplugin here] using Subversion, or [source:tracticketchangesetsplugin browse the source] with Trac.
    9634
    9735== Installation
    9836
    9937 1. Install the plugin, even with locale support:
    100 {{{#!sh
     38 {{{#!sh
    10139cd TracTicketChangesetsPlugin
    10240python setup.py install
    10341}}}
    10442 1. Enable the plugin by the following in your `trac.ini` file:
    105 {{{#!ini
     43 {{{#!ini
    10644[components]
    10745ticketchangesets.* = enabled
    10846}}}
    10947 1. Add the section `[ticket-changesets]` to configure the behaviour ''(default values are shown below)'':
    110 {{{#!ini
     48 {{{#!ini
    11149[ticket-changesets]
    11250check_perms = true
     
    14684 1. Re-format existing ticket commit messages: '''(DANGEROUS!)'''
    14785    a. Produce a diff-like output for your analysis, which does not affect the database, before re-formatting existing commit messages:
    148  {{{#!sh
     86    {{{#!sh
    14987trac-admin /path/to/env ticket_changesets diff > out.diff
    15088}}}
    151  Examine out.diff and assert that re-formatting is sensible before next step.
     89    Examine out.diff and assert that re-formatting is sensible before next step.
    15290    a. Re-format '''(DANGEROUS!)'''
    153  {{{#!sh
     91    {{{#!sh
    15492trac-admin /path/to/env ticket_changesets reformat
    15593}}}
    15694 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.
    15795    a. post-commit.cmd:
    158  {{{#!sh
     96    {{{#!sh
    15997:: Trac 0.12 post-commit hook script for Windows
    16098::
     
    164102}}}
    165103    a. post-revprop-change.cmd:
    166  {{{#!sh
     104    {{{#!sh
    167105:: Trac 0.12 post-revprop-change hook script for Windows
    168106::
     
    173111
    174112From here-on tickets will be updated when referenced in a commit message, and the relation between tickets and revisions is automatically tracked.
     113
     114== Example
     115
     116The related changesets are presented just above the ordinary change history:
     117
     118[[Image(ticket_changesets_box.gif)]]
     119
     120When several repositories contains changesets relating to a ticket, the content will gracefully be split into one sub-section for each repository.
     121
     122The plugin can be configured to present the box as initially collapsed, or hidden completely when no changesets are related to the ticket. Revision ranges can be presented in compact form, for example [420-422] instead of [420] [421] [422].
     123
     124The 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.
     125
     126=== Console administration commands
     127
     128Console administration commands are available for retrieving and re-synchronizing ticket-changesets relations, and reformatting existing ticket commit messages.
     129
     130 `trac-admin /path/to/env ticket_changesets diff`::
     131 Examine ticket commit messages before reformat.
     132
     133 Generate a diff-like output for analysis before reformatting. The database will not be changed. Before this operation, you may want to run:
     134{{{#!sh
     135trac-admin $ENV repository resync "*"
     136}}}
     137
     138 `trac-admin /path/to/env ticket_changesets get [ticketid]`::
     139 Get a comma-separated list of related revisions (#7267).
     140
     141 List format:
     142{{{
     143#ticketid: rev/reponame,...
     144...
     145}}}
     146 "/reponame" is left out for the default repository.
     147
     148 All tickets related to changesets are listed if ticketid is omitted, one ticket on each line. If no ticket-changesets relations exists in the database, "None" is displayed.
     149
     150
     151 `trac-admin /path/to/env ticket_changesets reformat` '''(DANGEROUS!)'''::
     152 Reformat ticket commit messages.
     153
     154 Before this operation, you may want to run:
     155{{{#!sh
     156trac-admin $ENV repository resync "*"
     157}}}
     158
     159 and then analyse the output of:
     160{{{#!sh
     161trac-admin $ENV ticket_changesets diff
     162}}}
     163
     164 `trac-admin /path/to/env ticket_changesets resync`::
     165 Re-synchronize ticket changesets with all repositories
     166
     167 Relations between tickets and changesets are re-built by examining all commit messages, in all repositories, for ticket references. Ticket comments are neither updated nor added due to new discoveries.
     168
     169 Before this operation, you may want to run:
     170{{{#!sh
     171trac-admin $ENV repository resync "*"
     172}}}
    175173
    176174== About i18n/l10n support