← Back to team overview

bzr-windows team mailing list archive

Re: Don't use single quotes as quotes in command-line parsing on windows?

 

I have not made time to test John's changes but (as I wrote to the
list in September) I think it is important for cli apps like bzr to
observe the principle of least surprise with respect to shell
behavior.  This was btw why I opened bugs against bzr mv and bzr rm in
the first place.  So perhaps what is needed here is a thin platform
dependent layer rather than a universal approach.

Although I personally could adapt to any arbitrary rules in exchange
for guaranteed conformity, I would not expect that to help bzr
adoption on windows.

~M

On 11/6/09, Alexander Belchenko <bialix@xxxxxxx> wrote:
> Hi all,
>
> Recently John Meinel merged his patch for custom parsing of bzr
> command-line on windows and expanding all globs as it works in the posix
> shell. Simultaneously he introduced support for single quotes as in posix.
>
> https://code.edge.launchpad.net/~jameinel/bzr/2.1.0b3-win32-shell-completion/+merge/14445
>
> In my understanding this will break usual behavior of windows programs,
> because standard windows shell and especially CommandLineToArgv Win32
> API function does not support single quotes in this manner. Especially
> as Martin (gzlist) noted it will break work with filenames which has
> single quote inside:
>
> C:\bzr\bzr\2.1.0b3-win32-shell-completion>echo Be nice; be mean >
> dos_and_don'ts.txt
>
> C:\bzr\bzr\2.1.0b3-win32-shell-completion>python bzr add dos_and_don'ts.txt
> bzr: ERROR: No such file:
> u'C:/bzr/bzr/2.1.0b3-win32-shell-completion/dos_and_donts.txt'
>
> I've sent merge proposal to disable support for single quote:
>
> https://code.launchpad.net/~bialix/bzr/no-single-quote-on-win32/+merge/14537
>
> I'm asking for comments or reviews of my patch. If you using windows
> long enough and prefer to keep standard windows behavior -- say so. If
> you want to have support for single quote -- also say so.
>
> Please!
>
> As it noted several times in recent thread about Canonical's plans on
> bzr, there is still accepted community patches and community reviews.
> So, be active if you feel something need to be fixed. I need second
> approve vote for my patch or one disapprove to reject.
>
> Alexander
>
> _______________________________________________
> Mailing list: https://launchpad.net/~bzr-windows
> Post to     : bzr-windows@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~bzr-windows
> More help   : https://help.launchpad.net/ListHelp
>



References