~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2006-03-01 08:40:35 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060301084035-ce00abd11fe4da31
Change weave store to be a versioned store, using WeaveFiles which maintain integrity without needing explicit 'put' operations.

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
   >>> import bzrlib.transport as transport
 
5
   >>> root = transport.get_transport("file:///")
 
6
   >>>
 
7
 
 
8
Each Transport instance represents a single logical directory.
 
9
 
 
10
   >>> dir = transport.get_transport(".")
 
11
   >>> dir.base == os.getcwdu() + '/'
 
12
   True
 
13
 
 
14
You can change directories via the clone method:
 
15
 
 
16
   >>> parent = dir.clone('..')
 
17
   >>> parent.base == os.path.dirname(os.getcwdu()) + '/'
 
18
   True