[MERGE] Implement --output for diff and cat, added -o as an alias.

John Arbash Meinel john at arbash-meinel.com
Mon Aug 7 17:24:18 BST 2006


Martin Pool wrote:
> On  7 Aug 2006, Matthieu Moy <Matthieu.Moy at imag.fr> wrote:
>> Hi,
>>
>> I've filed a bug, but it might be worth pinging the list too:
>>
>> https://launchpad.net/products/bzr/+bug/55414
>>
>> Branch:
>> http://www-verimag.imag.fr/~moy/bzr/bzr/bzr.output-option/
>>
>> 1908: Matthieu Moy 2006-08-06 output as a global option, -o as a short alias
>> 1909: Matthieu Moy 2006-08-06 diff -o FILE implemented
>> 1910: Matthieu Moy 2006-08-06 Implemented -o for "bzr cat"
>> 1911: Matthieu Moy 2006-08-06 fixed import statements
> 
> Thanks for the contribution.  Can you say a bit more about why adding
> the option is justified?  It seems like it's two things:
> 
> 1. Using -o FILE avoids encoding problems caused by sending binaries to
> stdout on Windows.  But I thought John's approach of marking commands
> with the encoding semantics would avoid that?

It needs to go one step further, still. And set stdout to binary. So
that 'bzr cat -r XX > foo' actually cats the content. Otherwise Windows
will mess up line endings.

Also, we probably want a way to globally override the terminal encoding,
so that you can get UTF8 encoded output when redirecting to a file.

Otherwise, under Windows you can have a file which is perfectly valid on
the filesystem, but which 'bzr ls --added' would fail. Being able to
force the output to utf-8 means that wrappers and redirecting to a file
could still work.

> 
> 2. Having a -o option is just useful sometimes?
> 
> Is there a particular case where you wanted it?
> 

I'm not as convinced that we need '-o'. I don't know off-hand where it
might conflict, though. So I wouldn't block on it.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060807/64da15ae/attachment.pgp 


More information about the bazaar mailing list