~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/doc/api/transport.txt

'bzr selftest' now shows a progress bar with the number of tests, and 
progress made. 'make check' shows tests in -v mode, to be more useful
for the PQM status window. (Robert Collins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
   >>> import os
4
4
   >>> from bzrlib.osutils import getcwd, dirname
5
 
   >>> from bzrlib.urlutils import local_path_from_url
6
5
   >>> import bzrlib.transport as transport
7
6
   >>> root = transport.get_transport("file:///")
8
7
   >>>
10
9
Each Transport instance represents a single logical directory.
11
10
 
12
11
   >>> dir = transport.get_transport(".")
13
 
   >>> local_path_from_url(dir.base) == getcwd() + '/'
 
12
   >>> dir.base == getcwd() + '/'
14
13
   True
15
14
 
16
15
You can change directories via the clone method:
17
16
 
18
17
   >>> parent = dir.clone('..')
19
 
   >>> local_path_from_url(parent.base) == (dirname(getcwd()).rstrip('/') + '/')
 
18
   >>> parent.base == (dirname(getcwd()).rstrip('/') + '/')
20
19
   True