Comment 9 for bug 1031679

Revision history for this message
Oliver (oliver-assarbad) wrote :

Here's a workaround. Check if your shell has an alias for bzr:

   alias|grep bzr

if not define:

   alias bzr='BZR_PLUGIN_PATH=$HOME/.bazaar/plugins bzr'

Use the attached .tgz by unpacking it via

   tar -C "$HOME" -xzf workaround_1031679.tgz

this ensures that the base folder ($HOME/.bazaar/plugins) also exists. Note that this relies on the path in the above alias (as BZR_PLUGIN_PATH) being identical to the one in the .tgz!

Also note: this will likely fail on Windows unless you're using GNU tar, Bash (or another shell with aliases etc) or something like Cygwin right away.

Comparison of with and without workaround below (stripped the traceback and replaced it by [...]):
--------------------------------------------------------------------------------
$ rm -rf $HOME/.bazaar/plugins
$ bzr fast-export --plain ~/etc/ > ~/file.fi
03:57:30 Calculating the revisions to include ...
03:57:30 Starting export of 278 revisions ...
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\u011f' in position 79: ordinal not in range(128)
[...]
$ alias bzr='BZR_PLUGIN_PATH=$HOME/.bazaar/plugins bzr'
$ tar -C "$HOME" -xzvf workaround_1031679.tgz
.bazaar/plugins/workaround_1031679/
.bazaar/plugins/workaround_1031679/__init__.py
$ bzr fast-export --plain ~/etc/ > ~/file.fi
Default encoding before reload: ascii
Default encoding after reload: utf-8
03:59:18 Calculating the revisions to include ...
03:59:18 Starting export of 278 revisions ...
03:59:19 Exported 278 revisions in 0:00:01