[RFC] general implementation of glob expansion on win32

Alexander Belchenko bialix at ukr.net
Sun Jul 29 11:54:21 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kuno Meyer пишет:
> 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).

In previous discussion Martin suggest to apply glob expansion based on type
of arguments: only for FILE... or DIR... arguments such glob expansion
has sense. So I think your current approach may lead to confusions
in some situations.

I'm pretty sure we can catch arguments by names in Command class or
in _match_argform() function and provide expansion only for files
and dirs.

- --
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGrHHczYr338mxwCURAs/rAJ9zvHihzIY+1nBJJMi3oG7tIjnPxACeJRVg
gOKmCyeHtk4haLC4yeG3sU8=
=MyYP
-----END PGP SIGNATURE-----



More information about the bazaar mailing list