~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remotebranch.py

  • Committer: John Arbash Meinel
  • Date: 2005-09-16 14:57:59 UTC
  • mto: (1393.2.1)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: john@arbash-meinel.com-20050916145758-ad06c9ae86840f17
Merged up-to-date against mainline, still broken.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
import urlparse
30
30
 
31
31
from bzrlib.errors import BzrError, BzrCheckError
32
 
from bzrlib.branch import Branch, BZR_BRANCH_FORMAT
 
32
from bzrlib.branch import Branch, LocalBranch, BZR_BRANCH_FORMAT
33
33
from bzrlib.trace import mutter
34
34
from bzrlib.xml import serializer_v4
35
35
 
110
110
        
111
111
 
112
112
 
113
 
class RemoteBranch(Branch):
 
113
class RemoteBranch(LocalBranch):
114
114
    def __init__(self, baseurl, find_root=True):
115
115
        """Create new proxy for a remote branch."""
116
116
        if find_root:
129
129
 
130
130
    __repr__ = __str__
131
131
 
 
132
    def setup_caching(self, cache_root):
 
133
        """Set up cached stores located under cache_root"""
 
134
        from bzrlib.meta_store import CachedStore
 
135
        for store_name in ('inventory_store', 'text_store', 'revision_store'):
 
136
            if not isinstance(getattr(self, store_name), CachedStore):
 
137
                cache_path = os.path.join(cache_root, store_name)
 
138
                os.mkdir(cache_path)
 
139
                new_store = CachedStore(getattr(self, store_name), cache_path)
 
140
                setattr(self, store_name, new_store)
 
141
 
132
142
    def controlfile(self, filename, mode):
133
143
        if mode not in ('rb', 'rt', 'r'):
134
144
            raise BzrError("file mode %r not supported for remote branches" % mode)