/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
6622.1.34 by Jelmer Vernooij
Rename brzlib => breezy.
1
The Transport API in breezy provides URL based access to network resources.
1530.2.1 by Robert Collins
Start tests for api usage.
2
3
   >>> import os
1711.7.23 by John Arbash Meinel
The api doc tests were using invalid paths on win32, fix them
4
   >>> import sys
6622.1.34 by Jelmer Vernooij
Rename brzlib => breezy.
5
   >>> from breezy.osutils import getcwd, dirname
6
   >>> from breezy.urlutils import local_path_from_url
7
   >>> import breezy.transport as transport
1711.7.23 by John Arbash Meinel
The api doc tests were using invalid paths on win32, fix them
8
   >>> if sys.platform == 'win32':
6083.1.1 by Jelmer Vernooij
Use get_transport_from_{url,path} in more places.
9
   ...     root = transport.get_transport_from_url('file:///C:/')
1711.7.23 by John Arbash Meinel
The api doc tests were using invalid paths on win32, fix them
10
   ... else:
6083.1.1 by Jelmer Vernooij
Use get_transport_from_{url,path} in more places.
11
   ...     root = transport.get_transport_from_url('file:///')
1530.2.1 by Robert Collins
Start tests for api usage.
12
   >>>
13
14
Each Transport instance represents a single logical directory.
15
6083.1.1 by Jelmer Vernooij
Use get_transport_from_{url,path} in more places.
16
   >>> dir = transport.get_transport_from_path(".")
1685.1.32 by John Arbash Meinel
When unable to find an appropriate protocol, we now raise InvalidURL rather than always returning LocalTransport
17
   >>> local_path_from_url(dir.base) == getcwd() + '/'
1530.2.1 by Robert Collins
Start tests for api usage.
18
   True
19
20
You can change directories via the clone method:
21
22
   >>> parent = dir.clone('..')
1685.1.32 by John Arbash Meinel
When unable to find an appropriate protocol, we now raise InvalidURL rather than always returning LocalTransport
23
   >>> local_path_from_url(parent.base) == (dirname(getcwd()).rstrip('/') + '/')
1530.2.1 by Robert Collins
Start tests for api usage.
24
   True