Philip Martin <philip.mar...@wandisco.com> writes: > "Bert Huijben" <b...@qqmail.nl> writes: > >>> -----Original Message----- >>> From: phi...@apache.org [mailto:phi...@apache.org] >>> Sent: donderdag 13 maart 2014 11:13 >>> To: comm...@subversion.apache.org >>> Subject: svn commit: r1577082 - >>> /subversion/trunk/subversion/tests/cmdline/special_tests.py >>> >>> Author: philip >>> Date: Thu Mar 13 10:12:50 2014 >>> New Revision: 1577082 >>> >>> URL: http://svn.apache.org/r1577082 >>> Log: >>> Add an XFAIL regression test for issue 4479, multiline svn:special >>> truncated. >>> >>> * subversion/tests/cmdline/special_tests.py >>> (multiline_special): New test. >>> (test_list): Add new test. >> >> As far as I can tell we handled this limitation as 'as designed' when >> implementing WC-NG. >> >> I don't think this is something we can really 'fix', as older clients >> will just break things when they would find such a 'symlink'. >> >> The idea back then (ask gstein :-) was to move away from using a >> single magic property for this, if we ever wanted to support more >> 'special' files. > > If the pristine file for an svn:special is "foo\nbar\n" we currently > create a working file containing "foo". Irrespective of future changes > I think it would be better if the working file contained "foo\nbar\n". > Are you saying that is not a good idea? In what way will old clients > break?
This is fix I was intending. Are you saying this is a bad idea? Index: subversion/libsvn_subr/subst.c =================================================================== --- subversion/libsvn_subr/subst.c (revision 1577082) +++ subversion/libsvn_subr/subst.c (working copy) @@ -1713,23 +1713,27 @@ create_special_file_from_stream(svn_stream_t *sour } /* 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_stream_t *new_stream; + SVN_ERR(svn_io_open_unique_file3(&new_file, &dst_tmp, svn_dirent_dirname(dst, pool), svn_io_file_del_none, pool, pool)); + if (!eof) + svn_stringbuf_appendcstr(contents, "\n"); SVN_ERR(svn_io_file_write_full(new_file, contents->data, contents->len, NULL, pool)); - SVN_ERR(svn_io_file_close(new_file, pool)); + new_stream = svn_stream_from_aprfile2(new_file, FALSE, pool); + + SVN_ERR(svn_stream_copy3(svn_stream_disown(source, pool), new_stream, + NULL, NULL, pool)); } /* Do the atomic rename from our temporary location. */ Index: subversion/tests/cmdline/special_tests.py =================================================================== --- subversion/tests/cmdline/special_tests.py (revision 1577082) +++ subversion/tests/cmdline/special_tests.py (working copy) @@ -1222,7 +1222,6 @@ def incoming_symlink_changes(sbox): True) #---------------------------------------------------------------------- -@XFail() @Issue(4479) def multiline_special(sbox): "multiline file with svn:special" -- Philip Martin | Subversion Committer WANdisco // *Non-Stop Data*