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

Re: svn commit: r1877712 - in /subversion/trunk/subversion/tests/cmdline: entries-dump.c svntest/main.py

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 14 May 2020 13:55:43 +0000

futatuki_at_apache.org wrote on Thu, 14 May 2020 01:46 -0000:
> Log:
> Use safe bytes literals when set string values in working copy entries.

If someone reads this log message in a year, I don't think it'd be clear
to them what the problem being fixed was. I think it would be useful to
be more specific about the circumstances; for example:

    entries-dump: Escape string-typed attribute values when serializing
    them as Python string literals.

    Before this commit, a filesystem node named «foo\bar» (a single,
    7-character path component) would cause «e.name = 'foo\bar'» to be
    emitted. The unescaped backslash would manifest as a test failure or
    a SyntaxError, depending on the following characters.

    This was triggered by svnadmin_tests 42 verify_metadata_only under
    Python 3 on Windows.

The reference to "svnadmin_tests 42 verify_metadata_only" is only
a placeholder, to be replaced by the correct reference.

I specifically used the term "filesystem node" to clarify that «foo\bar»
was to be taken as an svn_fspath__* path (where backslash has no
special meaning), as opposed to, say, an svn_dirent_* path (where
backslash is a delimiter on Windows).

> * subversion/tests/cmdline/entries-dump.c
> (print_prefix): New function.
> (str_value):
> - Add argument to specify pool.
> - Print human readable value of "value" as is in comment, then set it
> as str value by using hex escaped bytes literal.
> (entries_dump): Add pool argument to str_value() calls.
> (main):
> - Print "Entry" class definition as prefix before entry_dump() or tree_dump()
> - Style fix on if statement (using blocks).
> (): Add include files for assert() and svn_xml_escape_attr_cstring()
> * subversion/tests/cmdline/svntest/main.py
> (run_entiresdump, run_entriesdump_tree): Move definition of "Entry" class
> into generated code by entries-dump execution.
> Review By: danielsh

For future reference, the "${Verb}ed by" phrases in log messages are

    tools/dev/contribulyze.py:521:field_re = re.compile(
    tools/dev/contribulyze.py:522: '^(Patch|Review(ed)?|Suggested|Found|Inspired|Tested|Reported) by:'
    tools/dev/contribulyze.py:523: '\s*\S.*$')
    tools/dev/contribulyze.py:566: m = field_re.match(line)
    tools/dev/contribulyze.py:604: m = field_re.match(line)

This doesn't matter in this case, of course, since the person being
credited is already a full committer; however, when crediting people who
aren't already full committers, the correct case form should be used so
the regexp matches and the contribulyzer pages are updated. (Unless we
change the script)


Received on 2020-05-14 15:55:52 CEST

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