bzr-svn does not support non-ascii characters properly

Bug #460392 reported by Alexander Belchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Undecided
Unassigned

Bug Description

I have svn repo with fork of FTE project and trying to convert it in bzr format. bzr-svn unable to work properly with this repository because there is russian characters in user name.

C:\work\OSS\FTE\Pinigin>bzr svn-import fte.svn fte.bzr
Using repository layout: trunk0
bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "C:/Program Files/Bazaar/plugins\svn\commands.py", line 188, in run
  File "C:/Program Files/Bazaar/plugins\svn\convert.py", line 365, in convert_repository
  File "C:/Program Files/Bazaar/plugins\svn\convert.py", line 242, in __init__
  File "C:/Program Files/Bazaar/plugins\svn\convert.py", line 290, in _fetch_to_shared_repo
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 1279, in fetch
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 1209, in _fetch_revisions
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 1154, in _fetch_revision_switch
  File "C:/Program Files/Bazaar/plugins\svn\errors.py", line 137, in convert
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 920, in report_inventory_contents
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 292, in close
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 455, in _close
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 696, in _finish_commit
  File "bzrlib\repository.pyo", line 1115, in add_revision
  File "bzrlib\repository.pyo", line 1118, in _add_revision
  File "bzrlib\chk_serializer.pyo", line 74, in write_revision_to_string
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

bzr 2.0.1 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['C:\\Program Files\\Bazaar\\bzr.EXE', 'svn-import', 'fte.svn', 'fte.bzr']
encoding: 'cp1251', fsenc: 'mbcs', lang: None
plugins:
  acad C:\work\Bazaar\plugins\acad [0.8.0]
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\work\Bazaar\plugins\explorer [0.8.3]
  fastimport C:\work\Bazaar\plugins\fastimport [0.9.0dev]
  format1 C:\work\Bazaar\plugins\format1 [unknown]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.0.1]
  qbzr C:\work\Bazaar\plugins\qbzr [0.14.5dev]
  rebase C:\work\Bazaar\plugins\rebase [0.5.4dev]
  repoalias C:\work\Bazaar\plugins\repoalias [unknown]
  scmproj C:\work\Bazaar\plugins\scmproj [0.4.6dev]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.0]
  x_bit C:\work\Bazaar\plugins\x_bit [1.0.0]

*** 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.

Even bzr log fte.svn is failed:

------------------------------------------------------------
revno: 117
svn revno: 116 (on /)
committer: alex
timestamp: Wed 2009-09-02 03:18:06 +0000
message:
  Сборка FTE в BCC55
  + Добавил путь до инструментов для более простого вызова сборки
    (достаточно вызвать только make из каталога BCC55)
  + Ввёл -DEN_TOGGLECP
------------------------------------------------------------
revno: 116
svn revno: 115 (on /)
committer: alex
timestamp: Wed 2009-09-02 03:14:40 +0000
message:
  + Добавил пару символов в фильтр строки 'st'
  ! Увеличил до 8 смещение имени файла в строке разбора 'st'
------------------------------------------------------------
revno: 115
svn revno: 114 (on /)
bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 11: ordinal not in range(128)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\commands.pyo", line 1052, in ignore_pipe
  File "bzrlib\builtins.pyo", line 2354, in run
  File "bzrlib\log.pyo", line 330, in show
  File "bzrlib\log.pyo", line 355, in _show_body
  File "bzrlib\log.pyo", line 1442, in log_revision
  File "codecs.pyo", line 303, in write
  File "encodings\cp866.pyo", line 12, in encode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 11: ordinal not in range(128)

bzr 2.0.1 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['C:\\Program Files\\Bazaar\\bzr.EXE', 'log', 'fte.svn']
encoding: 'cp1251', fsenc: 'mbcs', lang: None
plugins:
  acad C:\work\Bazaar\plugins\acad [0.8.0]
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\work\Bazaar\plugins\explorer [0.8.3]
  fastimport C:\work\Bazaar\plugins\fastimport [0.9.0dev]
  format1 C:\work\Bazaar\plugins\format1 [unknown]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.0.1]
  qbzr C:\work\Bazaar\plugins\qbzr [0.14.5dev]
  rebase C:\work\Bazaar\plugins\rebase [0.5.4dev]
  repoalias C:\work\Bazaar\plugins\repoalias [unknown]
  scmproj C:\work\Bazaar\plugins\scmproj [0.4.6dev]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.0]
  x_bit C:\work\Bazaar\plugins\x_bit [1.0.0]

*** 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.

As you can see commit messages with russian characters shown correctly, but committer name with russian characters leads to error.

Related branches

Revision history for this message
Alexander Belchenko (bialix) wrote :

See attached archive with entire repo.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 460392] Re: bzr-svn does not support non-ascii characters properly

  status fixreleased

Changed in bzr-svn:
status: New → 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.