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
Loggerhead is heavily based on `bazaar-webserve
7
<https://launchpad.net/bzr-webserve>`_, which was, in turn, loosely
8
based on `hgweb <http://mercurial.selenic.com/wiki/HgWebDirStepByStep>`_.
14
Loggerhead depends on the following Python libraries.:
16
- SimpleTAL for templating.
18
- simplejson for producing JSON data.
20
- Paste for the server. (You need version 1.2 or newer of Paste).
22
- Paste Deploy (optional, needed when proxying through Apache).
24
- flup (optional, needed to use FastCGI, SCGI or AJP).
27
Installing Dependencies Using Ubuntu Packages
28
#############################################
32
$ sudo apt-get install python-simpletal
33
$ sudo apt-get install python-simplejson
34
$ sudo apt-get install python-paste
35
$ sudo apt-get install python-pastedeploy
36
$ sudo apt-get install python-flup
38
Installing Dependencies Using :command:`easy_install`
39
#####################################################
44
-f http://www.owlfish.com/software/simpleTAL/py2compatible/download.html \
46
$ easy_install simplejson
48
$ easy_install PasteDeploy
52
Running the Standalone Loggerhead Server
53
----------------------------------------
55
After installing all the dependencies, you should be able to run
56
:command:`serve-branches` with the branch you want to serve on the
61
./serve-branches ~/path/to/branch
63
By default, the script listens on port 8080, so head to
64
http://localhost:8080/ in your browser to see the branch.
66
You can also pass a directory that contains branches to the script,
67
and it will serve a very simple directory listing at other pages.
69
You may update the Bazaar branches being viewed at any time.
70
Loggerhead will notice and refresh, and Bazaar uses its own branch
71
locking to prevent corruption.
73
See :doc:`serve-branches` for all command line options.
75
Running Loggerhead as a Daemon
76
------------------------------
78
To run Loggerhead as a linux daemon:
80
1) Copy the ``loggerheadd`` scipt to ``/etc/init.d``
84
$ sudo cp ./loggerheadd /etc/init.d
86
2) Edit the file to configure where your Loggerhead is installed, and which
87
serve-branches options you would like.
91
$ sudo vim /etc/init.d/loggerheadd
93
3) Register the service
97
# on upstart based systems like Ubuntu run:
98
$ sudo update-rc.d loggerheadd defaults
100
# on Sysvinit based systems like Centos or SuSE run:
101
$ sudo chkconfig --add loggerheadd
104
Using Loggerhead as a Bazaar Plugin
105
------------------------------------
107
This branch contains experimental support for using Loggerhead as a Bazaar
108
plugin. To use it, place the top-level Loggerhead directory (the one
109
containing COPYING.txt) at ``~/.bazaar/plugins/loggerhead``. E.g.:
113
$ bzr branch lp:loggerhead ~/.bazaar/plugins/loggerhead
121
To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
122
under the branch's section:
129
More configuration options to come soon.
132
Serving Loggerhead behind Apache
133
--------------------------------
135
If you want to view Bazaar branches from your existing Apache
136
installation, you'll need to configure Apache to proxy certain
137
requests to Loggerhead. Adding lines like this to your Apache
138
configuration is one way to do this:
140
.. code-block:: apache
142
<Location "/branches/">
143
ProxyPass http://127.0.0.1:8080/branches/
144
ProxyPassReverse http://127.0.0.1:8080/branches/
147
If Paste Deploy is installed, the :command:`serve-branches` script can be
148
run behind a proxy at the root of a site, but if you're running it at
149
some path into the site, you'll need to specify it using
150
``--prefix=/some_path``.
156
Search is currently supported by using the bzr-search plugin (available
157
at: https://launchpad.net/bzr-search ).
159
You need to have the plugin installed and each branch indexed to allow
160
searching on branches.
162
Command-Line Reference
163
----------------------
176
Discussion should take place on the bazaar-dev mailing list at
177
mailto:bazaar@lists.canonical.com. You can join the list at
178
<https://lists.ubuntu.com/mailman/listinfo/bazaar>. You don't need to
179
subscribe to post, but your first post will be held briefly for manual
182
Bugs, support questions and merge proposals are tracked on Launchpad, e.g:
184
https://bugs.launchpad.net/loggerhead
190
To run Loggerhead tests, you will need to install the package ``python-nose``,
191
and run its :command:`nosetests` script in the Loggerhead directory:
206
https://launchpad.net/loggerhead