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

Add docstring.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
from bzrlib.plugins.git.branch import (
42
42
    GitBranch,
 
43
    extract_tags,
43
44
    )
44
45
from bzrlib.plugins.git.errors import (
45
46
    GitSmartRemoteNotSupported,
54
55
from bzrlib.plugins.git.repository import (
55
56
    GitRepository,
56
57
    )
57
 
from bzrlib.plugins.git.refs import (
58
 
    extract_tags,
59
 
    branch_name_to_ref,
60
 
    )
61
58
 
62
59
import dulwich as git
63
60
from dulwich.errors import (
65
62
    )
66
63
from dulwich.pack import (
67
64
    Pack,
68
 
    ThinPackData,
 
65
    PackData,
69
66
    )
70
67
import os
71
68
import tempfile
164
161
            ret = self._client
165
162
            self._client = None
166
163
            return ret
167
 
        return git.client.TCPGitClient(self._host, self._port,
168
 
            thin_packs=thin_packs, report_activity=self._report_activity)
 
164
        return git.client.TCPGitClient(self._host, self._port, thin_packs=thin_packs,
 
165
            report_activity=self._report_activity)
169
166
 
170
167
 
171
168
class SSHGitSmartTransport(GitSmartTransport):
195
192
        self._lockfiles = lockfiles
196
193
        self._mode_check_done = None
197
194
 
198
 
    def _branch_name_to_ref(self, name):
199
 
        return branch_name_to_ref(name, default="HEAD")
200
 
 
201
195
    def open_repository(self):
202
196
        return RemoteGitRepository(self, self._lockfiles)
203
197
 
204
 
    def _open_branch(self, name=None, ignore_fallbacks=False, 
 
198
    def open_branch(self, name=None, ignore_fallbacks=False, 
205
199
                    unsupported=False):
206
200
        repo = self.open_repository()
207
201
        refname = self._branch_name_to_ref(name)
226
220
    @property
227
221
    def data(self):
228
222
        if self._data is None:
229
 
            self._data = ThinPackData(self.resolve_ext_ref, self._data_path)
 
223
            self._data = PackData(self._data_path)
230
224
        return self._data
231
225
 
232
226
    @property
237
231
                try:
238
232
                    def report_progress(cur, total):
239
233
                        pb.update("generating index", cur, total)
240
 
                    self.data.create_index(self._idx_path, 
 
234
                    self.data.create_index(self._idx_path, self.resolve_ext_ref,
241
235
                        progress=report_progress)
242
236
                finally:
243
237
                    pb.finished()