[MERGE] TreeTransform rolls back on exception (#67699)

Aaron Bentley aaron.bentley at utoronto.ca
Thu Aug 23 21:29:39 BST 2007


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

Kuno Meyer wrote:
> On 23.08.2007 21:35, Aaron Bentley wrote:
>> Yes, it's pretty much the same.  I just assume pending-deletion and
>> limbo will either both exist or both not exist.
> 
> Ok. And why not enforce this assumption?

Sloth.

>> I think Python exceptions should include the pathname.
>>
>> Failing that, we should be raising our own exceptions that include the
>> pathname.
> 
> At least on my platform is the 'filename' attribute of the 'OSError'
> exception None when trying to revert a locked file.

I mean they don't, but they should.

>>> , for example by a warning message
>>> before re-raising exceptions at
>>
>> I think warnings aren't the right way to handle errors.
>>
>> But this submission is aimed at ending the data-loss potential, not
>> making it more friendly.
> 
> Nevertheless, it would be the very point where we have this information.
> 
> Having the filename in the exception certainly makes it easier to treat
> the error condition programatically, but having it in the warning output
> at least gives the (human) user a hint.

Raising our own exception is the correct way to do it, has the same
virtues as warnings for human readers, and is not much harder than
issuing a warning.  Why do it the wrong way?

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

iD8DBQFGze4z0F+nu1YWqI0RAuMcAJ9sPmxB9XX4jdYpn6q2/PNHcycAKwCfYeyX
ZYn/q9glP03msfdeR/QUbEo=
=wzAY
-----END PGP SIGNATURE-----



More information about the bazaar mailing list