TypeError: can't concat str to bytes

Bug #1851478 reported by Benjamin Drung
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Breezy
Fix Released
High
Jelmer Vernooij
breezy (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

I tried to convert https://code.launchpad.net/~apport-hackers/apport/trunk into git (on Ubuntu 19.10 with brz 3.0.1-6):

$ git init
$ bzr fast-export --plain ../apport.bzr | git fast-import
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1016, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1202, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 759, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 137, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/cmds.py", line 507, in run
    return exporter.run()
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/exporter.py", line 253, in run
    self.emit_commit(revid, self.ref)
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/exporter.py", line 372, in emit_commit
    self.print_cmd(self._get_commit_command(ref, mark, revobj, file_cmds))
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/exporter.py", line 299, in print_cmd
    self.outf.write(b"%s\n" % cmd)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 189, in __bytes__
    return self.to_string(include_file_contents=True)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 242, in to_string
    for c in self.iter_files()])
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 242, in <listcomp>
    for c in self.iter_files()])
  File "/usr/lib/python3/dist-packages/fastimport/helpers.py", line 120, in repr_bytes
    return bytes(obj)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 367, in __bytes__
    return self.to_string(include_file_contents=True)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 393, in to_string
    datastr = ('\ndata %d\n' % len(self.data)).encode('ascii') + self.data
TypeError: can't concat str to bytes

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Looks like fastexporting symbolic links is broken on Python 3.

Changed in brz:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 3.0.2
milestone: 3.0.2 → 3.0.3
Jelmer Vernooij (jelmer)
Changed in brz:
status: Triaged → Fix Committed
Changed in breezy (Ubuntu):
status: New → Fix Committed
Jelmer Vernooij (jelmer)
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.