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

Re: [PATCH] extend svn_subst_translate_string() to record whether re-encoding and/or line ending translation were performed (v. 5)

From: Danny Trebbien <dtrebbien_at_gmail.com>
Date: Fri, 10 Dec 2010 10:43:30 -0800

> Thanks, Danny.
> This looks fine.
> I added doc strings to the new static functions stream_translated() and
> translate_cstring().  I clarified in all doc strings whether
> TRANSLATED_EOL is set to FALSE or untouched if there is no translation.
> (In some cases you documented these more in the log message than in the
> code :-)
> Just about to commit this ... FAIL: autoprop_tests.py 15, blame_tests.py
> 7, commit_tests.py 40, ...
> subst.c' line 668: assertion failed (STRING_IS_EOL(eol_str,
> eol_str_len))
> Whassup?  Attaching my version, as I'm out of time tonight.  Hope I
> didn't mess it up.  I was testing trunk_at_1042741 (patched as attached),
> svnserve and FSFS, in case it matters.
> Cheers,
> - Julian

Attached is version 5 of the patch. It incorporates your changes,
Julian, as well as a fix for the problem that was causing several of
the tests to fail.

In investigating why one of the autoprop tests failed, I discovered
that the EOL_STR was an empty string rather than one of the standard
end-of-line strings. I didn't expect this. However, tracing the source
of EOL_STR backward, I realized that EOL_STR can be anything because
some of the public libsvn_subr routines pass a C-string parameter
directly to the EOL_STR field of the translation baton. I therefore
changed the code slightly so that translate_newline() does not rely on
EOL_STR being a standard end-of-line string:

Received on 2010-12-10 19:44:07 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.