92
by Martin von Gagern
Updated README. |
1 |
===================================
|
28.1.147
by Aaron Bentley
Add docs |
2 |
Multi-branch Bazaar plugin for Trac |
40
by Jelmer Vernooij
Fix typo, import note about file encoding, rstify. |
3 |
===================================
|
4 |
||
92
by Martin von Gagern
Updated README. |
5 |
.. contents:: |
28.1.147
by Aaron Bentley
Add docs |
6 |
|
7 |
This plugin is based on earlier plugins. Its main innovation is to make |
|
8 |
multiple branches available, the way Trac normally does. |
|
9 |
||
92
by Martin von Gagern
Updated README. |
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> |
|
99.2.10
by Martin von Gagern
Update copyrights. |
17 |
| Copyright (C) 2006,2007 Panoramic Feedback <abentley@panoramicfeedback.com> |
18 |
| Copyright (C) 2006,2008,2009 Jelmer Vernooij <jelmer@samba.org> |
|
19 |
| Copyright (C) 2009,2010 Martin von Gagern <Martin.vGagern@gmx.net> |
|
92
by Martin von Gagern
Updated README. |
20 |
| All rights reserved. |
28.1.153
by Aaron Bentley
Add GPL 2+ license statements |
21 |
|
22 |
This program is free software; you can redistribute it and/or modify |
|
23 |
it under the terms of the GNU General Public License as published by |
|
24 |
the Free Software Foundation; either version 2 of the License, or |
|
25 |
(at your option) any later version. |
|
26 |
||
27 |
This program is distributed in the hope that it will be useful, |
|
28 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
29 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
30 |
GNU General Public License for more details. |
|
31 |
||
32 |
You should have received a copy of the GNU General Public License |
|
33 |
along with this program; if not, write to the Free Software |
|
34 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
35 |
||
28.1.147
by Aaron Bentley
Add docs |
36 |
|
37 |
Features
|
|
38 |
========
|
|
92
by Martin von Gagern
Updated README. |
39 |
|
40 |
Repository views |
|
41 |
----------------
|
|
28.1.147
by Aaron Bentley
Add docs |
42 |
Supports all major Trac views and "changeset:" notation. |
43 |
||
44 |
Allows a collection of branches to be treated as a "trac repository", |
|
45 |
regardless of whether they are related or in the same bzr repository. |
|
46 |
||
92
by Martin von Gagern
Updated README. |
47 |
Follows symlinks to branches. |
48 |
||
49 |
Wiki Macros |
|
50 |
-----------
|
|
51 |
||
52 |
Branches
|
|
53 |
........
|
|
54 |
The plugin provides a macro called ``[[Branches]]`` |
|
55 |
to list all available branches, together with some information about them, |
|
56 |
like the current revision number and the time of the last commit. |
|
57 |
||
58 |
||
59 |
Installation
|
|
60 |
============
|
|
61 |
Basically the `Plugins section of the Trac Guide`__ applies to the |
|
62 |
installation of trac-bzr as well. |
|
63 |
It gives you several options how to install a plugin. |
|
64 |
||
65 |
.. __: http://trac.edgewall.org/wiki/TracPlugins |
|
66 |
||
67 |
System-wide using easy_install |
|
68 |
------------------------------
|
|
69 |
Executing the command "``easy_install TracBzr``" as root should install |
|
70 |
the plugin system-wide, making it available to all trac environments |
|
71 |
on that system. |
|
72 |
||
73 |
Per-environment using plugin egg file |
|
74 |
-------------------------------------
|
|
75 |
You can download the egg file corresponding to your python version and |
|
76 |
place it in the ``plugins`` directory of a Trac environment. |
|
77 |
||
78 |
Building from source |
|
79 |
--------------------
|
|
80 |
If you want to build trac-bzr from source, you can either grab a |
|
81 |
source release tarball or a checkout of a development branch. Many |
|
82 |
development branches are `listed on launchpad`__. Once you have |
|
83 |
obtained such a source tree, execute "``python setup.py install``" to |
|
84 |
install the plugin system-wide, or "``python setup.py bdist_egg``" to |
|
85 |
obtain an egg file for installation in a single Trac environment. |
|
86 |
||
87 |
.. __: https://code.launchpad.net/trac-bzr |
|
28.1.147
by Aaron Bentley
Add docs |
88 |
|
89 |
Requirements
|
|
92
by Martin von Gagern
Updated README. |
90 |
------------
|
91 |
In order to function properly, trac-bzr requires the packages listed below. |
|
97
by Martin von Gagern
Drop dependencies from setup script. |
92 |
|
93 |
These dependencies are not handled by setuptools, because otherwise |
|
94 |
the plugin would fail to load if one of the dependencies wasn't |
|
95 |
installed with setuptools or similar.
|
|
28.1.147
by Aaron Bentley
Add docs |
96 |
|
97 |
Python 2.4
|
|
92
by Martin von Gagern
Updated README. |
98 |
This plugin uses bzrlib directly, so it requires Python 2.4 or greater.
|
99 |
||
100 |
Trac 0.10
|
|
101 |
Some features may only work with Trac 0.11.
|
|
102 |
Trac 0.12 isn't officially supported (yet). |
|
103 |
||
104 |
Bazaar 2.0 |
|
105 |
This plugin should work with Bazaar 2.0. |
|
106 |
Earlier versions may or may not work. |
|
28.1.147
by Aaron Bentley
Add docs |
107 |
|
108 |
Configuration
|
|
109 |
=============
|
|
92
by Martin von Gagern
Updated README. |
110 |
To configure trac-bzr, you'll have to edit the ``trac.ini`` file of |
111 |
your Trac environment.
|
|
112 |
||
113 |
Required configuration
|
|
114 |
----------------------
|
|
115 |
After installing, you'll want to set the following values:: |
|
116 |
||
117 |
[components] |
|
118 |
tracbzr.* = enabled |
|
119 |
||
120 |
[trac] |
|
121 |
repository_type = bzr |
|
122 |
repository_dir = /path/to/collection/of/bzr/branches |
|
28.1.147
by Aaron Bentley
Add docs |
123 |
|
124 |
components
|
|
92
by Martin von Gagern
Updated README. |
125 |
..........
|
126 |
This should include "``tracbzr.* = enabled``" to enable all features |
|
127 |
provided by the plugin. |
|
128 |
As an alternative, you can enable or disable specific components |
|
129 |
providing specific features, e.g. in order to disable the wiki macro |
|
130 |
provider. |
|
131 |
Use the Trac 0.11 web admin plugin interface or have a look at the |
|
132 |
sources to find out which components are available. |
|
28.1.147
by Aaron Bentley
Add docs |
133 |
|
134 |
repository_dir
|
|
92
by Martin von Gagern
Updated README. |
135 |
..............
|
28.1.147
by Aaron Bentley
Add docs |
136 |
This should point at the directory containing your branches. This directory |
92
by Martin von Gagern
Updated README. |
137 |
does not have to be a repository. trac-bzr doesn't require branches to |
28.1.147
by Aaron Bentley
Add docs |
138 |
be related, though that is permitted, of course.
|
139 |
||
140 |
repository_type
|
|
92
by Martin von Gagern
Updated README. |
141 |
...............
|
28.1.147
by Aaron Bentley
Add docs |
142 |
This should be "bzr".
|
143 |
||
92
by Martin von Gagern
Updated README. |
144 |
Optional configuration
|
145 |
----------------------
|
|
146 |
There are some optional settings you can configure for trac-bzr.
|
|
147 |
If you do not specify them, the following defaults will be used instead::
|
|
148 |
||
149 |
[tracbzr]
|
|
99.2.12
by Martin von Gagern
Drop root dir from primary_branches. |
150 |
primary_branches = trunk
|
99.2.16
by Martin von Gagern
Introduce include_sideline_changes configuration option. |
151 |
include_sideline_changes = True
|
92
by Martin von Gagern
Updated README. |
152 |
|
153 |
primary_branches
|
|
154 |
................
|
|
155 |
This is a comma-separated ordered list of the main branches of your project.
|
|
156 |
You may also specify `glob patterns`_ in this list to match multiple branches.
|
|
157 |
||
99.1.1
by Michael Gliwinski
Note on primary_branches when repository_dir set to dir containing subdirs (e.g. for sub-projects). |
158 |
Note that the pattern must match from the root of repository_dir, so if you
|
159 |
set it to e.g. a directory containing sub-directories which in turn contain
|
|
160 |
branches, you should set primary_branches to ``*/BRANCH``.
|
|
161 |
||
92
by Martin von Gagern
Updated README. |
162 |
The Branches_ wiki macro will list branches in the order specified by this list.
|
163 |
The timeline view will try to associate changesets with branches in the
|
|
164 |
specified order.
|
|
165 |
In both cases, branches not matched by any list item will be inserted at the
|
|
166 |
end of the list, as if you had ended the list with ``,*``.
|
|
167 |
Branches matched by a single list item will be sorted alphabetically.
|
|
168 |
||
169 |
.. _`glob patterns`: http://docs.python.org/library/fnmatch.html
|
|
28.1.147
by Aaron Bentley
Add docs |
170 |
|
99.2.16
by Martin von Gagern
Introduce include_sideline_changes configuration option. |
171 |
include_sideline_changes
|
172 |
........................
|
|
173 |
This boolean flag selects whether or not sideline changes, i.e. those
|
|
174 |
denoted with dotted revision numbers, are included in the list of all
|
|
175 |
changes. This affects the output of the ``get_changesets`` method,
|
|
176 |
which in turn influences the events listed in the timeline view.
|
|
177 |
||
178 |
Note that there might be other plugins using that information as well,
|
|
179 |
so there might be other components beside the timeline view that get
|
|
180 |
affected by this setting.
|
|
181 |
||
99.2.15
by Martin von Gagern
Add performance section to README, mentioning bzr-revnocache. |
182 |
Performance
|
183 |
===========
|
|
184 |
||
185 |
Some user-level operations are rather slow, because Trac's assumptions |
|
186 |
about which repository operations are cheap vs expensive doesn't match |
|
187 |
Bazaar's design. |
|
188 |
||
189 |
Revision numbers |
|
190 |
----------------
|
|
191 |
||
192 |
One of the problems is the mapping between revision identifiers and |
|
193 |
revision numbers. The `Bazaar Revision Numbering Cache Plugin`__ might |
|
194 |
help for this problem, although it's experimental and hasn't been |
|
195 |
tested with trac-bzr extensively enough. Feedback welcome. |
|
196 |
||
197 |
.. __: https://launchpad.net/bzr-revnocache |
|
198 |
||
199 |
Last modifications |
|
200 |
------------------
|
|
201 |
||
202 |
Another problem is that bzr has a different idea about the last |
|
203 |
modification of a directory. In svn, any modifications of directory |
|
204 |
contents is said to modify the dir as well. In bzr, only changes to |
|
205 |
the set of files in a directory are counted. |
|
206 |
||
207 |
Investigations are in progress about how to solve this problem, |
|
208 |
probably through the use of caches. |
|
209 |
||
28.1.147
by Aaron Bentley
Add docs |
210 |
Limitations
|
211 |
===========
|
|
212 |
||
213 |
Bogus changesets |
|
214 |
----------------
|
|
215 |
This plugin introduces the bogus changeset "current:", which is used as |
|
216 |
the last-revision for directories that are not branches. It also provides |
|
217 |
"null:", which is part of Bazaar's theoretical model, but usually hidden. |
|
218 |
||
92
by Martin von Gagern
Updated README. |
219 |
Hidden nested branches
|
28.1.147
by Aaron Bentley
Add docs |
220 |
----------------------
|
221 |
Because Trac, like Subversion, doesn't differentiate between "source file |
|
222 |
namespace" and "branch namespace", it is impossible to view branches whose |
|
223 |
directories are directly inside other branches' directories. |
|
224 |
||
92
by Martin von Gagern
Updated README. |
225 |
Revision order
|
28.1.147
by Aaron Bentley
Add docs |
226 |
--------------
|
92
by Martin von Gagern
Updated README. |
227 |
If two changesets are not related to one another by some direct ancestry,
|
228 |
i.e. if neither one is an ancestor of the other, then revisions are sorted by
|
|
229 |
timestamp instead.
|
|
230 |
In case of a clock skew this can lead to inconcistent results,
|
|
231 |
as transitivity isn't guaranteed for this approach. |
|
28.1.147
by Aaron Bentley
Add docs |
232 |
|
233 |
Bracket syntax |
|
234 |
--------------
|
|
92
by Martin von Gagern
Updated README. |
235 |
Trac does not to recognize bzr revision strings in its bracket notation, |
236 |
e.g. ``[tree,25]``. |
|
237 |
However, you can use the changeset notation instead, e.g. |
|
238 |
``changeset:tree,25``. |
|
40
by Jelmer Vernooij
Fix typo, import note about file encoding, rstify. |
239 |
|
99.1.2
by Michael Gliwinski
Note about revision specification format. |
240 |
Revision specification format |
241 |
-----------------------------
|
|
242 |
Since Trac repository queries don't give trac-bzr enough context, revisions |
|
243 |
have to be specified and are presented in the format ``PATH_TO_BRANCH,REV``
|
|
244 |
where ``PATH_TO_BRANCH`` is the path to branch (or object within the branch
|
|
245 |
like directory or file) relative to repository_dir, with slashes ('/') |
|
99.5.1
by Martin von Gagern
Fix minor error in README. |
246 |
replaced with commas (','). |
99.1.2
by Michael Gliwinski
Note about revision specification format. |
247 |
|
248 |
This is visible when browsing the branches via Trac's source browser and this |
|
249 |
is also what you have to use in TracLinks. |
|
250 |
||
99.1.4
by Michael Gliwinski
Added note on future multirepo support to README. |
251 |
This may be improved in the future when Trac properly supports multiple |
99.1.7
by Michael Gliwinski
Added reference to MultipleRepositorySupport info page in Trac wiki. |
252 |
repositories (possibly Trac 0.12, see Trac's `MultipleRepositorySupport`_ |
253 |
page). Also see `trac-bzr multirepo spec`_.
|
|
99.1.4
by Michael Gliwinski
Added note on future multirepo support to README. |
254 |
|
99.1.5
by Michael Gliwinski
Add notes on possible workarounds for revspec limitations. |
255 |
In the meantime, if you have an urgent need to address that and are able
|
99.1.8
by Michael Gliwinski
Fixed wording to make it clearer. |
256 |
to spend some time implementing it, have a look at HACKING document for
|
257 |
possible approaches in Trac 0.11 and below.
|
|
99.1.5
by Michael Gliwinski
Add notes on possible workarounds for revspec limitations. |
258 |
|
99.1.7
by Michael Gliwinski
Added reference to MultipleRepositorySupport info page in Trac wiki. |
259 |
.. _`MultipleRepositorySupport`: http://trac.edgewall.org/wiki/MultipleRepositorySupport
|
99.1.4
by Michael Gliwinski
Added note on future multirepo support to README. |
260 |
.. _`trac-bzr multirepo spec`: https://blueprints.launchpad.net/trac-bzr/+spec/multirepo
|
261 |
||
99.1.9
by Michael Gliwinski
Added info on unsupported download links. |
262 |
Unsupported download links
|
263 |
--------------------------
|
|
264 |
Using download links in source browser (under "Download in other formats"
|
|
265 |
heading) is not supported. For details see `bug 394204`_, in short this is
|
|
99.2.1
by Michael Gliwinski
Additional documentation regarding revision format and downloads. |
266 |
a problem which should be addressed in Trac itself.
|
99.1.9
by Michael Gliwinski
Added info on unsupported download links. |
267 |
|
268 |
In fact an `upstream bug report`_ is already filled in and a patch is
|
|
269 |
available, so if you're interested in this feature check it out and discuss |
|
270 |
any issues with it upstream. |
|
271 |
||
272 |
.. _`bug 394204`: https://bugs.launchpad.net/trac-bzr/+bug/394204 |
|
273 |
.. _`upstream bug report`: http://trac.edgewall.org/ticket/8919 |
|
274 |
||
40
by Jelmer Vernooij
Fix typo, import note about file encoding, rstify. |
275 |
File encoding |
276 |
-------------
|
|
277 |
Because at the moment Bazaar does not store information about encoding of text |
|
278 |
files, you may want to change the default character set used by trac. |
|
279 |
By default trac use encoding iso-8895-15 to show content of your files. |
|
280 |
If you need to change this option, you need to edit trac.ini of your project. |
|
281 |
In section "trac" you need to change parameter named "default_charset". E.g. |
|
282 |
for russian files:: |
|
283 |
||
284 |
[trac] |
|
285 |
default_charset = cp1251 |
|
286 |
||
93
by Martin von Gagern
Extended setup script: dependencies, classifiers, dates and readme. |
287 |
.. cut long_description here |
288 |
||
40
by Jelmer Vernooij
Fix typo, import note about file encoding, rstify. |
289 |
.. vim: ft=rst |
92
by Martin von Gagern
Updated README. |
290 |
|
291 |
.. emacs |
|
292 |
Local Variables: |
|
293 |
mode: rst |
|
294 |
End: |