You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2014/03/13 11:31:22 UTC

RE: svn commit: r1577082 - /subversion/trunk/subversion/tests/cmdline/special_tests.py


> -----Original Message-----
> From: philip@apache.org [mailto:philip@apache.org]
> Sent: donderdag 13 maart 2014 11:13
> To: commits@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.

	Bert 



Re: svn commit: r1577082 - /subversion/trunk/subversion/tests/cmdline/special_tests.py

Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:

> The WC-NG idea was to stop creating files for symlinks (aka special) and
> introduce a proper symlink type in the working copy (and via editor v2),
> which would still be handled via the special property trick on commit/update
> when using editor v1.

That's not what we have today.

> We never really supported multi line svn:special files or really anything
> except symlinks... and the idea back then was to never start supporting
> those cases either.

If the svn:special file has content that that does not represent a link
we chose to put an ordinary file containing the pristine content into
the working copy.  Given that choice it seems ridiculous for the file to
contain only part of the pristine content.  I think it is much more
sensible for the file to contain the whole content and I don't see how
that would cause a problem.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

RE: svn commit: r1577082 - /subversion/trunk/subversion/tests/cmdline/special_tests.py

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin@wandisco.com]
> Sent: donderdag 13 maart 2014 12:32
> To: Bert Huijben
> Cc: dev@subversion.apache.org
> Subject: Re: svn commit: r1577082 -
> /subversion/trunk/subversion/tests/cmdline/special_tests.py
> 
> "Bert Huijben" <be...@qqmail.nl> writes:
> 
> >> -----Original Message-----
> >> From: philip@apache.org [mailto:philip@apache.org]
> >> Sent: donderdag 13 maart 2014 11:13
> >> To: commits@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?

The WC-NG idea was to stop creating files for symlinks (aka special) and
introduce a proper symlink type in the working copy (and via editor v2),
which would still be handled via the special property trick on commit/update
when using editor v1.

We never really supported multi line svn:special files or really anything
except symlinks... and the idea back then was to never start supporting
those cases either.

	Bert


Re: svn commit: r1577082 - /subversion/trunk/subversion/tests/cmdline/special_tests.py

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> "Bert Huijben" <be...@qqmail.nl> writes:
>
>>> -----Original Message-----
>>> From: philip@apache.org [mailto:philip@apache.org]
>>> Sent: donderdag 13 maart 2014 11:13
>>> To: commits@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*

Re: svn commit: r1577082 - /subversion/trunk/subversion/tests/cmdline/special_tests.py

Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:

>> -----Original Message-----
>> From: philip@apache.org [mailto:philip@apache.org]
>> Sent: donderdag 13 maart 2014 11:13
>> To: commits@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?

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*