You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Paul Koning <pk...@equallogic.com> on 2005/09/20 14:11:14 UTC

Text files with embedded (solitary) control-M

I have a CVS repository that has a bunch of files with embedded
control-M (\r) characters.  Those aren't Mac OS 9 files; some are
Windows files and some are Unix files.  In some cases the \r seems to
be meaningless, in other cases it may be important.  In any case, I
don't want it converted to a newline.

I could mark all those files as binary with cvs admin, but that's not
really right, they aren't binary files but text files.

I could try to figure out how to get cvs2svn *not* to set
svn:eol-style=native on such files; that would leave the \r alone,
right?  But would it then at the SVN side make the files look like
binary files?

Or I could (somehow?) figure out how to change svn:eol-style=native so
it translates \r\n and \n but leaves standalone \r alone (since there
isn't any supported platform that uses those for line endings).

Which is the right answer, and why?

Thanks,
	paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Text files with embedded (solitary) control-M

Posted by Eric Hanchrow <of...@blarg.net>.
>>>>> "Paul" == Paul Koning <pk...@equallogic.com> writes:

    Paul> I have a CVS repository that has a bunch of files with
    Paul> embedded control-M (\r) characters.

    Paul> I could try to figure out how to get cvs2svn *not* to set
    Paul> svn:eol-style=native on such files; that would leave the \r
    Paul> alone, right?  But would it then at the SVN side make the
    Paul> files look like binary files?

I wouldn't think cvs2svn would mark those files with
svn:eol-style=native unless you asked it to.  But in any case, I think
it'd be best to indeed suppress that behavior (i.e., ensure that
cvs2svn does _not_ set that property).

But I don't know what you mean by "at the SVN side make the files look
like binary files"; I think you're afraid that the presence of the
carriage-return will somehow cause subversion to prevent you from
merging those files.  That's not the case; subversion will let you
merge just fine even if the files contain "binary" characters.  The
only thing that will make subversion treat a file as unmergeable is
the svn:mime-type (see
http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.2 )
 
-- 
Unix ... is not so much a product as it is a painstakingly compiled
oral history of the hacker subculture.  It is our Gilgamesh epic.
        -- Neal Stephenson


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Text files with embedded (solitary) control-M

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Tue, 20 Sep 2005 11:10:59 -0400, Paul Koning
<pk...@equallogic.com> wrote:

>Will Subversion then still do textual differences, or will it view the
>file as pure binary?

http://subversion.tigris.org/faq.html#binary-files

HTH,

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Text files with embedded (solitary) control-M

Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Tue, 2005-09-20 at 11:10 -0400, Paul Koning wrote:

> Will Subversion then still do textual differences, or will it view the
> file as pure binary?

I believe that the algorithm is that all files are considered text
unless there svn:mime-type starts with "application/".  On Un*x, the
diff operation considers control-M to be just another text character, so
it shows up in the output...

Dale



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Text files with embedded (solitary) control-M

Posted by Paul Koning <pk...@equallogic.com>.
>>>>> "Dale" == Dale R Worley <dw...@pingtel.com> writes:

 Dale> On Tue, 2005-09-20 at 10:11 -0400, Paul Koning wrote:
 >> I have a CVS repository that has a bunch of files with embedded
 >> control-M (\r) characters.  Those aren't Mac OS 9 files; some are
 >> Windows files and some are Unix files.  In some cases the \r seems
 >> to be meaningless, in other cases it may be important.  In any
 >> case, I don't want it converted to a newline.

 >> I could try to figure out how to get cvs2svn *not* to set
 >> svn:eol-style=native on such files; that would leave the \r alone,
 >> right?  But would it then at the SVN side make the files look like
 >> binary files?

 Dale> If you don't set the svn:eol-style property, Subversion won't
 Dale> mess with \r or \n in your file.  But I would worry about
 Dale> whether the conversion program will deal with CR correctly.

Will Subversion then still do textual differences, or will it view the
file as pure binary?

I think the conversion program won't touch the file content at all if
I tell it not to set svn:eol-style on those files -- if I can figure
out a clean way to do that.

    paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Text files with embedded (solitary) control-M

Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Tue, 2005-09-20 at 10:11 -0400, Paul Koning wrote:
> I have a CVS repository that has a bunch of files with embedded
> control-M (\r) characters.  Those aren't Mac OS 9 files; some are
> Windows files and some are Unix files.  In some cases the \r seems to
> be meaningless, in other cases it may be important.  In any case, I
> don't want it converted to a newline.

> I could try to figure out how to get cvs2svn *not* to set
> svn:eol-style=native on such files; that would leave the \r alone,
> right?  But would it then at the SVN side make the files look like
> binary files?

If you don't set the svn:eol-style property, Subversion won't mess with
\r or \n in your file.  But I would worry about whether the conversion
program will deal with CR correctly.

Dale



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org