Loggerhead is a web viewer for projects in Bazaar. It can be used to navigate a branch history, annotate files, view patches, perform searches, etc. Loggerhead is heavily based on bazaar-webserve, which was, in turn, loosely based on hgweb.
Loggerhead depends on the following Python libraries.:
$ sudo apt-get install python-simpletal
$ sudo apt-get install python-simplejson
$ sudo apt-get install python-paste
$ sudo apt-get install python-pastedeploy
$ sudo apt-get install python-flup
$ easy_install \
-f http://www.owlfish.com/software/simpleTAL/py2compatible/download.html \
SimpleTAL
$ easy_install simplejson
$ easy_install Paste
$ easy_install PasteDeploy
$ easy_install flup
After installing all the dependencies, you should be able to run serve-branches with the branch you want to serve on the command line:
./serve-branches ~/path/to/branch
By default, the script listens on port 8080, so head to http://localhost:8080/ in your browser to see the branch.
You can also pass a directory that contains branches to the script, and it will serve a very simple directory listing at other pages.
You may update the Bazaar branches being viewed at any time. Loggerhead will notice and refresh, and Bazaar uses its own branch locking to prevent corruption.
See serve-branches for all command line options.
To run Loggerhead as a linux daemon:
$ sudo cp ./loggerheadd /etc/init.d
$ sudo vim /etc/init.d/loggerheadd
# on upstart based systems like Ubuntu run:
$ sudo update-rc.d loggerheadd defaults
# on Sysvinit based systems like Centos or SuSE run:
$ sudo chkconfig --add loggerheadd
This branch contains experimental support for using Loggerhead as a Bazaar plugin. To use it, place the top-level Loggerhead directory (the one containing COPYING.txt) at ~/.bazaar/plugins/loggerhead. E.g.:
$ bzr branch lp:loggerhead ~/.bazaar/plugins/loggerhead
$ cd ~/myproject
$ bzr serve --http
To hide branches from being displayed, add to ~/.bazaar/locations.conf, under the branch’s section:
[/path/to/branch]
http_serve = False
More configuration options to come soon.
If you want to view Bazaar branches from your existing Apache installation, you’ll need to configure Apache to proxy certain requests to Loggerhead. Adding lines like this to your Apache configuration is one way to do this:
<Location "/branches/">
ProxyPass http://127.0.0.1:8080/branches/
ProxyPassReverse http://127.0.0.1:8080/branches/
</Location>
If Paste Deploy is installed, the serve-branches script can be run behind a proxy at the root of a site, but if you’re running it at some path into the site, you’ll need to specify it using --prefix=/some_path.
Search is currently supported by using the bzr-search plugin (available at: https://launchpad.net/bzr-search ).
You need to have the plugin installed and each branch indexed to allow searching on branches.
Discussion should take place on the bazaar-dev mailing list at mailto:bazaar@lists.canonical.com. You can join the list at <https://lists.ubuntu.com/mailman/listinfo/bazaar>. You don’t need to subscribe to post, but your first post will be held briefly for manual moderation.
Bugs, support questions and merge proposals are tracked on Launchpad, e.g:
To run Loggerhead tests, you will need to install the package python-nose, and run its nosetests script in the Loggerhead directory:
nosetests
GNU GPLv2 or later.