import does not handle tarball character encodings

Bug #579193 reported by karl-heinz reichel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BzrTools
New
Undecided
Unassigned

Bug Description

I have exported a repos on my mac. Later I tried to import that package into a repos on a pc.
The following crash dump message appears...

Run command: bzr import H:/machine-10-05-12.tar.gz
bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 853, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1055, in run_bzr
  File "bzrlib\commands.pyo", line 661, in run_argv_aliases
  File "bzrlib\commands.pyo", line 665, in run_direct
  File "bzrlib\cleanup.pyo", line 122, in run_simple
  File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\commands.py", line 788, in run
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\subprocess.py", line 786, in run_subprocess_command
  File "bzrlib\commands.pyo", line 1055, in run_bzr
  File "C:/Program Files/Bazaar/plugins\bzrtools\command.py", line 13, in run_argv_aliases
  File "bzrlib\commands.pyo", line 661, in run_argv_aliases
  File "bzrlib\commands.pyo", line 665, in run_direct
  File "bzrlib\cleanup.pyo", line 122, in run_simple
  File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
  File "C:/Program Files/Bazaar/plugins\bzrtools\command_classes.py", line 506, in run
  File "C:/Program Files/Bazaar/plugins\bzrtools\upstream_import.py", line 276, in do_import
  File "C:/Program Files/Bazaar/plugins\bzrtools\upstream_import.py", line 171, in import_tar
  File "C:/Program Files/Bazaar/plugins\bzrtools\upstream_import.py", line 207, in import_archive
  File "bzrlib\transform.pyo", line 301, in trans_id_tree_path
  File "bzrlib\transform.pyo", line 1380, in canonical_path
  File "bzrlib\workingtree.pyo", line 394, in abspath
  File "bzrlib\osutils.pyo", line 342, in _win32_pathjoin
  File "ntpath.pyo", line 102, in join
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)

bzr 2.1.1 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qsubprocess', '--bencode', 'l6:import30:H:/machine-10-05-12.tar.gze']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.0.1]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.1]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.1.1]
  news_merge C:\Program Files\Bazaar\plugins\news_merge [2.1.1]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.18.4]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.2]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.7.dev]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Revision history for this message
John A Meinel (jameinel) wrote :

It would appear that bzrtools is not decoding the filenames in the tarball, so any non-ascii filenames are not getting read back in correctly. (We seem to be properly encoding them during output, so we just need to decode them on input.)

affects: bzr → bzrtools
summary: - Cannot import previous exported package into bazaar repository
+ import does not handle tarball character encodings
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.