[MERGE] 'bzr selftest --clean' allows easily clean temporary tests directories

John Arbash Meinel john at arbash-meinel.com
Tue Dec 12 14:55:56 GMT 2006


Vincent Ladeuil wrote:
>>>>>> "bialix" == Alexander Belchenko <bialix at ukr.net> writes:
> 
>     bialix> After discussion about this change I personally don't think that
>     bialix> bzrtools is *right* solution for me (personally), because not all system
>     bialix> has bzrtools.
> 
>     bialix> I'd like to change 'make clean' to use cross-platform solution by using
>     bialix> python scripts (something similar as I did for clean-docs).
> 
>     bialix> But anyway, why for clean all (that what 'make clean' do) when I want to
>     bialix> clean only temp tests directories?
> 
> 
> The canonical way would be to define a new target clean-selftest
> and have it mentioned in the dependencies of clean.
> 
> ....<reading Makefile>
> 
> Hmm, clean associated action already does : 'rm -rf test????.tmp'
> but do not mention clean-docs in its dependencies ?
> 
> Anyway, I, for one, would prefer the selftest --clean approach.
> 
> Otherwise the following patch illustrate my points.
> 
>     Vincent

As Alexander and I mentioned, 'rm -rf' is not Windows compatible.
Because in general 'rm' doesn't handle Unicode filenames. You have to
use the Windows Unicode API to be able to handle them correctly. The
easiest way is:

python -c "import shutil; shutil.rmtree(u'test0000.tmp')"
                                        ^- very important

Which is why Alexander wants 'bzr selftest --clean', or to change the
makefile to call into python so that it can work again.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061212/7c40e484/attachment.pgp 


More information about the bazaar mailing list