[MERGE][#151844] Unicode-safe output from ``bzr info``

Lukáš Lalinský lalinsky at gmail.com
Mon Oct 15 12:49:25 BST 2007


On 10/15/07, Martin Pool <mbp at canonical.com> wrote:
> Martin Pool has voted tweak.
> Status is now: Conditionally approved
> Comment:
> Thankyou for addressing this.
>
> You could be more specific in the news entry about just what's being
> fixed -- that unrepresentable characters will be replaced.

Actually the main fix is using the terminal encoding, not assuming
that the terminal is ascii.

>           self.assertNotEqual(-1, txt.find(msg.encode('ascii',
> 'replace')))
> +
> +    def test_info(self):
> +        bzr = self.run_bzr_decode
> +        bzr(['branch', u'.', self.info['directory']])
> +        bzr(['info', self.info['directory']])
> +        bzr(['info', self.info['directory']], encoding='ascii')
>
> We've been removing uses of bzr= like this - it does make the tests
> shorter but less explicit.

Ok, changed.

> Where does self.info[] get set anyhow?

In EncodingTestAdapter.

Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unicode-info.diff
Type: text/x-diff
Size: 18689 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071015/bc610a66/attachment.bin 


More information about the bazaar mailing list