Here is the next attempt at a patch for Issue 1074 (Need a svnadmin command to
verify that the repository is not corrupted).
There were a couple of things I was unsure about. I went ahead and added
subcommand_verify to svnadmin, but it really calls subcommand_dump after
setting a couple of options.
It sets one new one called 'verify' so that the dump command knows to create a
NULL dumpstream. Is it okay to have this 'verify' option in opt_state, or
should I find a different way to do this?
I also set the incremental option. Since we're walking through the entire
repository, I didn't feel it was necessary to have it create the full-text at
every revision. Any problems with doing this?
Finally, write_revision_record does just about nothing if the dumpstream is
NULL (it only fetches the revision props). The only reason I had for not
preventing the call from taking place at all is because I wasn't entirely
sure that the properties would be read in and checked otherwise.
C-Mike, I've cc'd you on this because you seem to be my patch reviewer/mentor
for this issue. :-)
-John
-------------------------
Resolves Issue #1074 (Need a svnadmin command to verify that the repository
is not corrupted).
* subversion/svnadmin/main.c
(subcommand_dump): Now checks opt_state for verify flag and creates a NULL
dumpstream when set.
(subcommand_verify): Added new function to verify the data stored in the
repository.
* subversion/libsvn_repos/dump.c
(dump_node, write_revision_record, svn_repos_dump_fs): Added checks for a
NULL dumpstream before outputting to help support verification.
(svn_repos_dump_fs): In the case that dumpstream is NULL, changed the
feedback stream output to say "Verified revision" instead of "Dumped
revision"
* subversion/include/svn_repos.h
(svn_repos_dump_fs): Modified docstring to reflect the acceptance of a NULL
dumpstream.
-------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Aug 23 15:48:37 2003