hg clone https://code.google.com/p/catroid/ catroid echo 'exclude "Paintroid"' > rem echo 'exclude "catroweb"' > rem hg convert --traceback catroid wtf
Typo: second ">" should be ">>".
I thought this was specific to 2.2, but it isn't. I was able to reproduce the crash with 2.1.2 on my first try, although it took until closer to the end of the convert run. The trigger is in this block of code: http://selenic.com/repo/hg/file/9acb5cd19162/hgext/convert/hg.py#l175 When the rollback occurs, there seems to be a race in which the changelog may not be dropped and reread by the filecache code as it should be. As a result, it contains phantom data for the rolled-back rev, and the next commit fails with an integrity error.
Downgrading, since not a regression.
Bisected to this commit: changeset: 16116:ce0ad184f489 branch: stable user: Idan Kamara <idankk86@gmail.com> date: Thu Feb 16 01:21:34 2012 +0200 summary: localrepo: clear _filecache on rollback (issue3261)
Thanks for looking into it. Hopefully I'll have time tomorrow to dig deeper.
Can't seem to reproduce (using 2.2.1).
(In reply to comment #6) Bryan's example isn't quite complete, did you test it with "rem" as a filemap?
Yes, two mistakes in the recipe. Ouch. Here's one with both corrected: hg clone https://code.google.com/p/catroid/ catroid echo 'exclude "Paintroid"' > rem echo 'exclude "catroweb"' >> rem hg convert --filemap rem --traceback catroid wtf
(In reply to comment #2) I haven't had time to fully understand what's going on, but looking at what you found and the faulty commit it seems that what's done there to force reloading isn't enough. This seems to fix it but some rebase tests are failing. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1314,7 +1314,7 @@ # head, refresh the tag cache, then immediately add a new head. # But I think doing it this way is necessary for the "instant # tag cache retrieval" case to work. - self.invalidatecaches() + self.invalidate() # Discard all cache entries to force reloading everything. self._filecache.clear()
Idan committed a fix here: http://selenic.com/repo/hg/rev/9a99224a6409 However, the default branch is broken as of http://selenic.com/repo/hg/rev/8abee656e14c which merges Idan's fix. Specifically, the following tests fail: test-mq-caches.t test-mq-header-date.t test-mq-header-from.t test-mq-qrefresh-replace-log-message.t test-mq-qrefresh.t test-mq-subrepo.t test-mq-symlinks.t test-mq.t If I back out Idan's change, the tests on the default branch are happy again, but I have not tried that catroid tree to see if it gets broken once more by backing out 9a99224a6409.
Presumed fixed in 2.2.3 by: 9a99224a6409 localrepo: clear _filecache earlier to really force reloading