b.u.URL(object) : class documentation

Part of bzrlib.urlutils View In Hierarchy

Parsed URL.
Method __init__ Undocumented
Method __eq__ Undocumented
Method __repr__ Undocumented
Class Method from_string Create a URL object from a string.
Method __str__ Undocumented
Method clone Return a new URL for a path relative to this URL.
Static Method _combine_paths Transform a Transport-relative path to a remote absolute path.
def __init__(self, scheme, quoted_user, quoted_password, quoted_host, port, quoted_path):
Undocumented
def __eq__(self, other):
Undocumented
def __repr__(self):
Undocumented
@classmethod
def from_string(cls, url):
Create a URL object from a string.
ParametersurlURL as bytestring
def __str__(self):
Undocumented
@staticmethod
def _combine_paths(base_path, relpath):

Transform a Transport-relative path to a remote absolute path.

This does not handle substitution of ~ but does handle '..' and '.' components.

Examples:

t._combine_paths('/home/sarah', 'project/foo')
    => '/home/sarah/project/foo'
t._combine_paths('/home/sarah', '../../etc')
    => '/etc'
t._combine_paths('/home/sarah', '/etc')
    => '/etc'
Parametersbase_pathbase path
relpathrelative url string for relative part of remote path.
Returnsurlencoded string for final path.
def clone(self, offset=None):
Return a new URL for a path relative to this URL.
ParametersoffsetA relative path, already urlencoded
ReturnsURL instance
API Documentation for Bazaar, generated by pydoctor at 2019-07-17 00:29:20.