/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-11 07:04:22 UTC
  • mfrom: (1626.1.3 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060411070422-9167eccbd3e561a2
(mbp) better help message for bzr format

Show diffs side-by-side

added added

removed removed

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