~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remotebranch.py

  • Committer: Robert Collins
  • Date: 2005-09-29 02:01:49 UTC
  • Revision ID: robertc@robertcollins.net-20050929020149-1ff16722c6a01b2c
reenable remotebranch tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from bzrlib.errors import BzrError, BzrCheckError
32
32
from bzrlib.branch import Branch, LocalBranch, BZR_BRANCH_FORMAT_5
33
33
from bzrlib.trace import mutter
 
34
from bzrlib.weavestore import WeaveStore
34
35
from bzrlib.xml5 import serializer_v5
35
36
 
 
37
 
36
38
# velocitynet.com.au transparently proxies connections and thereby
37
39
# breaks keep-alive -- sucks!
38
40
 
119
121
            self.base = _find_remote_root(baseurl)
120
122
        else:
121
123
            self.base = baseurl
122
 
            self._check_format(False)
 
124
        self._check_format(False)
 
125
        # is guaranteed to be a v5 store
123
126
 
124
 
        self.inventory_store = RemoteStore(baseurl + '/.bzr/inventory-store/')
125
 
        self.text_store = RemoteStore(baseurl + '/.bzr/text-store/')
126
 
        self.revision_store = RemoteStore(baseurl + '/.bzr/revision-store/')
 
127
        cfn = self.controlfilename
 
128
        assert self._branch_format == 5
 
129
        self.control_weaves = WeaveStore(cfn([]), get_url)
 
130
        self.weave_store = WeaveStore(cfn('weaves'), get_url)
 
131
        self.revision_store = RemoteStore(cfn('revision-store'))
127
132
 
128
133
    def __str__(self):
129
134
        b = getattr(self, 'baseurl', 'undefined')
189
194
        if '/' in name:
190
195
            raise ValueError('invalid store id', name)
191
196
        return self._baseurl + '/' + name
 
197
 
 
198
    def __contains__(self, fileid):
 
199
        try:
 
200
            self[fileid]
 
201
            return True
 
202
        except KeyError:
 
203
            return False
192
204
        
193
205
    def __getitem__(self, fileid):
194
206
        p = self._path(fileid)