1
===================================
1
2
Multi-branch Bazaar plugin for Trac
2
3
===================================
6
7
This plugin is based on earlier plugins. Its main innovation is to make
7
8
multiple branches available, the way Trac normally does.
9
Copyright (C) 2005 Edgewall Software
10
Copyright (C) 2005-2006 Christian Boos <cboos@neuf.fr>
11
Copyright (C) 2005 Johan Rydberg <jrydberg@gnu.org>
12
Copyright (C) 2006 Yann Hodique <hodique@lifl.fr>
13
Copyright (C) 2006 Jelmer Vernooij <jelmer@samba.org>
14
Copyright (C) 2006 Lukas Lalinsky <lalinsky@gmail.com>
15
Copyright (C) 2006 Marien Zwart <marienz@gentoo.org>
16
Copyright (C) 2006, 2007 Panoramic Feedback <abentley@panoramicfeedback.com>
10
| Copyright (C) 2005 Edgewall Software
11
| Copyright (C) 2005-2006 Christian Boos <cboos@neuf.fr>
12
| Copyright (C) 2005 Johan Rydberg <jrydberg@gnu.org>
13
| Copyright (C) 2006 Yann Hodique <hodique@lifl.fr>
14
| Copyright (C) 2006 Jelmer Vernooij <jelmer@samba.org>
15
| Copyright (C) 2006 Lukas Lalinsky <lalinsky@gmail.com>
16
| Copyright (C) 2006 Marien Zwart <marienz@gentoo.org>
17
| Copyright (C) 2006, 2007 Panoramic Feedback <abentley@panoramicfeedback.com>
18
| Copyright (C) 2009 Martin von Gagern <Martin.vGagern@gmx.net>
19
| All rights reserved.
19
21
This program is free software; you can redistribute it and/or modify
20
22
it under the terms of the GNU General Public License as published by
36
41
Supports all major Trac views and "changeset:" notation.
38
43
Allows a collection of branches to be treated as a "trac repository",
39
44
regardless of whether they are related or in the same bzr repository.
41
Follows symlinks to branches
46
Follows symlinks to branches.
53
The plugin provides a macro called ``[[Branches]]``
54
to list all available branches, together with some information about them,
55
like the current revision number and the time of the last commit.
60
Basically the `Plugins section of the Trac Guide`__ applies to the
61
installation of trac-bzr as well.
62
It gives you several options how to install a plugin.
64
.. __: http://trac.edgewall.org/wiki/TracPlugins
66
System-wide using easy_install
67
------------------------------
68
Executing the command "``easy_install TracBzr``" as root should install
69
the plugin system-wide, making it available to all trac environments
72
Per-environment using plugin egg file
73
-------------------------------------
74
You can download the egg file corresponding to your python version and
75
place it in the ``plugins`` directory of a Trac environment.
79
If you want to build trac-bzr from source, you can either grab a
80
source release tarball or a checkout of a development branch. Many
81
development branches are `listed on launchpad`__. Once you have
82
obtained such a source tree, execute "``python setup.py install``" to
83
install the plugin system-wide, or "``python setup.py bdist_egg``" to
84
obtain an egg file for installation in a single Trac environment.
86
.. __: https://code.launchpad.net/trac-bzr
90
In order to function properly, trac-bzr requires the packages listed below.
92
These dependencies are not handled by setuptools, because otherwise
93
the plugin would fail to load if one of the dependencies wasn't
94
installed with setuptools or similar.
49
This plugin uses bzrlib directly, so it requires Python 2.4 or greater.
53
This has been tested with Bazaar 0.13. Earlier versions may or may not work.
97
This plugin uses bzrlib directly, so it requires Python 2.4 or greater.
100
Some features may only work with Trac 0.11.
101
Trac 0.12 isn't officially supported (yet).
104
This plugin should work with Bazaar 2.0.
105
Earlier versions may or may not work.
58
After installing, you'll want to set the following values:
109
To configure trac-bzr, you'll have to edit the ``trac.ini`` file of
110
your Trac environment.
112
Required configuration
113
----------------------
114
After installing, you'll want to set the following values::
120
repository_type = bzr
121
repository_dir = /path/to/collection/of/bzr/branches
62
This should include "tracbzr.* = enabled"
125
This should include "``tracbzr.* = enabled``" to enable all features
126
provided by the plugin.
127
As an alternative, you can enable or disable specific components
128
providing specific features, e.g. in order to disable the wiki macro
130
Use the Trac 0.11 web admin plugin interface or have a look at the
131
sources to find out which components are available.
66
135
This should point at the directory containing your branches. This directory
67
does not have to be a repository. trac+bzr doesn't require branches to
136
does not have to be a repository. trac-bzr doesn't require branches to
68
137
be related, though that is permitted, of course.
72
141
This should be "bzr".
74
You can also use "bzr+debug" for debug mode. In debug mode, all
75
repository operations are logged to the standard log output. (Turning this on
76
for one repository_dir may enable it for all of them.)
143
Optional configuration
144
----------------------
145
There are some optional settings you can configure for trac-bzr.
146
If you do not specify them, the following defaults will be used instead::
149
primary_branches = ,trunk
153
This is a comma-separated ordered list of the main branches of your project.
154
You may also specify `glob patterns`_ in this list to match multiple branches.
156
The Branches_ wiki macro will list branches in the order specified by this list.
157
The timeline view will try to associate changesets with branches in the
159
In both cases, branches not matched by any list item will be inserted at the
160
end of the list, as if you had ended the list with ``,*``.
161
Branches matched by a single list item will be sorted alphabetically.
163
.. _`glob patterns`: http://docs.python.org/library/fnmatch.html
99
185
in this directory." In theory, this can be solved by caching the results of
100
186
expensive operations.
104
Changesets are sorted by timestamp, so clock skew may cause some changesets
105
to be displayed out-of order. Changesets have only a partial ordering anyhow,
106
and this was deemed faster.
190
If two changesets are not related to one another by some direct ancestry,
191
i.e. if neither one is an ancestor of the other, then revisions are sorted by
193
In case of a clock skew this can lead to inconcistent results,
194
as transitivity isn't guaranteed for this approach.
110
Trac appears not to recognize bzr revision strings in its bracket notation,
111
e.g. [tree,25]. However, you can use the changeset notation instead, e.g.
198
Trac does not to recognize bzr revision strings in its bracket notation,
200
However, you can use the changeset notation instead, e.g.
201
``changeset:tree,25``.