/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 breezy/git/server.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 19:47:19 UTC
  • mfrom: (7178 work)
  • mto: This revision was merged to the branch mainline in revision 7179.
  • Revision ID: jelmer@jelmer.uk-20181116194719-m5ut2wfuze5x9s1p
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    UploadPackHandler,
51
51
    )
52
52
 
 
53
 
53
54
class BzrBackend(Backend):
54
55
    """A git serve backend that can use a Bazaar repository."""
55
56
 
84
85
        return self.object_store.peel_sha(self.refs[name]).id
85
86
 
86
87
    def fetch_objects(self, determine_wants, graph_walker, progress,
87
 
        get_tagged=None):
 
88
                      get_tagged=None):
88
89
        """Yield git objects to send to client """
89
90
        with self.object_store.lock_read():
90
91
            wants = determine_wants(self.get_refs())
92
93
            if wants is None:
93
94
                return
94
95
            if isinstance(self.object_store, BazaarObjectStore):
95
 
                return self.object_store.generate_pack_contents(have, wants, progress,
96
 
                        get_tagged=get_tagged, lossy=True)
 
96
                return self.object_store.generate_pack_contents(
 
97
                    have, wants, progress, get_tagged=get_tagged, lossy=True)
97
98
            else:
98
 
                return self.object_store.generate_pack_contents(have, wants, progress)
 
99
                return self.object_store.generate_pack_contents(
 
100
                    have, wants, progress)
99
101
 
100
102
 
101
103
class BzrTCPGitServer(TCPGitServer):
131
133
    if handler is None:
132
134
        return None
133
135
    backend = BzrBackend(branch.user_transport)
 
136
 
134
137
    def git_call(environ, start_response):
135
138
        req = HTTPGitRequest(environ, start_response, dumb=False,
136
139
                             handlers=DEFAULT_HANDLERS)