[MERGE] Unit tests for win32 glob expansion

Alexander Belchenko bialix at ukr.net
Mon Jul 16 19:41:47 BST 2007


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

Kuno Meyer пишет:
> On 16.07.2007 15:08, Alexander Belchenko wrote:
>>
>> Looks good. Just one question.
>>
>> Looking at test data:
>>
>> [['*/'], ['c\\', 'd\\']],
>>
>> I wonder, should we do normalization from '\\' to '/' as in osutils.py
>> codebase?
>>
>> [µ]
> 
> I'm not familiar enough with the Bazaar code base to judge whether this
> normalization would have a benefit, or would just be redundant, or even
> counterproductive. I had the impression that internally bazaar converts
> everything to '/'.

I'd like to hear John's opinion here.
AFAIK, '/' normalization is mostly needed for proper cross-platform testing.

> However, please take into account that win32utils.glob_expand() just
> gets invoked for the "add" command, and all other commands have to cope
> with direct user input. I'm wondering why the implementation is this
> way, as there are a lot of shortcomings: The command "bzr rm *.txt" for
> example returns with the error message "*.txt does not exist", even
> after "bzr add some.txt".
> 
> My intention was to move the the win32 glob expansion down to the
> beginning of run_bzr as soon as this patch was accepted. Then we would
> have a quite similar behaviour as under Linux for /all/ commands. If it
> makes sense to perform path normalisation there as well (either to '/'
> or to '\\'), then we should implement it. The only issue I see with that
> solution is, that the behaviour of "bzr ignore *.pyc" potentially would
> not be understood by Windows users.

I have very strong objections against using glob_expand for *all* commands,
because you have no way to disable glob on win32.
AFAIK, quoting (in single quotes) on Linux prevents for glob expanding,
but on win32 you simply can't do this.

> Let me know what you think, and whether I should continue without
> waiting for the current patch to be applied.

John, can you also look on this patch, please?

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

iD8DBQFGm7vrzYr338mxwCURAplvAJ9KDq4UdzOJapnOJQC5QGaqLHKmxACdHiQh
0/5K9neAV1wtSbCwHmBpGUM=
=jjxN
-----END PGP SIGNATURE-----



More information about the bazaar mailing list