~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Robert Collins
  • Date: 2006-04-05 05:43:06 UTC
  • mto: This revision was merged to the branch mainline in revision 1638.
  • Revision ID: robertc@robertcollins.net-20060405054306-bfe845e73979aadd
Fix calling relpath() and abspath() on transports at their root.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
import sys
34
34
from unittest import TestSuite
35
35
import urllib
 
36
import urlparse
36
37
 
37
38
from bzrlib.trace import mutter, warning
38
39
import bzrlib.errors as errors
119
120
    return result
120
121
 
121
122
 
 
123
def ensure_netloc(protocol):
 
124
    """Ensure that protocol is setup to be used with urlparse netloc parsing."""
 
125
    if protocol not in urlparse.uses_netloc:
 
126
        urlparse.uses_netloc.append(protocol)
 
127
 
 
128
 
122
129
class Transport(object):
123
130
    """This class encapsulates methods for retrieving or putting a file
124
131
    from/to a storage location.