wiki:TracTicketChangelogPlugin

Version 13 (modified by rjollos, 14 months ago) (diff)

Added syntax highlighting.

Show ticket relative changelogs

Description

This plugin add a changelog list in ticket.

You do not need to switch from your coding environment to browser and comment ticket for this changeset anymore.

Just compose you log message following the pattern, then all done. The default pattern is add #ticketid before the log messages.

#ticketid any messages

This is done by scanning commit logs for ticket number which match a configurable regular expression.

Subversion, mercurial, git are tested.

mercurial

For mercurial backend, since TracMecurial did not support repository cache yet, you should install TracMercurialChangesetPlugin to generate repository cache.

git

For git backend, according to #7746, you should add following config to git section:

[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: {{{!ini #10 fixed blog }}} And you got a revision [1234]. After that, when open ticket #10, you can see a change log list as below.

Bugs/Feature Requests

Existing bugs and feature requests for TracTicketChangelogPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out TracTicketChangelogPlugin from here using Subversion, or browse the source with Trac.

Install

You can install this software as normal Trac plugin.

  1. Uninstall TracTicketChangelogPlugin if you have installed 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:
      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 trac instance only:
    • python setup.py bdist_egg
    • copy the generated egg file to the trac instance's plugin directory
      cp dist/*.egg /srv/trac/env/plugins
      
  1. Config trac.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
    

Prerequisite

  • simplejson

Usage

  • make sure you add TICKETLOG_VIEW permission to users
  • you can config log_pattern to define your pattern.
    %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+.*.

Recent Changes

[13960] by rjollos on 2014-06-09 17:02:30
0.2dev: Fixed package name in dependency and a Python 2.4 compatibility change.
[13959] by rjollos on 2014-06-08 09:25:51
0.2dev: Use canonical representation of revision in Trac 0.12 and later. Fixes #8846.
[13958] by rjollos on 2014-06-08 08:31:03
0.2dev: Refactor to simplify building of revisions dictionary.

Author/Contributors

Author: richard
Maintainer: richard
Contributors:

Attachments (1)

Download all attachments as: .zip