Avoid 00changelog.i corruption
Matt Mackall
mpm at selenic.com
Mon Jul 20 10:32:19 CDT 2009
On Mon, 2009-07-20 at 09:56 +0200, Ingo Proetel wrote:
> Hi,
>
> I came across a problem while using VirtualBox running Ubuntu on a Windows XP host. When pushing a change from inside
> the VirtualBox to a repo that resides on a shared folder (a folder that exists on the underlying NTFS and is mounted in
> Ubuntu) I got a corrupted 00changelog.i. I found that python has a problem with opening files to append to. Apparently
> NULL characters are included when writing into such a file. While a broken append function is not a mercurial problem
> having corrupted data is a mercurial problem. Data corruption is not a problem you want to have with a version control
> system. A clean failure and rollback is acceptable thought.
>
> So I would suggest the following patch (or something a like it) to try to make sure that the written data is what is
> expected.
>
> $ hg log -p -r 9046
> changeset: 9046:91b293cf8a5e
> tag: tip
> user: Ingo Proetel <proetel at aicas.com>
> date: Sat Jul 18 01:19:03 2009 +0200
> summary: Make writing of changelog index more robust against data corruption.
There are lots of places we append to files, is this the only one
affected? Are the nuls at the end of the file or somewhere else?
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial
mailing list