[PATCH] osutils.rmtree + test

Aaron Bentley aaron.bentley at utoronto.ca
Mon Jan 23 05:23:04 GMT 2006


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

John A Meinel wrote:
| Alexander Belchenko wrote:
|
|>Aaron Bentley пишет:
|>>This is a good start, but I think we can go further; I think we should
|>>provide an "always-works" version of rmtree in osutils, and start using
|>>it everywhere.
|
|
| I'm not 100% that we want 'always-works'. I know we switched from having
| branch entries being readonly so we could let people do 'rm -r' and not
| have to use '-f'. I also don't want us to suppress other errors because
| we always delete everything.

Okay, I don't mean *always*, and that's not what Alexander implemented,
anyhow.  The ideas is that on Windows, it should succeed in the same
places where it succeeds on POSIX.  That way, we won't get gratuitous
Windows incompatibilities in the future.

Specifically, we're looking at the readonly flag, which under Windows
will prevent a file from being deleted.  This version of rmtree just
handles the case where a deletion failed because the file was marked
readonly.

| I just want this discussed a little bit before I give full approval.

Does that address your concerns, or is there more?

| I think we need to figure out what this test should be doing, rather
| than putting up with the print statement, and commented out code. I
| don't expect Alexander to do this, but what is really going on with this
| test?

The test made sure that bzr pull --basis was working properly, by
deleting the stores that pull should not be using.  If it was broken, it
would try to use the stores, and fail.

Robert Collins disabled the test, added the annoying text, got me to
explain how it was supposed to work, and then didn't fix it.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD1Gg40F+nu1YWqI0RAgccAJ9EEe35O+8EE6hBo2ACeUHnKWHuAACdGPsI
PhTBWGoOKsua1cfl8wROAy4=
=2K5m
-----END PGP SIGNATURE-----




More information about the bazaar mailing list