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

  • Committer: Jelmer Vernooij
  • Date: 2018-06-21 17:53:38 UTC
  • mfrom: (6973.5.13 python3-c)
  • Revision ID: jelmer@jelmer.uk-20180621175338-v7loaib7mh7pfosf
Merge lp:~jelmer/brz/python3-c

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
    else:
80
80
        lossy = True
81
81
    inter.fetch_objects(revs, lossy=lossy)
82
 
    outf.write("\n")
 
82
    outf.write(b"\n")
83
83
 
84
84
 
85
85
def push(outf, wants, shortname, remote_dir, local_dir):
93
93
        except NotBranchError:
94
94
            remote_branch = remote_dir.create_branch(name=dest_branch_name)
95
95
        local_branch.push(remote_branch)
96
 
        outf.write("ok %s\n" % dest_ref)
97
 
    outf.write("\n")
 
96
        outf.write(b"ok %s\n" % dest_ref)
 
97
    outf.write(b"\n")
98
98
 
99
99
 
100
100
class RemoteHelper(object):
108
108
        self.wants = []
109
109
 
110
110
    def cmd_capabilities(self, outf, argv):
111
 
        outf.write("\n".join(CAPABILITIES)+"\n\n")
 
111
        outf.write(b"\n".join([c.encode() for c in CAPABILITIES])+b"\n\n")
112
112
 
113
113
    def cmd_list(self, outf, argv):
114
114
        try:
120
120
            refs = get_refs_container(self.remote_dir, object_store)
121
121
            for ref, git_sha1 in refs.as_dict().iteritems():
122
122
                ref = ref.replace("~", "_")
123
 
                outf.write("%s %s\n" % (git_sha1, ref))
124
 
            outf.write("\n")
 
123
                outf.write(b"%s %s\n" % (git_sha1, ref))
 
124
            outf.write(b"\n")
125
125
 
126
126
    def cmd_option(self, outf, argv):
127
 
        outf.write("unsupported\n")
 
127
        outf.write(b"unsupported\n")
128
128
 
129
129
    def cmd_fetch(self, outf, argv):
130
130
        if self.batchcmd not in (None, "fetch"):