~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: John Arbash Meinel
  • Date: 2005-09-29 21:13:03 UTC
  • mto: (1393.1.12)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: john@arbash-meinel.com-20050929211303-7f1f9bf969d65dc3
All tests pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
from bzrlib.store.compressed_text import CompressedTextStore
41
41
from bzrlib.store.text import TextStore
42
42
from bzrlib.store.weave import WeaveStore
43
 
from bzrlib.transport import Transport
 
43
from bzrlib.transport import Transport, get_transport
44
44
import bzrlib.xml5
45
45
import bzrlib.ui
46
46
 
131
131
    @staticmethod
132
132
    def open(base):
133
133
        """Open an existing branch, rooted at 'base' (url)"""
134
 
        t = bzrlib.transport.transport(base)
 
134
        t = get_transport(base)
135
135
        return _Branch(t)
136
136
 
137
137
    @staticmethod
140
140
        
141
141
        This probes for a branch at url, and searches upwards from there.
142
142
        """
143
 
        t = bzrlib.transport.transport(url)
 
143
        t = get_transport(url)
144
144
        t = find_branch_root(t)
145
145
        return _Branch(t)
146
146
 
147
147
    @staticmethod
148
148
    def initialize(base):
149
149
        """Create a new branch, rooted at 'base' (url)"""
150
 
        t = bzrlib.transport.transport(base)
 
150
        t = get_transport(base)
151
151
        return _Branch(t, init=True)
152
152
 
153
153
    def setup_caching(self, cache_root):
1286
1286
        if base is None:
1287
1287
            base = mkdtemp()
1288
1288
            init = True
 
1289
        if isinstance(base, basestring):
 
1290
            base = get_transport(base)
1289
1291
        _Branch.__init__(self, base, init=init)
1290
1292
        for d in dirs:
1291
1293
            self._transport.mkdir(d)