HgBug47098e67a01d
Current recommendation for workaround
hg pull -r cedc6b47df33 hg pull
Background
New verify errors. Using a proposed diagnostic patch, problems pushing tracked back to
File "mercurial/hgweb/wsgicgi.py", line 68, in launch File "mercurial/hgweb/hgwebdir_mod.py", line 91, in '''call''' File "mercurial/hgweb/hgwebdir_mod.py", line 148, in run_wsgi File "mercurial/hgweb/hgweb_mod.py", line 100, in run_wsgi File "mercurial/hgweb/protocol.py", line 156, in unbundle File "mercurial/localrepo.py", line 2031, in addchangegroup File "mercurial/revlog.py", line 1204, in addgroup LookupError: 00manifest.i@47098e67a01d: unknown parent
and similar errors pulling for some people:
$ hg pull -u pulling from http://hg.netbeans.org/web-main searching for changes adding changesets adding manifests transaction abort! rollback completed abort: 00manifest.i@47098e67a01d: unknown parent!
http://hg.netbeans.org/main-silver/rev/47098e67a01d shows d29a273d9541 (similarly jet-main, web-main, main, main-golden) whereas http://hg.netbeans.org/prototypes/rev/47098e67a01d shows cedc6b47df33 (similarly core-main, cdev).
In a clone of prototypes (cloned long before this issue arose but in which all changesets are supposed to have been pulled),
$ hg debugindex .hg/store/00manifest.i | head -1 && \
hg debugindex .hg/store/00manifest.i | fgrep 47098e67a01d && \
hg log --template '{node}\n' -r 149241
rev offset length base linkrev nodeid p1 p2
149564 1123520610 18600 149401 149241 47098e67a01d 105f357cc25b 1c584c823513
149567 1123557523 18747 149401 149827 6d6786c54c4b 47098e67a01d 77033e37f7ec
149568 1123576270 325 149401 149828 8fe3c813a0e8 47098e67a01d 000000000000
149571 1123576995 463 149401 149831 5903f3051fdb 47098e67a01d 000000000000
d29a273d95410a792d958462ec789291cc017fb9
pointing to d29a273d9541. This repo reports the following verify errors, most of which somehow link back to d29a273d9541 or cedc6b47df33:
$ hg verify checking changesets checking manifests manifest@?: rev 77019 points to unexpected changeset 77025 manifest@?: c985380b8c93 not in changesets manifest@?: rev 149560 points to unexpected changeset 149820 (expected 149822) manifest@?: rev 149561 points to unexpected changeset 149821 (expected 149823) manifest@?: rev 149562 points to unexpected changeset 149822 (expected 149824) manifest@?: rev 149563 points to unexpected changeset 149824 (expected 149825) manifest@?: rev 149564 points to unexpected changeset 149241 (expected 149826) crosschecking files in changesets and manifests checking files applemenu/src/org/netbeans/modules/applemenu/layer.xml@?: rev 12 points to unexpected changeset 149821 (expected 41473 .... 147698 149823) defaults/src/org/netbeans/modules/defaults/Eclipse-keybindings-mac.xml@?: rev 0 points to unexpected changeset 149821 (expected 149823) defaults/src/org/netbeans/modules/defaults/Eclipse-keybindings.xml@?: rev 25 points to unexpected changeset 149821 (expected 25730 .... 147698 149823) defaults/src/org/netbeans/modules/defaults/mf-layer.xml@?: rev 74 points to unexpected changeset 149821 (expected 25730 .... 147698 149823) etl.project/src/org/netbeans/modules/etl/project/msgs.properties@77025: b3e16bfc5fbc in manifests not found 117631 files, 150510 changesets, 588921 total revisions 9 warnings encountered! 12 integrity errors encountered! (first damaged changeset appears to be 77025)
The errors are visible in the following bogus output:
$ hg log -l1 -v applemenu/src/org/netbeans/modules/applemenu/layer.xml changeset: 149821:9cbf58bec660 user: Max Sauer <msauer@netbeans.org> date: Wed Oct 14 13:57:15 2009 +0200 files: editor.lib/src/org/netbeans/editor/Annotations.java description: #172685: NPE at org.netbeans.editor.Annotations.getAnnotation
In another repo where the linkrev is cedc6b47df33, there are fewer errors, all referring to an old corruption in etl.project:
checking changesets checking manifests manifest@?: rev 77023 points to unexpected changeset 77029 manifest@?: c985380b8c93 not in changesets crosschecking files in changesets and manifests checking files etl.project/src/org/netbeans/modules/etl/project/msgs.properties@77029: b3e16bfc5fbc in manifests not found 117594 files, 150470 changesets, 588795 total revisions 3 integrity errors encountered! (first damaged changeset appears to be 77029)
and this shows correct output for the abovementioned command:
$ hg log -l1 -v applemenu/src/org/netbeans/modules/applemenu/layer.xml changeset: 149796:2cd542ac6129 user: Vita Stejskal <vstejskal@netbeans.org> date: Tue Oct 13 16:42:52 2009 +0200 files: applemenu/src/org/netbeans/modules/applemenu/layer.xml .... description: #157325: fixing keybindings for rename (both in-place and full scale refactoring) actions
In a repo known to suffer from the pull problem (/hudson/workdir/jobs/python/workspace), debugindex initially showed nothing for 47098e67a01d. After hg pull -r cedc6b47df33, it showed
149496 1101500220 18600 149016 149756 47098e67a01d 105f357cc25b 1c584c823513
where 149756 is cedc6b47df33. At this point it seems possible to pull normally.
vstejskal created d29a273d9541 and cedc6b47df33 using Hg 1.3 on Mac OS X.
Resolution
Still no real idea what caused original error, though an interrupted Hg operation (fetch?) was probably involved.
Fortunately, no damage occurred to actual changesets, only the backward linkrevs in the repository's manifest. This means that the problem can be corrected on a particular repo clone while retaining identity of existing changesets.
Running the attached scripts corrects the new issues. A little cumbersome, but very quick once hg verify has been run.
Also, the old verify errors (from etl.project) can be corrected; just need to hg pull -r tip using a dev version of Hg (can then hg pull to get any remaining named branches if applicable).
contrib/shrink-revlog.py also reduces 00manifest.d size by 82%, and thus total .hg size by 43% - a substantial improvement. Beware that this can take many hours at 100% CPU (but little disk activity) to run to completion.
Attachments
