verify: drop unnecessary check for nullid
In
eb914541a950 (verify: filter messages about missing null manifests
(
issue2900), 2011-07-13), we started ignoring nullid in the list of
manifest nodeids to check. Then, in
b32a30da608d (verify: do not choke
on valid changelog without manifest, 2012-08-21), we stopped adding
nullid to the list to start with. So let's drop the left-over check
now.
verify: move cross-checking of changeset/manifest out of _crosscheckfiles()
Reasons:
* _crosscheckfiles(), as the name suggests, is about checking that
the set of files files mentioned in changesets match the set of
files mentioned in the manifests.
* The "checking" in _crosscheckfiles() looked rather strange, as it
just emitted an error for *every* entry in mflinkrevs. The reason
was that these were the entries remaining after the call to
_verifymanifest(). Moving all the processing of mflinkrevs into
_verifymanifest() makes it much clearer that it's the remaining
entries that are a problem.
Functional change: progress is no longer reported for "crosschecking"
of missing manifest entries. Since the crosschecking phase takes a
tiny fraction of the verification, I don't think this is a
problem. Also, any reports of "changeset refers to unknown manifest"
will now come before "crosschecking files in changesets and
manifests".
tests: add tests for missing revlogs and revlog entries
The verify code is pretty poorly tested. It's easy to test missing
revlogs and missing revlog entries, so let's add tests for that.
Also add some more tests corrupting each type of revlog, so we test
the messages presented when reading a revision fails. The pure and
native implementations produce different error messages, so we have to
use (glob) in the tests.
hook: don't crash on syntax errors in python hooks
We had some real-world cases where syntax errors in Python hooks would crash
the whole process and leave it in an indeterminate state. Handle those better.
hook: for python hook exceptions, add note to run with --traceback
Just like with ImportErrors, it isn't obvious that --traceback will produce
helpful debugging output here.
hook: add tests for failing post- python hooks
I couldn't find any tests for this.
destutil: document various failure cases
We document what various conditional branch mean and clarify that they are
exclusive (since they all end up in with exception raised).