~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/apps/branch.py

[rs=igc] update to lp:loggerhead trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009 Canonical Ltd.
 
1
# Copyright (C) 2008, 2009, 2010 Canonical Ltd.
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
21
21
import sys
22
22
 
23
23
import bzrlib.branch
 
24
import bzrlib.errors
24
25
import bzrlib.lru_cache
25
26
 
26
27
from paste import request
145
146
            else:
146
147
                # Loggerhead only supports serving .bzr/ on local branches, so
147
148
                # we shouldn't suggest something that won't work.
148
 
                if self.branch.base.startswith('file://'):
 
149
                try:
 
150
                    util.local_path_from_url(self.branch.base)
149
151
                    self.served_url = self.url([])
150
 
                else:
 
152
                except bzrlib.errors.InvalidURL:
151
153
                    self.served_url = None
152
154
        path = request.path_info_pop(environ)
153
155
        if not path: