~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/apps/branch.py

  • Committer: Matt Nordhoff
  • Date: 2010-03-25 16:19:24 UTC
  • mto: This revision was merged to the branch mainline in revision 403.
  • Revision ID: mnordhoff@mattnordhoff.com-20100325161924-5902h16dqio7ojj6
Ignore readonly+ prefix when checking if Loggerhead is serving a local location.

Reported by Tres Seaver.

This broke the "To get this branch" bit, unless you had public_branch set or used --allow-writes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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: