~brz/brz/3.0

« back to all changes in this revision

Viewing changes to breezy/git/server.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-05-30 01:35:40 UTC
  • mfrom: (7340.1.9 flakes-fix)
  • Revision ID: breezy.the.bot@gmail.com-20200530013540-g5thcq7ltuijo83k
Fix compatibility with newer versions of flake8.

Merged from https://code.launchpad.net/~jelmer/brz/flakes-fix/+merge/384002

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
            have = self.object_store.find_common_revisions(graph_walker)
93
93
            if wants is None:
94
94
                return
 
95
            shallows = getattr(graph_walker, 'shallow', frozenset())
95
96
            if isinstance(self.object_store, BazaarObjectStore):
96
 
                return self.object_store.generate_pack_contents(
97
 
                    have, wants, progress, get_tagged=get_tagged, lossy=True)
 
97
                if shallows:
 
98
                    return self.object_store.generate_pack_contents(
 
99
                        have, wants, shallow=shallows,
 
100
                        progress=progress, get_tagged=get_tagged, lossy=True)
 
101
                else:
 
102
                    return self.object_store.generate_pack_contents(
 
103
                        have, wants, progress=progress,
 
104
                        get_tagged=get_tagged, lossy=True)
98
105
            else:
99
 
                return self.object_store.generate_pack_contents(
100
 
                    have, wants, progress)
 
106
                if shallows:
 
107
                    return self.object_store.generate_pack_contents(
 
108
                        have, wants, shallow=shallows, progress=progress)
 
109
                else:
 
110
                    return self.object_store.generate_pack_contents(
 
111
                        have, wants, progress=progress)
101
112
 
102
113
 
103
114
class BzrTCPGitServer(TCPGitServer):