[PATCH 1 of 6] transaction: ensure journal is committed to file system

Henrik Stuart hg at hstuart.dk
Fri Apr 24 04:44:33 CDT 2009


Matt Mackall wrote:
> On Tue, 2009-04-21 at 21:14 +0200, Dirkjan Ochtman wrote:
>> On Tue, Apr 21, 2009 at 19:33, Henrik Stuart <hg at hstuart.dk> wrote:
>>> +    def _write(self, data):
>>>         # add enough data to the journal to do the truncate
>>> -        self.file.write("%s\0%d\n" % (file, offset))
>>> +        self.file.write(data)
>>>         self.file.flush()
>>> +        # ensure journal is synced to file system
>>> +        os.fsync(self.file.fileno())
>> I believe Matt stated that he didn't want this.
> So look at the journal as an optimization for cleanup and less as an
> integrity tool. We can always use verify to find the last
> self-consistent revision.

Out of curiosity, is there another way to fix the repository but to make
a clone of the latest self-consistent revision? Something in-place?

-- 
Kind regards,
  Henrik Stuart


More information about the Mercurial-devel mailing list