~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to docs/index.rst

Ignore readonly+ prefix when checking if a branch URL is local.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
loggerhead:  A web viewer for ``bzr`` branches
2
 
==============================================
3
 
 
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``
7
 
for Mercurial.
8
 
 
9
 
Getting Started
10
 
---------------
11
 
 
12
 
Loggerhead depends on:
13
 
 
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
17
 
 
18
 
2) simplejson for producing JSON data.
19
 
   On Ubuntu, ``sudo apt-get install python-simplejson``
20
 
   or use `easy_install simplejson`.
21
 
 
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`
25
 
 
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`
29
 
 
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`
33
 
 
34
 
Then simply run the 'serve-branches' with the branch you want to
35
 
serve on the command line:
36
 
 
37
 
.. code-block:: sh
38
 
 
39
 
    ./serve-branches ~/path/to/branch
40
 
 
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.
45
 
 
46
 
You may update the Bazaar branches being viewed at any time.
47
 
Loggerhead will notice and refresh, and Bazaar uses its own branch
48
 
locking to prevent corruption.
49
 
 
50
 
To run loggerhead as a linux daemon:
51
 
 
52
 
1) Copy loggerheadd to ``/etc/init.d``
53
 
 
54
 
2) Edit the file to configure where your loggerhead is installed, and which
55
 
   serve-branches options you would like.
56
 
 
57
 
3) Register the service
58
 
   ``cd /etc/init.d``
59
 
 
60
 
   a) on upstart based systems like Ubuntu run: 
61
 
      ``update-rc.d loggerheadd defaults``
62
 
 
63
 
   b) on Sysvinit based systems like Centos or SuSE run:
64
 
      ``chkconfig --add loggerheadd``
65
 
 
66
 
 
67
 
Loggerhead as a Bazaar Plugin
68
 
-----------------------------
69
 
 
70
 
This branch contains experimental support for using Loggerhead as a Bazaar
71
 
plugin.  To use it, place the top-level Loggerhead directory (the one
72
 
containing this file) at ``~/.bazaar/plugins/loggerhead``.
73
 
 
74
 
 
75
 
Using a Config File
76
 
-------------------
77
 
 
78
 
To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
79
 
under the branch's section:
80
 
 
81
 
.. code-block:: ini
82
 
 
83
 
    [/path/to/branch]
84
 
    http_serve = False
85
 
 
86
 
 
87
 
More configuration options to come soon.
88
 
 
89
 
 
90
 
Serving Loggerhead from Behind Apache
91
 
-------------------------------------
92
 
 
93
 
If you want to view Bazaar branches from your existing Apache
94
 
installation, you'll need to configure Apache to proxy certain
95
 
requests to Loggerhead.  Adding lines like this to you Apache
96
 
configuration is one way to do this:
97
 
 
98
 
.. code-block:: apache
99
 
 
100
 
    <Location "/branches/">
101
 
        ProxyPass http://127.0.0.1:8080/branches/
102
 
        ProxyPassReverse http://127.0.0.1:8080/branches/
103
 
    </Location>
104
 
 
105
 
If Paste Deploy is installed, the :command:`serve-branches` script can be
106
 
run behind a proxy at the root of a site, but if you're running it at
107
 
some path into the site, you'll need to specify is using
108
 
``--prefix=/some_path``.
109
 
 
110
 
 
111
 
Search
112
 
------
113
 
 
114
 
Search is currently supported by using the bzr-search plugin (available
115
 
at: ``https://launchpad.net/bzr-search``
116
 
You need to have the plugin installed and each branch indexed to allow
117
 
searching on branches.
118
 
 
119
 
 
120
 
Support
121
 
-------
122
 
 
123
 
Loggerhead is loosely based on bazaar-webserve, which was loosely
124
 
based on hgweb.  Discussion should take place on the bazaar-dev
125
 
mailing list at bazaar@lists.canonical.com.  You can join the list at
126
 
<https://lists.ubuntu.com/mailman/listinfo/bazaar>.  You don't need to
127
 
subscribe to post, but your first post will be held briefly for manual
128
 
moderation.
129
 
 
130
 
Bugs are tracked on Launchpad; start at:
131
 
 
132
 
    https://bugs.launchpad.net/loggerhead
133
 
 
134
 
 
135
 
Hacking
136
 
-------
137
 
 
138
 
To run loggerhead tests, you will need the package python-nose,
139
 
and run in the loggerhead directory:
140
 
 
141
 
.. code-block:: sh
142
 
 
143
 
    nosetests
144
 
 
145
 
License
146
 
-------
147
 
 
148
 
GNU GPLv2 or later.
149
 
 
150
 
See Also
151
 
--------
152
 
 
153
 
https://launchpad.net/loggerhead
154
 
 
155
 
Contents:
156
 
 
157
 
.. toctree::
158
 
   :maxdepth: 2
159
 
 
160
 
   serve-branches
161
 
   start-loggerhead
162
 
   stop-loggerhead
163
 
 
164
 
Indices and tables
165
 
==================
166
 
 
167
 
* :ref:`genindex`
168
 
* :ref:`modindex`
169
 
* :ref:`search`
170