~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to serve-branches

  • Committer: Michael Hudson
  • Date: 2009-06-25 03:35:43 UTC
  • mto: This revision was merged to the branch mainline in revision 374.
  • Revision ID: michael.hudson@canonical.com-20090625033543-ejchib6ormwvemyn
don't show tags column if there are no tags to show

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
 
2
#
 
3
# Copyright (C) 2008, 2009 Canonical Ltd
 
4
#
2
5
# This program is free software; you can redistribute it and/or modify
3
6
# it under the terms of the GNU General Public License as published by
4
7
# the Free Software Foundation; either version 2 of the License, or
51
54
 
52
55
    load_plugins()
53
56
 
54
 
    transport = get_transport(path)
 
57
    if config.get_option('allow_writes'):
 
58
        transport = get_transport(path)
 
59
    else:
 
60
        transport = get_transport('readonly+' + path)
55
61
 
56
62
    if config.get_option('trunk_dir') and not config.get_option('user_dirs'):
57
63
        print "--trunk-dir is only valid with --user-dirs"
89
95
 
90
96
    # setup_logging() #end
91
97
 
92
 
    app = TransLogger(app, logger=logger)
93
98
    if config.get_option('profile'):
94
99
        from loggerhead.middleware.profile import LSProfMiddleware
95
100
        app = LSProfMiddleware(app)
124
129
 
125
130
    app = HTTPExceptionHandler(app)
126
131
    app = ErrorHandlerApp(app)
 
132
    app = TransLogger(app, logger=logger)
127
133
 
128
134
    if not config.get_option('user_port'):
129
135
        port = '8080'