[MERGE] crash when "bzr add" (under win32)
Martin Pool
mbp at sourcefrog.net
Wed Jul 11 05:14:19 BST 2007
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.
--
Martin
More information about the bazaar
mailing list