~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to README

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
LOGGERHEAD
2
2
==========
3
3
 
4
 
[ version 1.1.1 for bazaar 0.13 ]
5
 
 
6
 
Loggerhead is a web viewer for bazaar branches.  It can be used to navigate
7
 
a branch history, annotate files, perform searches... all the usual things.
8
 
 
9
 
This is a TurboGears (http://www.turbogears.org) project.  It can be
10
 
started by running::
11
 
 
12
 
    $ ./start-loggerhead.py
13
 
    
14
 
This will run loggerhead in the background.  To stop it, run::
15
 
 
16
 
    $ ./stop-loggerhead.py
17
 
 
18
 
If you're not familiar with TurboGears, the simplest way to get running is
19
 
to add the following lines to your apache configuration::
 
4
[ Version 1.17 for Bazaar 1.17 ]
 
5
 
 
6
Loggerhead is a web viewer for Bazaar branches.  It can be used to
 
7
navigate a branch history, annotate files, perform searches... all the
 
8
usual things.
 
9
 
 
10
 
 
11
GETTING STARTED
 
12
---------------
 
13
 
 
14
Loggerhead depends on:
 
15
 
 
16
1) SimpleTAL for templating.
 
17
   On Ubuntu, `sudo apt-get install python-simpletal`
 
18
   or download from http://www.owlfish.com/software/simpleTAL/download.html
 
19
2) simplejson for producing JSON data.
 
20
   On Ubuntu, `sudo apt-get install python-simplejson`
 
21
   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`
 
25
4) Paste Deploy  (optional, needed when proxying through Apache)
 
26
   On Ubuntu, `sudo apt-get install python-pastedeploy`
 
27
   or use `easy_install PasteDeploy`
 
28
5) flup (optional, needed to use FastCGI, SCGI or AJP)
 
29
   On Ubuntu, `sudo apt-get install python-flup`
 
30
   or use `easy_install flup`
 
31
 
 
32
Then simply run the 'serve-branches' with the branch you want to
 
33
serve on the command line:
 
34
 
 
35
    ./serve-branches ~/path/to/branch
 
36
 
 
37
The script listens on port 8080 so head to http://localhost:8080/ in
 
38
your browser to see the branch.  You can also pass a directory that
 
39
contains branches to the script, and it will serve a very simple
 
40
directory listing at other pages.
 
41
 
 
42
You may update the Bazaar branches being viewed at any time.
 
43
Loggerhead will notice and refresh, and Bazaar uses its own branch
 
44
locking to prevent corruption.
 
45
 
 
46
To run loggerhead as a linux daemon:
 
47
1) Copy loggerheadd to /etc/init.d
 
48
2) Edit the file to configure where your loggerhead is installed, and which
 
49
   serve-branches options you would like.
 
50
3) Register the service
 
51
   cd /etc/init.d
 
52
   a) on upstart based systems like Ubuntu run: 
 
53
      update-rc.d loggerheadd defaults
 
54
   b) on Sysvinit based systems like Centos or SuSE run:
 
55
      chkconfig --add loggerheadd
 
56
 
 
57
 
 
58
LOGGERHEAD AS A BAZAAR PLUGIN
 
59
-----------------------------
 
60
 
 
61
This branch contains experimental support for using Loggerhead as a Bazaar
 
62
plugin.  To use it, place the top-level Loggerhead directory (the one
 
63
containing this file) at ``~/.bazaar/plugins/loggerhead``.
 
64
 
 
65
 
 
66
USING A CONFIG FILE
 
67
-------------------
 
68
 
 
69
To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
 
70
under the branch's section:
 
71
 
 
72
    [/path/to/branch]
 
73
    http_serve = False
 
74
 
 
75
 
 
76
More configuration options to come soon.
 
77
 
 
78
 
 
79
SERVING LOGGERHEAD FROM BEHIND APACHE
 
80
-------------------------------------
 
81
 
 
82
If you want to view Bazaar branches from your existing Apache
 
83
installation, you'll need to configure Apache to proxy certain
 
84
requests to Loggerhead.  Adding lines like this to you Apache
 
85
configuration is one way to do this::
20
86
 
21
87
    <Location "/branches/">
22
 
        ProxyPass http://127.0.0.1:8080/
23
 
        ProxyPassReverse http://127.0.0.1:8080/
 
88
        ProxyPass http://127.0.0.1:8080/branches/
 
89
        ProxyPassReverse http://127.0.0.1:8080/branches/
24
90
    </Location>
25
 
    
26
 
The config file is "loggerhead.conf".  In there, you can configure projects,
27
 
and branches per project.  The idea is that you could be publishing several
28
 
(possibly unrelated) projects through the same loggerhead instance, and 
29
 
several branches for the same project.
30
 
 
31
 
Don't bother with "dev.cfg" or any of the other TurboGears config files.
32
 
Loggerhead overrides those values with its own.
33
 
 
34
 
A debug and access log are stored in the logs/ folder.
35
 
 
36
 
 
37
 
CACHES
 
91
 
 
92
If Paste Deploy is installed, the 'serve-branches' script can be
 
93
run behind a proxy at the root of a site, but if you're running it at
 
94
some path into the site, you'll need to specify is using '--prefix=/some_path'.
 
95
 
 
96
 
 
97
SEARCH
38
98
------
39
99
 
40
 
To speed up most operations, loggerhead will start creating two caches per
41
 
branch when it first launches:
42
 
 
43
 
    - a revision data cache
44
 
    - a text searching cache
45
 
 
46
 
You can put the cache folder anywhere, but I find that a folder under
47
 
the branch's .bzr/ folder is the simplest place.
48
 
 
49
 
The caches for a branch with 10,000 revisions take about 15 minutes each
50
 
on my machine, but YMMV.  Once they are built, they update every six hours
51
 
or so but usually finish quickly (or instantly) after the initial creation.
52
 
Until the revision cache is built, all operations will be slow.
53
 
 
54
 
You may update the bazaar branch at any time (for example, from a cron).
55
 
Loggerhead will notice and refresh, and bazaar uses its own branch locking
56
 
to prevent corruption.
 
100
Search is currently supported by using the bzr-search plugin (available
 
101
at: ``https://launchpad.net/bzr-search``
 
102
You need to have the plugin installed and each branch indexed to allow
 
103
searching on branches.
57
104
 
58
105
 
59
106
SUPPORT
60
107
-------
61
108
 
62
 
This is loosely based on bazaar-webserve, which was loosely based on hgweb.
63
 
Discussion should take place on the bazaar-dev mailing list.
64
 
 
 
109
Loggerhead is loosely based on bazaar-webserve, which was loosely
 
110
based on hgweb.  Discussion should take place on the bazaar-dev
 
111
mailing list at bazaar@lists.canonical.com.  You can join the list at
 
112
<https://lists.ubuntu.com/mailman/listinfo/bazaar>.  You don't need to
 
113
subscribe to post, but your first post will be held briefly for manual
 
114
moderation.
 
115
 
 
116
Bugs are tracked on Launchpad; start at:
 
117
 
 
118
    https://bugs.launchpad.net/loggerhead
 
119
 
 
120
 
 
121
HACKING
 
122
-------
 
123
 
 
124
To run loggerhead tests, you will need the package python-nose,
 
125
and run in the loggerhead directory:
 
126
 
 
127
    nosetests