On 11/04/2012 06:14 AM, Daniel Shahaf wrote:

Index: subversion/svnadmin/main.c
===================================================================
--- subversion/svnadmin/main.c  (revision 1402414)
+++ subversion/svnadmin/main.c  (working copy)
@@ -738,6 +743,16 @@
                                          notify->warning_str));
        return;

+    case svn_repos_notify_failure:
+      if (notify->revision != SVN_INVALID_REVNUM)
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                          _("svnadmin: E%d: Error verifying 
revision %ld\n"),
-1 (layering violation).  Use svn_error_quick_wrap().

While you're at it, wrap to 80 columns.

Thanks  Daniel,

Now I have made something like

<snip>

* Verified revision 0.
* Verified revision 1.
* Verified revision 2.
* Error verifying revision 3.
svnadmin: E160004: Missing node-id in node-rev at r3 (offset 787)
* Error verifying revision 4.
svnadmin: E140001: zlib (uncompress): corrupt data: Decompression of svndiff 
data failed
* Verified revision 5.
svnadmin: E165005: Repository 'testrepo' failed to verify.

</snip>


I have used "* Error verifying revision x" instead of "svnadmin: Error verifying revision x" because when a revision is successfully verified we just say it as "* Verified revision x". I feel that this is a bit more consistent.

So that makes the code to look like,

<snip>

    case svn_repos_notify_failure:
      if (notify->revision != SVN_INVALID_REVNUM)
        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_("* Error verifying revision %ld.\n"),
                                          notify->revision));
       svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
                                     "svnadmin: ");

</snip>

I guess, this also solves the layer violation problem. Correct me if am wrong.


Regards
Prabhu

Reply via email to