[PATCH STABLE] localrepo: clear filecache correctly on destroyed()

Hao Lian hao at fogcreek.com
Mon Dec 3 10:26:11 CST 2012


On Fri, Nov 23, 2012 at 6:51 AM, Idan Kamara <idankk86 at gmail.com> wrote:
>
> I'd like to better understand the root of the bug and I can't seem to
> reproduce it without going through convert. Were you able to create a
> self contained test?

Here's a test script with the resulting output with and without the bug:

  https://gist.github.com/4196022

Running the script against Mercurial stable tip should corrupt the
repo and cause `hg verify` to complain.

> Perhaps we want to pass an argument to invalidate that tells
> it whether to clear the filecache, and use it during _rollback.

As someone who only has a surface understanding of this code :D, I'm
fine with this.

Sorry for the delay in replying to this. I only have time to work on
patches when I have free time at work; if you'd like to write out the
next iteration of this patch, I'm fine with that. Otherwise I'll wait
for your feedback from running/debugging this test script. (I chose
not to write it in the Mercurial unit test format because that format
doesn't really lend itself to debugging.)


More information about the Mercurial-devel mailing list