~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/wsgi.py

  • Committer: John Arbash Meinel
  • Date: 2008-07-11 21:41:24 UTC
  • mto: This revision was merged to the branch mainline in revision 3543.
  • Revision ID: john@arbash-meinel.com-20080711214124-qi09irlj7pd5cuzg
Shortcut the case when one revision is in the ancestry of the other.

At the cost of a heads() check, when one parent supersedes, we don't have to extract
the text for the other. Changes merge time from 3m37s => 3m21s. Using a
CachingParentsProvider would drop the time down to 3m11s.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.urlutils import local_path_to_url
28
28
    
29
29
 
30
 
def make_app(root, prefix, path_var='REQUEST_URI', readonly=True,
31
 
    load_plugins=True, enable_logging=True):
 
30
def make_app(root, prefix, path_var='REQUEST_URI', readonly=True):
32
31
    """Convenience function to construct a WSGI bzr smart server.
33
32
    
34
33
    :param root: a local path that requests will be relative to.
40
39
        base_transport = get_transport('readonly+' + local_url)
41
40
    else:
42
41
        base_transport = get_transport(local_url)
43
 
    if load_plugins:
44
 
        from bzrlib.plugin import load_plugins
45
 
        load_plugins()
46
 
    if enable_logging:
47
 
        import bzrlib.trace
48
 
        bzrlib.trace.enable_default_logging()
49
42
    app = SmartWSGIApp(base_transport, prefix)
50
43
    app = RelpathSetter(app, '', path_var)
51
44
    return app