~loggerhead-team/loggerhead/trunk-rich

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
:command:`serve-branches`
=========================

The :command:`serve-branches` script runs a standalone Loggerhead server in
the foreground.

.. program:: serve-branches

Usage
-----

.. code-block:: sh

   serve-branches [OPTIONS] <target directory>

Options
-------

.. cmdoption:: --user-dirs

    Serve user directories as ``~user`` (requires ``--trunk-dir``).

    If both options are set, then for requests where the CGI ``PATH_INFO``
    starts with "/~<name>", serve branches under the <name> directory.

.. cmdoption:: --trunk-dir=DIR

    The directory that contains the trunk branches (requires ``--user-dirs``).

    If both options are set, then for requests where the CGI ``PATH_INFO``
    does not start with "/~<name>", serve branches under DIR.

.. cmdoption:: --port

    Listen on the given port.
    
    Defaults to 8080.

.. cmdoption:: --host

    Listen on the interface corresponding to the given IP. 
    
    Defaults to listening on all interfaces, i.e., "0.0.0.0".

.. cmdoption:: --protocol

    Serve the application using the specified protocol.
    
    Can be one of: "http", "scgi", "fcgi", "ajp" (defaults to "http").

.. cmdoption:: --prefix

    Set the supplied value as the CGI ``SCRIPT_NAME`` for the application.

    This option is intended for use when serving Loggerhead behind a
    reverse proxy, with Loggerhead being "mounted" at a directory below
    the root.  E.g., if the reverse proxy translates requests for
    ``http://example.com/loggerhead`` onto the standalone Loggerhead process,
    that process should be run with ``--prefix=/loggerhead``.

.. cmdoption:: --log-folder=LOG_FOLDER

    The directory in which to place Loggerhead's log files.
    
    Defaults to the current directory.

.. cmdoption:: --cache-dir=SQL_CACHE_DIR

    The directory in which to place the SQL cache.

    Defaults to the current directory.

.. cmdoption:: --use-cdn
   
    Serve YUI javascript libraries from Yahoo!'s CDN.

.. cmdoption:: --allow-writes
   
    Allow writing to the Bazaar server.
    
    Setting this option keeps Loggerhead from adding a 'readonly+' prefix
    to the base URL of is to make visible the display of instructions for
    checking out the 'public_branch' URL for the branch being browsed.

.. cmdoption:: -h, --help

    Print the help message and exit

.. cmdoption:: --version

    Print the software version and exit.

Debugging Options
-----------------

The following options are only useful when developing / debugging Loggerhead
itself.

.. cmdoption:: --profile
   
    Generate per-request callgrind profile data.
    
    Data for each request is written to a file ``%d-stats.callgrind``,
    where ``%d`` is replaced by the sequence number of the request.

.. cmdoption:: --memory-profile

    Profile the memory usage using the `Dozer
    <http://pypi.python.org/pypi/Dozer>`_ middleware.

.. cmdoption:: --reload

    Restart the application when any of its python file change.
    
    This option should only used for development purposes.