Code review comment for lp:~nmb/bzr/script-test-mv

Revision history for this message
John A Meinel (jameinel) wrote :

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

Martin Pool wrote:
> That's nice.
>
> It should be mentioned in TESTING in news.
>
> I wonder if it should use a transport operation rather than shutil?

If you use shutil.move() it *does* support "path ... dir". It may not
support multiple paths, but 'move' will notice the target is a directory
an move things into it.

transport.rename() won't (being based on top of os.rename), etc.

If shutil is meant to be used on something like MemoryTransport, then we
obviously have to go there. If it is only meant to be used on disk, then
'shutil.move' is probably fine.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktN1C0ACgkQJdeBCYSNAAMl1QCeLIHpBjx3Z9r2ermpLEcBEIC/
R/IAnA2BuJ6SH0UIifPMVE9pIsLDe2XU
=eKG2
-----END PGP SIGNATURE-----

« Back to merge proposal