1
Loggerhead: A web viewer for ``bzr`` branches
1
loggerhead: A web viewer for ``bzr`` branches
2
2
==============================================
4
Loggerhead is a web viewer for projects in Bazaar. It can be used to navigate
4
Loggerhead is a web viewer for projects in bazaar. It can be used to navigate
5
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>`_.
6
It is heavily based on ``bazaar-webserve``, which is itself based on ``hgweb``
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
12
Loggerhead depends on:
14
1) SimpleTAL for templating.
15
On Ubuntu, ``sudo apt-get install python-simpletal``
16
or download from http://www.owlfish.com/software/simpleTAL/download.html
18
2) simplejson for producing JSON data.
19
On Ubuntu, ``sudo apt-get install python-simplejson``
20
or use `easy_install simplejson`.
22
3) Paste for the server. (You need version 1.2 or newer of Paste.)
23
On Ubuntu, ``sudo apt-get install python-paste``
24
or use `easy_install Paste`
26
4) Paste Deploy (optional, needed when proxying through Apache)
27
On Ubuntu, ``sudo apt-get install python-pastedeploy``
28
or use `easy_install PasteDeploy`
30
5) flup (optional, needed to use FastCGI, SCGI or AJP)
31
On Ubuntu, ``sudo apt-get install python-flup``
32
or use `easy_install flup`
34
Then simply run the 'serve-branches' with the branch you want to
35
serve on the command line:
61
39
./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.
41
The script listens on port 8080 so head to http://localhost:8080/ in
42
your browser to see the branch. You can also pass a directory that
43
contains branches to the script, and it will serve a very simple
44
directory listing at other pages.
69
46
You may update the Bazaar branches being viewed at any time.
70
47
Loggerhead will notice and refresh, and Bazaar uses its own branch
71
48
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
50
To run loggerhead as a linux daemon:
52
1) Copy loggerheadd to ``/etc/init.d``
54
2) Edit the file to configure where your loggerhead is installed, and which
87
55
serve-branches options you would like.
91
$ sudo vim /etc/init.d/loggerheadd
93
57
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
------------------------------------
60
a) on upstart based systems like Ubuntu run:
61
``update-rc.d loggerheadd defaults``
63
b) on Sysvinit based systems like Centos or SuSE run:
64
``chkconfig --add loggerheadd``
67
Loggerhead as a Bazaar Plugin
68
-----------------------------
107
70
This branch contains experimental support for using Loggerhead as a Bazaar
108
71
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
72
containing this file) at ``~/.bazaar/plugins/loggerhead``.
118
75
Using a Config File