[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Implement svnadmin verify --keep-going

From: Prabhu Gnana Sundar <prabhugs_at_collab.net>
Date: Fri, 14 Dec 2012 15:22:30 +0530

On 12/10/2012 08:15 PM, Julian Foad wrote:
> Prabhu Gnana Sundar
>
>> This patch is a follow up of the long discussion we had in thread [1]. This
>> patch implements a new switch "--keep-going" to svnadmin verify.
>>
>> If "--keep-going" is set(True), svnadmin verify would continue to run
>> till verifying all the revisions i.e, it would not stop at the very first
>> occurance of a corruption/error found in the repo and would report corruptions
>> wherever found.
>>
>>
>> I have worked on your suggestions and inputs for this patch. Kindly share your
>> thoughts. Attaching the patch and the log message with this mail.
> Thank you for the patch.
>
> Please will you summarize the issues that were raised in the previous discussion and how you have chosen to proceed. I'm thinking in particular of the discussion about how the output is notified -- how to display each error, on what output stream, and what to print at the end of the whole verification and what exit code to return. There may have been other issues too.

Thanks Julian,

Before this patch:
-----------------------

When we run svnadmin verify on a repo, the verification process would
stop once a failure/corruption is found. The error is notified via the
error stream and the exit code would be 1.
Upon successful verification of each revision of the repo "Verified
revision r" is also notified via the stderr stream and the exit code is 0.

Eg:

$ svnadmin verify
subversion/tests/cmdline/svn-test-work/repositories/svnadmin_tests-31
svnadmin: E200004: Could not convert '' into a number

After this patch:
---------------------

When we run svnadmin verify on a repo, the verification process would
stop once a failure/corruption is found. The error is notified via the
error stream and the exit code would be 1. The error stream would end as
"svnadmin: E165005: Repository 'reponame' failed to verify".
The behaviour is unchanged for successful verification.

When we run svnadmin verify --keep-going, the verification process
continues after detecting any failure/corruption. The failure is
reported for whichever revision it is found. The error message is
notified via the stderr stream. The successful verification of revisions
will also be reported via the stderr stream (no change in behaviour of
notifying success). The repo verification failure will be notified at
the end as "svnadmin: E165005: Repository 'reponame' failed to verify".
The exit code is 1.

Eg:

$ svnadmin verify
subversion/tests/cmdline/svn-test-work/repositories/svnadmin_tests-31
svnadmin: E200004: Could not convert '' into a number
svnadmin: E165005: Repository
'subversion/tests/cmdline/svn-test-work/repositories/svnadmin_tests-31'
failed to verify

$ svnadmin verify
subversion/tests/cmdline/svn-test-work/repositories/svnadmin_tests-31
--keep-going
* Verified revision 0.
* Verified revision 1.
* Verified revision 2.
* Verified revision 3.
* Verified revision 4.
* Verified revision 5.
* Error verifying revision 6.
svnadmin: E200004: Could not convert '' into a number
svnadmin: E165005: Repository
'subversion/tests/cmdline/svn-test-work/repositories/svnadmin_tests-31'
failed to verify

Earlier, Mike suggested to notify the errors in both stdout and stderr
stream so that they would be independently valuable to the user.
But I have not notified the errors on both the streams, rather only via
the stderr stream, because the error notification would appear twice for
each failure when the verification is run from the command line. Thoughts ?

Thanks and regards
Prabhu
Received on 2012-12-14 11:01:37 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.