Implement svn_repos_verify_fs and use it in svnadmin verify rather
than using svn_repos_dump_fs2, restoring complete verification after
losing it in r24559.
In r24559, I changed verify's use of svn_repos_dump_fs2 to dump only
the paths changed in the revision being dumped rather than dumping the
entire repository as of that revision. Without r24559, verifying
large repositories is effectively impossible. But without dumping the
entire repository contents, we were no longer verifying the links back
to previous revisions for the paths *not* changed in the revision
being verified.
* subversion/libsvn_fs_fs/fs_fs.c
(svn_fs_fs__get_node_revision): Check that the HEADER_ID field is
actually in the node-rev header block; all other fields are
already checked, only this one was not. This led to a segmentation
fault in the particular corrupted revs file I created, as I simply
incremented an offset, resulting in a "d" header but no "id" header.
* subversion/libsvn_repos/dump.c
(verify_directory_entry): Add function that does a simple check that
a directory entry is valid (svn_fs_dir_entries for directories and
svn_fs_file_length for files).
(verify_close_directory): Add svn_delta_editor_t.close_directory
implementation that verify_directory_entry()s each entry.
(svn_repos_verify_fs): Add new function to verify a file system,
mostly by invoking svn_repos_replay2 with the dump editor, but
with the additional check of verify_close_directory.
* subversion/include/svn_repos.h
(svn_repos_verify_fs): Declare.
(svn_repos_dump_fs2): Change doc string to point to
svn_repos_verify_fs for verifying a file system.
* subversion/svnadmin/main.c
(dump_repo): Remove.
(subcommand_dump): Fold dump_repo body into here.
(subcommand_verify): Use svn_repos_verify_fs rather than dump_repo.
* subversion/tests/cmdline/svnadmin_tests.py
(verify_incremental_fsfs): Add test that corrupts a revision file in
a way that svn_repos_dump_fs2 cannot detect and asserts that
svnadmin verify detects it.
git-svn-id: http://svn.collab.net/repos/svn/trunk@29329 612f8ebc-c883-4be0-9ee0-a4e9ef946e3a