new status output

John A Meinel john at arbash-meinel.com
Wed Oct 26 02:33:20 BST 2005


Martin Pool wrote:
> On 25/10/05, James Blackwell <jblack at merconline.com> wrote:
>
>
>>I respectfully request that we not refer to using xargs in any of the
>>documentation. xargs is notoriously bad at getting tricked by bad
>>filenames.
>
>
> A good point.  But the problem is not exactly xargs, but rather shell
> scripting in general.  One would have similar trouble with
>
>   for i in `bzr unknowns`
>
> or
>
>   rm `bzr unknowns`
>
> One thing we can do is avoid requiring users to write or use shell
> scripts.  There are several reasons: it won't work for most Windows
> users, some users are uncomfortable writing or debugging them, and
> they tend to do badly on strange filenames.  So automatically adding
> all unignored files is an example of avoiding something that might
> need shell scripting.  Having builtin things to list ignored files
> avoids the need to use awk to extract them from svn-style status
> output.  One can also write plugins like bzrtools' clean-tree that do
> everything in Python and so avoid cross-platform and quoting problems.

I would generally make Windows command line a second tier system, since
it is second tier even on windows. Worry more about making bzrlib
useful, so that someone can write a decent GUI for Windows.

>
> However, shell scripts are pretty useful for some users, and we can
> support them.  So we could have 'bzr ls --unknown --null' to produce
> output for 'xargs -0', and I think the default output tries to quote
> strange filenames in a way that will work for shells.  (We are a bit
> constrained because of not being able to use \ as a quote character,
> and so it probably doesn't handle every case properly at the moment.
> But it handles the typical ones like having space in filenames.)  I'd
> rather not have the default quoting be os-specific if we can avoid it.
>

I'm not sure what the default output should be, but certainly a --null
is useful to pipe into other commands.
And I would say to go ahead an use "\" for escaping, except on windows
you just don't escape at all.
You don't have bash, find, xargs, etc on windows anyway. And if you do,
then you would be running the shell scripting version.

Does that make sense? Basically, I'm saying right the command line
interface such that it plays well with shells. And maybe have a switch
to turn on cmd.exe compatibility, which disables most of the shell
friendliness.

John
=:->


> --
> Martin
>
>

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


More information about the bazaar mailing list