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

  • Committer: Jelmer Vernooij
  • Date: 2018-11-11 04:08:32 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181111040832-nsljjynzzwmznf3h
Run autopep8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
else:
61
61
    CAPABILITIES.append("import")
62
62
 
 
63
 
63
64
def open_remote_dir(url):
64
65
    try:
65
66
        return ControlDir.open(url)
75
76
    for (sha1, ref) in wants:
76
77
        revs.append((sha1, None))
77
78
    if (isinstance(remote_repo, GitRepository) and
78
 
        isinstance(local_repo, GitRepository)):
 
79
            isinstance(local_repo, GitRepository)):
79
80
        lossy = False
80
81
    else:
81
82
        lossy = True
109
110
        self.wants = []
110
111
 
111
112
    def cmd_capabilities(self, outf, argv):
112
 
        outf.write(b"\n".join([c.encode() for c in CAPABILITIES])+b"\n\n")
 
113
        outf.write(b"\n".join([c.encode() for c in CAPABILITIES]) + b"\n\n")
113
114
 
114
115
    def cmd_list(self, outf, argv):
115
116
        try:
148
149
            dest_branch_name = None
149
150
        remote_branch = self.remote_dir.open_branch(name=dest_branch_name)
150
151
        exporter = fastexporter.BzrFastExporter(remote_branch,
151
 
            outf=outf, ref=ref,
152
 
            checkpoint=None, import_marks_file=None,
153
 
            export_marks_file=None, revision=None,
154
 
            verbose=None, plain_format=True,
155
 
            rewrite_tags=False)
 
152
                                                outf=outf, ref=ref,
 
153
                                                checkpoint=None, import_marks_file=None,
 
154
                                                export_marks_file=None, revision=None,
 
155
                                                verbose=None, plain_format=True,
 
156
                                                rewrite_tags=False)
156
157
        exporter.run()
157
158
 
158
159
    commands = {
175
176
        argv = l.strip().split()
176
177
        if argv == []:
177
178
            if self.batchcmd == "fetch":
178
 
                fetch(outf, self.wants, self.shortname, self.remote_dir, self.local_dir)
 
179
                fetch(outf, self.wants, self.shortname,
 
180
                      self.remote_dir, self.local_dir)
179
181
            elif self.batchcmd == "push":
180
 
                push(outf, self.wants, self.shortname, self.remote_dir, self.local_dir)
 
182
                push(outf, self.wants, self.shortname,
 
183
                     self.remote_dir, self.local_dir)
181
184
            elif self.batchcmd is None:
182
185
                return
183
186
            else:
185
188
            self.batchcmd = None
186
189
        else:
187
190
            try:
188
 
               self.commands[argv[0]](self, outf, argv)
 
191
                self.commands[argv[0]](self, outf, argv)
189
192
            except KeyError:
190
 
               raise Exception("Unknown remote command %r" % argv)
 
193
                raise Exception("Unknown remote command %r" % argv)
191
194
        outf.flush()
192
195
 
193
196