[MERGE] crash when "bzr add" (under win32)
Kuno Meyer
kuno.meyer at gmx.ch
Wed Jul 11 19:07:45 BST 2007
On 11.07.2007 06:14, Martin Pool wrote:
> On 7/11/07, Kuno Meyer <kuno.meyer at gmx.ch> wrote:
>> Just a small fix for a bug under Win32 introduced while refactoring. By
>> the way, are there any (explicit) tests for win32utils.glob_expand? I
>> didn't find any.
>>
>> Kuno
>>
>> PS: This is my first patch, so please let me know if I'm doing anything
>> wrong ;-)
>
> +1 - Thanks, that looks good. If this is present in 0.18rc1 then we
> should fix it, because add it a pretty important command. :)
>
> There do not seem to be any explicit tests already. I think it would
> be good to add two different tests.
>
> 1- When glob_expand_for_win32 is called, it has the right effect:
> expanding things that are globs and can match something. The easiest
> thing is probably to make it a TestCaseInTempDir and then use
> build_tree to make some files to test against.
>
> 2- When we do a blackbox test on bzr add, this method does get
> correctly invoked. This is a bit tricky as it's only supposed to be
> active on Windows.
> I can see a couple of options:
>
> 2a - use run_bzr_subprocess, which will give the shell a chance to do
> the expansion on Unix (i think).
>
> 2b - change run_bzr and rearrange the layering so that if you try to
> run bzr in-process with wildcards it does the expansion through this
> method, even on unix.
>
Ok. I will provide some tests at least for case 1-, but in a separate
patch. Thank you for a hint how to implement it.
As of the cases 2-, I'm not sure what you want to test in addition to
the mere callability of the function, which already is covered enough (I
think) by the blackbox tests.
Kuno
More information about the bazaar
mailing list