1
loggerhead: A web viewer for ``bzr`` branches
2
==============================================
4
Loggerhead is a web viewer for projects in bazaar. It can be used to navigate
5
a branch history, annotate files, view patches, perform searches, etc.
6
It is heavily based on ``bazaar-webserve``, which is itself based on ``hgweb``
12
Loggerhead depends on the following Python libraries.:
14
- SimpleTAL for templating.
16
- simplejson for producing JSON data.
18
- Paste for the server. (You need version 1.2 or newer of Paste.)
20
- Paste Deploy (optional, needed when proxying through Apache)
22
- flup (optional, needed to use FastCGI, SCGI or AJP)
25
Installing Dependencies Using Ubuntu Packages
26
#############################################
30
$ sudo apt-get install python-simpletal
31
$ sudo apt-get install python-simplejson
32
$ sudo apt-get install python-paste
33
$ sudo apt-get install python-pastedeploy
34
$ sudo apt-get install python-flup
36
Installing Dependencies Using :command:`easy_install`
37
#####################################################
42
-f http://www.owlfish.com/software/simpleTAL/py2compatible/download.html \
44
$ easy_install simplejson
46
$ easy_install PasteDeploy
50
Running the Standalone Loggerhead Server
51
----------------------------------------
53
After installing all the dependencies, you should be able to run
54
:command:`serve-branches` with the branch you want to serve on the
59
./serve-branches ~/path/to/branch
61
By default, the script listens on port 8080, so head to
62
http://localhost:8080/ in your browser to see the branch.
64
You can also pass a directory that contains branches to the script,
65
and it will serve a very simple directory listing at other pages.
67
You may update the Bazaar branches being viewed at any time.
68
Loggerhead will notice and refresh, and Bazaar uses its own branch
69
locking to prevent corruption.
71
See :doc:`serve-branches` for all command line options.
73
Running Loggerhead as a Daemon
74
------------------------------
76
To run loggerhead as a linux daemon:
78
1) Copy the ``loggerheadd`` scipt to ``/etc/init.d``
82
$ sudo cp ./loggerheadd /etc/init.d
84
2) Edit the file to configure where your loggerhead is installed, and which
85
serve-branches options you would like.
89
$ sudo vim /etc/init.d/loggerheadd
91
3) Register the service
93
a) on upstart based systems like Ubuntu run:
97
$ sudo update-rc.d loggerheadd defaults
99
b) on Sysvinit based systems like Centos or SuSE run:
103
$ sudo chkconfig --add loggerheadd
106
Using Loggerhead as a Bazaar Plugin
107
------------------------------------
109
This branch contains experimental support for using Loggerhead as a Bazaar
110
plugin. To use it, place the top-level Loggerhead directory (the one
111
containing this file) at ``~/.bazaar/plugins/loggerhead``.
117
To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
118
under the branch's section:
125
More configuration options to come soon.
128
Serving Loggerhead from Behind Apache
129
-------------------------------------
131
If you want to view Bazaar branches from your existing Apache
132
installation, you'll need to configure Apache to proxy certain
133
requests to Loggerhead. Adding lines like this to you Apache
134
configuration is one way to do this:
136
.. code-block:: apache
138
<Location "/branches/">
139
ProxyPass http://127.0.0.1:8080/branches/
140
ProxyPassReverse http://127.0.0.1:8080/branches/
143
If Paste Deploy is installed, the :command:`serve-branches` script can be
144
run behind a proxy at the root of a site, but if you're running it at
145
some path into the site, you'll need to specify is using
146
``--prefix=/some_path``.
152
Search is currently supported by using the bzr-search plugin (available
153
at: https://launchpad.net/bzr-search ).
155
You need to have the plugin installed and each branch indexed to allow
156
searching on branches.
171
Loggerhead is loosely based on bazaar-webserve, which was loosely
172
based on hgweb. Discussion should take place on the bazaar-dev
173
mailing list at bazaar@lists.canonical.com. You can join the list at
174
<https://lists.ubuntu.com/mailman/listinfo/bazaar>. You don't need to
175
subscribe to post, but your first post will be held briefly for manual
178
Bugs are tracked on Launchpad; start at:
180
https://bugs.launchpad.net/loggerhead
186
To run loggerhead tests, you will need to install the package ``python-nose``,
187
and run its :command:`nosetests` script in the loggerhead directory:
202
https://launchpad.net/loggerhead