[RFC] general implementation of glob expansion on win32
Kuno Meyer
kuno.meyer at gmx.ch
Sun Jul 29 10:02:48 BST 2007
Hi all
I'd like to get feedback for a patch that implements glob expansion on
Win32 for (almost) all commands. Currently, glob expansion on Windows is
just implemented for the FILE argument of the ``add`` command.
---
On Unix/Linux, the expansion is done by the shell and the user has
fine-grained control by quoting arguments with single quotes. It is
therefore possible to ``bzr ignore`` patterns without having them
modified by the shell.
On Windows, the usage of single quotes is not common and implementing
this behaviour might confuse users. Therefore, a different mechanism of
having control over glob expansion is needed.
The current patch provides an implementation that performs glob
expansion based on the chosen command: Globs are normally expanded, but
not for ``ignore`` or ``selftest``. The patch does not yet leave the
user the possibility to manually control the glob expansion (I'm not
sure whether this is needed at all).
The only problem I currently have is: how to refer to files whose names
start with a dash ('-'). I tried to find out how a Unix shell handles
this problem, but neither quoting ("touch '-a'") nor escaping ("touch
\-a") produced the desired result (creating a file named '-a'). On the
other hand: option parsing is on a higher layer and should not influence
glob expansion.
Kuno
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win32globexpand.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070729/538aeb8c/attachment-0001.diff
More information about the bazaar
mailing list