You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2014/03/13 14:09:37 UTC
svn commit: r1577149 - in /subversion/trunk/subversion: libsvn_subr/subst.c
tests/cmdline/special_tests.py
Author: philip
Date: Thu Mar 13 13:09:37 2014
New Revision: 1577149
URL: http://svn.apache.org/r1577149
Log:
Fix issue 4479, multiline svn:special truncated.
* subversion/libsvn_subr/subst.c
(create_special_file_from_stream): Write out the whole file.
* subversion/tests/cmdline/special_tests.py
(multiline_special): Remove XFAIL.
Modified:
subversion/trunk/subversion/libsvn_subr/subst.c
subversion/trunk/subversion/tests/cmdline/special_tests.py
Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1577149&r1=1577148&r2=1577149&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Thu Mar 13 13:09:37 2014
@@ -1713,23 +1713,23 @@ create_special_file_from_stream(svn_stre
}
/* If nothing else worked, write out the internal representation to
- a file that can be edited by the user.
-
- ### this only writes the first line!
- */
+ a file that can be edited by the user. */
if (create_using_internal_representation)
{
- apr_file_t *new_file;
- SVN_ERR(svn_io_open_unique_file3(&new_file, &dst_tmp,
- svn_dirent_dirname(dst, pool),
- svn_io_file_del_none,
- pool, pool));
-
- SVN_ERR(svn_io_file_write_full(new_file,
- contents->data, contents->len, NULL,
- pool));
+ svn_stream_t *new_stream;
+ apr_size_t len;
- SVN_ERR(svn_io_file_close(new_file, pool));
+ SVN_ERR(svn_stream_open_unique(&new_stream, &dst_tmp,
+ svn_dirent_dirname(dst, pool),
+ svn_io_file_del_none,
+ pool, pool));
+
+ if (!eof)
+ svn_stringbuf_appendcstr(contents, "\n");
+ len = contents->len;
+ SVN_ERR(svn_stream_write(new_stream, contents->data, &len));
+ SVN_ERR(svn_stream_copy3(svn_stream_disown(source, pool), new_stream,
+ NULL, NULL, pool));
}
/* Do the atomic rename from our temporary location. */
Modified: subversion/trunk/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/special_tests.py?rev=1577149&r1=1577148&r2=1577149&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/special_tests.py Thu Mar 13 13:09:37 2014
@@ -1222,7 +1222,6 @@ def incoming_symlink_changes(sbox):
True)
#----------------------------------------------------------------------
-@XFail()
@Issue(4479)
def multiline_special(sbox):
"multiline file with svn:special"