[PATCH 1 of 3] transaction: always remove empty journal on abort

Sune Foldager cryo at cyanite.org
Sat Oct 31 14:54:26 UTC 2009


Benoit Boissinot wrote:
> On Sat, Oct 31, 2009 at 03:38:54PM +0100, Sune Foldager wrote:
>   
>>
>> The after used from localrepo will, sure, but perhaps a future use of 
>> the transaction class will pass an after-hook which won't remove the file.
>>     
>
> If that's your concern, then we can put it outside the if:
>
> if self.after:
>     self.after()
> if os.path.exists(self.journal):
>     os.unlink(self.journal)
>   
Ah yes, that's even shorter. +1

/Sune




More information about the Mercurial-devel mailing list