/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

  • Committer: Jelmer Vernooij
  • Date: 2010-05-05 09:58:55 UTC
  • mto: (0.200.912 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20100505095855-i0165hooflvk9chy
Ignore control files in inventories.

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