You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Hanson <mb...@gmail.com> on 2010/07/21 15:37:25 UTC

--native-eol setting not applied to externals?

I have a set of source code containing a some svn:externals references to other repositories.  In each group of code, there are text files marked with the svn:eol-style property, value: native.

If I export all the source without using --native-eol on Windows or UNIX, the text files are all in the expected format (CRLF or LF, respectively).

If I export all the source on Windows, using the --native-eol LF option, the text files in the non-external area are correctly in UNIX LF format.  The text files in the external areas are in the native Windows CRLF format.  Apparently the --native-eol setting is not applied to the source in the external areas.

If I export all the source on UNIX, using the --native-eol CRLF option, the same problem occurs in reverse.  The non-external text files are correctly in Windows CRLF format, and the external text files are in the native LF format.

I think the expected behavior should be to have all the source (main and external) exported in the format specified with the --native-eol option.

As a workaround, we are currently exporting the externals separately, with the appropriate --native-eol option, after exporting the main source with the --ignore-externals option.  This works as expected.

The versions of client and servers are all >= 1.6.5.

Can anyone confirm?

Thanks,
Mark

Re: --native-eol setting not applied to externals?

Posted by Mark Hanson <mb...@gmail.com>.
On Thu, Jul 22, 2010 at 7:41 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Mark Hanson wrote on Thu, Jul 22, 2010 at 07:25:58 -0700:
>> + file exp/foo.txt exp/repo2/foo.txt
>> exp/foo.txt:       ASCII text, with CRLF line terminators
>> exp/repo2/foo.txt: ASCII text
>>
>> Does this reproduce with the trunk?
>
> Yes, I get the same output with trunk.

Thanks, I'll report it to the dev list.

>> #!/bin/sh -x
>> mkdir scratch; cd scratch
>
> Need to check if it exists before the mkdir.

Yeah, I didn't want to spend my morning making a trivial bug
reproduction script production quality.  Sorry.

Re: --native-eol setting not applied to externals?

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Mark Hanson wrote on Thu, Jul 22, 2010 at 07:25:58 -0700:
> + file exp/foo.txt exp/repo2/foo.txt
> exp/foo.txt:       ASCII text, with CRLF line terminators
> exp/repo2/foo.txt: ASCII text
> 
> Does this reproduce with the trunk?

Yes, I get the same output with trunk.

> #!/bin/sh -x
> mkdir scratch; cd scratch

Need to check if it exists before the mkdir.

Re: --native-eol setting not applied to externals?

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Mark Hanson wrote on Thu, Jul 22, 2010 at 07:25:58 -0700:
> + file exp/foo.txt exp/repo2/foo.txt
> exp/foo.txt:       ASCII text, with CRLF line terminators
> exp/repo2/foo.txt: ASCII text
> 
> Does this reproduce with the trunk?

Yes, I get the same output with trunk.

> #!/bin/sh -x
> mkdir scratch; cd scratch

Need to check if it exists before the mkdir.

Re: --native-eol setting not applied to externals?

Posted by Mark Hanson <mb...@gmail.com>.
On Wed, Jul 21, 2010 at 11:03 PM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Mark Hanson wrote on Wed, Jul 21, 2010 at 08:37:25 -0700:
>> Can anyone confirm?
>
> No.  Using July 18 trunk, both with file externals and directory externals, an
> exported file with svn:eol-style=native has the --native-eol end-of-lines in the
> export.
>
> I used the 'svn export --native-eol=foo WC WC' syntax.

Here's a script that reproduces the problem on UNIX with 1.6.12.  The
output I get is:

+ file exp/foo.txt exp/repo2/foo.txt
exp/foo.txt:       ASCII text, with CRLF line terminators
exp/repo2/foo.txt: ASCII text

Does this reproduce with the trunk?  Was this a known problem that has
been fixed?

#!/bin/sh -x
mkdir scratch; cd scratch
svnadmin create /tmp/repo1
svnadmin create /tmp/repo2
svn co file:///tmp/repo1 repo1
svn co file:///tmp/repo2 repo2
(echo "this is a"; echo "text file") > foo.txt
cp foo.txt repo1
cp foo.txt repo2
svn add repo1/foo.txt
svn add repo2/foo.txt
svn ps svn:eol-style native repo1/foo.txt
svn ps svn:eol-style native repo2/foo.txt
svn ps svn:externals 'file:///tmp/repo2 repo2' repo1
svn commit -m 'add text file and svn:externals' repo1
svn commit -m 'add text file' repo2
svn export --native-eol CRLF file:///tmp/repo1 exp
file exp/foo.txt exp/repo2/foo.txt

Re: --native-eol setting not applied to externals?

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Mark Hanson wrote on Wed, Jul 21, 2010 at 08:37:25 -0700:
> I have a set of source code containing a some svn:externals references to
> other repositories.  In each group of code, there are text files marked with
> the svn:eol-style property, value: native.
> 
> If I export all the source without using --native-eol on Windows or UNIX, the
> text files are all in the expected format (CRLF or LF, respectively).
> 
> If I export all the source on Windows, using the --native-eol LF option, the
> text files in the non-external area are correctly in UNIX LF format.  The
> text files in the external areas are in the native Windows CRLF format.
> Apparently the --native-eol setting is not applied to the source in the
> external areas.
> 
> If I export all the source on UNIX, using the --native-eol CRLF option, the
> same problem occurs in reverse.  The non-external text files are correctly in
> Windows CRLF format, and the external text files are in the native LF format.
> 
> I think the expected behavior should be to have all the source (main and
> external) exported in the format specified with the --native-eol option.
> 
> As a workaround, we are currently exporting the externals separately, with
> the appropriate --native-eol option, after exporting the main source with the
> --ignore-externals option.  This works as expected.
> 
> The versions of client and servers are all >= 1.6.5.
> 
> Can anyone confirm?
> 

No.  Using July 18 trunk, both with file externals and directory externals, an
exported file with svn:eol-style=native has the --native-eol end-of-lines in the
export.

I used the 'svn export --native-eol=foo WC WC' syntax.

> Thanks, Mark
>