Philip Martin <philip.martin_at_wandisco.com> writes:
> "Bert Huijben" <bert_at_qqmail.nl> writes:
>>> -----Original Message-----
>>> From: philip_at_apache.org [mailto:philip_at_apache.org]
>>> Sent: donderdag 13 maart 2014 11:13
>>> To: commits_at_subversion.apache.org
>>> Subject: svn commit: r1577082 -
>>> Author: philip
>>> Date: Thu Mar 13 10:12:50 2014
>>> New Revision: 1577082
>>> URL: http://svn.apache.org/r1577082
>>> 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
This is fix I was intending. Are you saying this is a bad idea?
--- 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. */
+ svn_stream_t *new_stream;
+ if (!eof)
+ svn_stringbuf_appendcstr(contents, "\n");
contents->data, contents->len, NULL,
- 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. */
--- 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):
"multiline file with svn:special"
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2014-03-13 12:40:52 CET