/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/remotebranch.py

remove more duplicate merged hunks. Bad MERGE3, BAD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env python
 
2
 
1
3
# Copyright (C) 2005 Canonical Ltd
2
4
 
3
5
# This program is free software; you can redistribute it and/or modify
29
31
import urlparse
30
32
 
31
33
from bzrlib.errors import BzrError, BzrCheckError
32
 
from bzrlib.branch import Branch, LocalBranch, BZR_BRANCH_FORMAT
 
34
from bzrlib.branch import Branch, BZR_BRANCH_FORMAT
33
35
from bzrlib.trace import mutter
34
36
from bzrlib.xml import serializer_v4
35
37
 
110
112
        
111
113
 
112
114
 
113
 
class RemoteBranch(LocalBranch):
 
115
class RemoteBranch(Branch):
114
116
    def __init__(self, baseurl, find_root=True):
115
117
        """Create new proxy for a remote branch."""
116
118
        if find_root:
129
131
 
130
132
    __repr__ = __str__
131
133
 
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
 
 
142
134
    def controlfile(self, filename, mode):
143
135
        if mode not in ('rb', 'rt', 'r'):
144
136
            raise BzrError("file mode %r not supported for remote branches" % mode)
192
184
        p = self._path(fileid)
193
185
        try:
194
186
            return get_url(p, compressed=True)
195
 
        except urllib2.URLError:
 
187
        except:
196
188
            raise KeyError(fileid)
197
189
    
198
190