You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Mohr <da...@mcbf.net> on 2004/11/03 18:10:59 UTC

Conflict marker places Unix line endings in DOS file under Linux

Hi,
I was working on a file with DOS line endings under Linux and then there
was a conflict in a commit, so subversion placed the conflict markers
into the file. However, I assume since I was using Linux, it placed the
conflict markers with Unix line endings, which made the line endings in
the file inconsistent.
This bug is of course not hard to work around, as I assume will delete
the conflict markers before the next commit, so the line endings will be
sane again. But still, it's a small bug. Should I submit this somewhere?
I could not find a way to submit issues on the web page.

Bye,
David

P.S. Please CC me since I'm not subscribed to the list.


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

Re: Conflict marker places Unix line endings in DOS file under Linux

Posted by David Mohr <da...@mcbf.net>.
On Fri, 2004-11-05 at 12:41 -0600, Ben Collins-Sussman wrote:
> On Nov 5, 2004, at 9:29 AM, kfogel@collab.net wrote:
> 
> > David Mohr <da...@mcbf.net> writes:
> >> I was working on a file with DOS line endings under Linux and then 
> >> there
> >> was a conflict in a commit, so subversion placed the conflict markers
> >> into the file. However, I assume since I was using Linux, it placed 
> >> the
> >> conflict markers with Unix line endings, which made the line endings 
> >> in
> >> the file inconsistent.
> >> This bug is of course not hard to work around, as I assume will delete
> >> the conflict markers before the next commit, so the line endings will 
> >> be
> >> sane again. But still, it's a small bug. Should I submit this 
> >> somewhere?
> >> I could not find a way to submit issues on the web page.
> >
> > If you have an account at subversion.tigris.org, with 'observer' role,
> > then you can create issues, following the guidelines at
> >
> >    http://subversion.tigris.org/project_issues.html
> >
> > If you could write a small script to demonstrate this bug (a
> > reproduction recipe) that would be very helpful.  Just attach it to
> > the new issue.
> >
> 
> I really wonder if it's a bug, though.
> 
> At the moment, I think you're right:  svn is using APR_EOL for 
> conflict-marker line endings, which is automatically defined by APR to 
> be the native line ending for whatever OS you happen to be using at the 
> moment.
> 
> The only way svn could be "smarter" here is to scan the entire file, 
> notice what the line-endings are, and then decide to use those same 
> line-endings for conflict markers.  But that's an awfully expensive 
> operation.  (And what if the file has inconsistent line endings?)
> 
> It makes me ask:  why aren't using the svn:eol-style property?  I'm 
> willing to bet that if "svn:eol-style" were set to "CRLF", then the 
> conflict markers would use CRLF also.

OK, that's exactly why I sent this to the user's list instead of
immediately trying to open up a bug :-). Thanks for the advice, seems to
be the solution to the problem. Hmm, I should've RTFM first, it's not
even that hidden in the book...

~David


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

Re: Conflict marker places Unix line endings in DOS file under Linux

Posted by Ben Collins-Sussman <su...@collab.net>.
On Nov 5, 2004, at 9:29 AM, kfogel@collab.net wrote:

> David Mohr <da...@mcbf.net> writes:
>> I was working on a file with DOS line endings under Linux and then 
>> there
>> was a conflict in a commit, so subversion placed the conflict markers
>> into the file. However, I assume since I was using Linux, it placed 
>> the
>> conflict markers with Unix line endings, which made the line endings 
>> in
>> the file inconsistent.
>> This bug is of course not hard to work around, as I assume will delete
>> the conflict markers before the next commit, so the line endings will 
>> be
>> sane again. But still, it's a small bug. Should I submit this 
>> somewhere?
>> I could not find a way to submit issues on the web page.
>
> If you have an account at subversion.tigris.org, with 'observer' role,
> then you can create issues, following the guidelines at
>
>    http://subversion.tigris.org/project_issues.html
>
> If you could write a small script to demonstrate this bug (a
> reproduction recipe) that would be very helpful.  Just attach it to
> the new issue.
>

I really wonder if it's a bug, though.

At the moment, I think you're right:  svn is using APR_EOL for 
conflict-marker line endings, which is automatically defined by APR to 
be the native line ending for whatever OS you happen to be using at the 
moment.

The only way svn could be "smarter" here is to scan the entire file, 
notice what the line-endings are, and then decide to use those same 
line-endings for conflict markers.  But that's an awfully expensive 
operation.  (And what if the file has inconsistent line endings?)

It makes me ask:  why aren't using the svn:eol-style property?  I'm 
willing to bet that if "svn:eol-style" were set to "CRLF", then the 
conflict markers would use CRLF also.


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

Re: Conflict marker places Unix line endings in DOS file under Linux

Posted by kf...@collab.net.
David Mohr <da...@mcbf.net> writes:
> I was working on a file with DOS line endings under Linux and then there
> was a conflict in a commit, so subversion placed the conflict markers
> into the file. However, I assume since I was using Linux, it placed the
> conflict markers with Unix line endings, which made the line endings in
> the file inconsistent.
> This bug is of course not hard to work around, as I assume will delete
> the conflict markers before the next commit, so the line endings will be
> sane again. But still, it's a small bug. Should I submit this somewhere?
> I could not find a way to submit issues on the web page.

If you have an account at subversion.tigris.org, with 'observer' role,
then you can create issues, following the guidelines at

   http://subversion.tigris.org/project_issues.html

If you could write a small script to demonstrate this bug (a
reproduction recipe) that would be very helpful.  Just attach it to
the new issue.

Thanks,
-Karl

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