Comment 3 for bug 196881

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 196881] Re: Exception redirecting merge output to a file

On Fri, 2008-02-29 at 10:07 +0000, Alexander Belchenko wrote:
> Here the simple patch. Someone need to write test for it :-)
>
> === modified file 'bzrlib/builtins.py'
> --- bzrlib/builtins.py 2008-02-25 07:28:29 +0000
> +++ bzrlib/builtins.py 2008-02-29 10:06:23 +0000
> @@ -3003,8 +3003,9 @@
> mutter("%s", stored_location)
> if stored_location is None:
> raise errors.BzrCommandError("No location specified or remembered")
> + terminal_encoding = self.outf.encoding or osutils.get_terminal_encoding()
> display_url = urlutils.unescape_for_display(stored_location,
> - self.outf.encoding)
> + terminal_encoding)
> self.outf.write("%s remembered location %s\n" % (verb_string,
> display_url))
> return stored_location

perhaps we should set self.outf_encoding in the command infrastructure,
and have a
self.unescape_for_display(stored_location)
which does
return urlutils.unescape_for_display(url, self.outf_encoding)

?

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.