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``. E.g.:
115
$ bzr branch lp:loggerhead ~/.bazaar/plugins/loggerhead
123
To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
124
under the branch's section:
131
More configuration options to come soon.
134
Serving Loggerhead from Behind Apache
135
-------------------------------------
137
If you want to view Bazaar branches from your existing Apache
138
installation, you'll need to configure Apache to proxy certain
139
requests to Loggerhead. Adding lines like this to you Apache
140
configuration is one way to do this:
142
.. code-block:: apache
144
<Location "/branches/">
145
ProxyPass http://127.0.0.1:8080/branches/
146
ProxyPassReverse http://127.0.0.1:8080/branches/
149
If Paste Deploy is installed, the :command:`serve-branches` script can be
150
run behind a proxy at the root of a site, but if you're running it at
151
some path into the site, you'll need to specify is using
152
``--prefix=/some_path``.
158
Search is currently supported by using the bzr-search plugin (available
159
at: https://launchpad.net/bzr-search ).
161
You need to have the plugin installed and each branch indexed to allow
162
searching on branches.
178
Loggerhead is loosely based on `bazaar-webserve
179
<https://launchpad.net/bzr-webserve>`_, which was, in turn, loosely
180
based on `hgweb <http://mercurial.selenic.com/wiki/HgWebDirStepByStep>`_.
182
Discussion should take place on the bazaar-dev mailing list at
183
mailto:bazaar@lists.canonical.com. You can join the list at
184
<https://lists.ubuntu.com/mailman/listinfo/bazaar>. You don't need to
185
subscribe to post, but your first post will be held briefly for manual
188
Bugs are tracked on Launchpad; start at:
190
https://bugs.launchpad.net/loggerhead
196
To run loggerhead tests, you will need to install the package ``python-nose``,
197
and run its :command:`nosetests` script in the loggerhead directory:
212
https://launchpad.net/loggerhead