[MERGE] TreeTransform rolls back on exception (#67699)
Kuno Meyer
kuno.meyer at gmx.ch
Thu Aug 23 22:15:15 BST 2007
On 23.08.2007 22:29, Aaron Bentley wrote:
> -----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?
There's no reason.
Please don't get me wrong: My point was about giving information about
the file that conflicts (which I still think would be very useful), not
about the way how this is implemented. I'm sorry if there was a
misunderstanding.
Kuno
More information about the bazaar
mailing list