svn commit: r1930381 - subversion/trunk/subversion/libsvn_subr

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <176527925929.2650364.16995539400002395357@svn02-us-east.apache.org>
Author: stsp
Date: Tue Dec  9 11:20:57 2025
New Revision: 1930381

Log:
Fix wrong line numbers displayed in syntax errors from the config file parser.

Found with an authz file which contains invalid option lines, where the
username before the equal sign was just whitespace for some reason: " = r"

This triggered the error: svnauthz: E200002: line XYZ: Option expected
Where XYZ was the number of an earlier line with correct syntax, leaving
the user rather confused.

* subversion/libsvn_subr/config_file.c
  (svn_config__parse_stream): Do not forget to count lines which open
    a new section. Otherwise, line numbers shown in error messages
    from this parser will be wrong.

Modified:
   subversion/trunk/subversion/libsvn_subr/config_file.c

Modified: subversion/trunk/subversion/libsvn_subr/config_file.c
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/config_file.c	Tue Dec  9 09:05:33 2025	(r1930380)
+++ subversion/trunk/subversion/libsvn_subr/config_file.c	Tue Dec  9 11:20:57 2025	(r1930381)
@@ -807,6 +807,7 @@ svn_config__parse_stream(svn_stream_t *s
           SVN_ERR(open_section(ctx, &stop));
           if (stop)
             return SVN_NO_ERROR;
+          ++(ctx->line);
           break;
 
         case '#':               /* Comment */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.