/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

Pass along thin pack settings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
    def has(self, relpath):
101
101
        return False
102
102
 
103
 
    def _get_client(self):
 
103
    def _get_client(self, thin_packs):
104
104
        raise NotImplementedError(self._get_client)
105
105
 
106
106
    def _get_path(self):
110
110
        if progress is None:
111
111
            def progress(text):
112
112
                info("git: %s" % text)
113
 
        client = self._get_client()
 
113
        client = self._get_client(thin_packs=False)
114
114
        try:
115
115
            return client.fetch_pack(self._get_path(), determine_wants, 
116
116
                graph_walker, pack_data, progress)
118
118
            raise BzrError(e)
119
119
 
120
120
    def send_pack(self, get_changed_refs, generate_pack_contents):
121
 
        client = self._get_client()
 
121
        client = self._get_client(thin_packs=False)
122
122
        try:
123
123
            return client.send_pack(self._get_path(), get_changed_refs, 
124
124
                generate_pack_contents)
145
145
 
146
146
    _scheme = 'git'
147
147
 
148
 
    def _get_client(self):
 
148
    def _get_client(self, thin_packs):
149
149
        if self._client is not None:
150
150
            ret = self._client
151
151
            self._client = None
152
152
            return ret
153
 
        return git.client.TCPGitClient(self._host, self._port, thin_packs=False,
 
153
        return git.client.TCPGitClient(self._host, self._port, thin_packs=thin_packs,
154
154
            report_activity=self._report_activity)
155
155
 
156
156
 
163
163
            return self._path[3:]
164
164
        return self._path
165
165
 
166
 
    def _get_client(self):
 
166
    def _get_client(self, thin_packs):
167
167
        if self._client is not None:
168
168
            ret = self._client
169
169
            self._client = None
170
170
            return ret
171
171
        return git.client.SSHGitClient(self._host, self._port, self._username,
172
 
            thin_packs=False, report_activity=self._report_activity)
 
172
            thin_packs=thin_packs, report_activity=self._report_activity)
173
173
 
174
174
 
175
175
class RemoteGitDir(GitDir):