[[PageOutline(2-5,Contents,pullout)]] = Show ticket relative changelogs == Description This plugin adds a changelog list in a Trac ticket. You do not need to switch from your coding environment to your browser and your comment ticket anymore to see this changeset. Just compose your log message following the pattern. The default pattern is add #ticketid before the log messages. {{{ #ticketid any messages }}} This is done by scanning commit logs for the ticket number which match a configurable regular expression. Tested with Subversion, Mercurial and Git. === Mercurial For mercurial backend, since [t:#8417 TracMecurial does not support repository cache] yet, you should install [http://github.com/maraujop/TracMercurialChangesetPlugin TracMercurialChangesetPlugin] to generate the repository cache. === Git For git backend, according to #7746, you should add following config to git section in the `trac.ini` file: {{{#!ini [git] cached_repository = true persistent_cache = true }}} You might need to run `trac-admin repository resync` after the change. == Example For example, when you commit for ticket #10, the commit log like: {{{ #10 fixed blog }}} And you got a revision [1234]. After that, when open ticket #10, you can see a change log list: [[Image(ticketlog.png)]] == Bugs/Feature Requests Existing bugs and feature requests for TracTicketChangelogPlugin are [report:9?COMPONENT=TracTicketChangelogPlugin here]. If you have any issues, create a [/newticket?component=TracTicketChangelogPlugin new ticket]. [[TicketQuery(component=TracTicketChangelogPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:tracticketchangelogplugin here]. == Source You can check out TracTicketChangelogPlugin from [/svn/tracticketchangelogplugin here] using Subversion, or [source:tracticketchangelogplugin browse the source] with Trac. == Installation You can install this plugin following the standard procedures described in [wiki:TracPlugins#InstallingaTracplugin]. 1. Uninstall TracTicketChangelogPlugin if you have installed it before. 1. Change to the directory containning setup.py. * (Optional): If you are using Trac 0.12 with i18n, you should compile language files here: {{{#!sh python setup.py compile_catalog -f }}} 1. If you want to install this plugin globally, that will install this plugin to the Python path: * python setup.py install 1. If you want to install this plugin to the Trac instance only: * python setup.py bdist_egg * copy the generated egg file to the trac instance's plugin directory {{{#!sh cp dist/*.egg /srv/trac/env/plugins }}} 1. Add the following to the `trac.ini` file in the components section: {{{#!ini [components] ticketlog.* = enabled [ticketlog] ; optional: custom your log message pattern log_pattern = \s*#%s[:\s]+.* ; optional: set log message's max length, default is no limit log_message_maxlength = 100 }}} == Usage * Make sure you add `TICKETLOG_VIEW` permission to users. * You can configure the log_pattern to define your pattern:[[br]] `%s` in the pattern will be replaced with the referenced ticket number (e.g. 12345), so `\s*#%s+\s+.*` will be evaluated as `\s*#12345+\s+.*`.[[br]]__Patterns:__ * `(?:\n|[^#])*#%s(?:\D|$)` matches ticket references in the form `#xyz` anywhere in the commit message.[[br]]See comment:5:ticket:7884 == Recent Changes [[ChangeLog(tracticketchangelogplugin, 3)]] == Author/Contributors '''Author:''' [wiki:richard] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:''' hasienda, jun66j5, rjollos