You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Corey Jewett <cj...@mobliss.com> on 2005/07/27 16:03:05 UTC

Bug? v1.1.4 line return modifications go unnoticed when svn:eol-style is set.

Quick History:
   Workplace recently converted repository from cvs to svn, not sure 
which program was used for conversion. We (shamefully) had a lot of 
images tagged as text and didn't perform any kind of preflight test. So 
now I'm trying to repair an image that seems to have been corrupted by 
the svn changeover since it was not flagged as binary.

Issue:
   Modifying the file's line returns seems to go unnoticed by svn 
revert, status, update, and commit even though the file's checksum is 
different.

Once blowing away all the properties, svn started to recognize the 
different file. Somebody here pointed out that setting the 
svn:mime-type to octet-stream might have also helped, but that would be 
a workaround.

Apparently a file being flagged with svn:eol-style has deeper impact on 
svn than the manual and FAQ appreciate.

Shell transcript below.

Corey


$ md5 header.jpg
MD5 (header.jpg) = b3edbfbd41c71ca0ca46b49ca1632680

$ perl -pi -e 's|\n|\r|g' header.jpg

$ md5 header.jpg
MD5 (header.jpg) = 18e871e06c2ce2c6309b15a6ee51501d

$ svn status

$ svn up
At revision 28449.

$ svn commit

$ md5 header.jpg
MD5 (header.jpg) = 18e871e06c2ce2c6309b15a6ee51501d

$ svn status

$ svn revert header.jpg

$ md5 header.jpg
MD5 (header.jpg) = 18e871e06c2ce2c6309b15a6ee51501d

$ rm header.jpg

$ svn up
Restored 'header.jpg'
At revision 28449.

$ md5 header.jpg
MD5 (header.jpg) = b3edbfbd41c71ca0ca46b49ca1632680

$ svn proplist

$ svn proplist header.jpg
Properties on 'header.jpg':
   svn:executable
   svn:keywords
   svn:eol-style

$ svn propdel svn:executable header.jpg
property 'svn:executable' deleted from 'header.jpg'.

$ svn propdel svn:keywords header.jpg
property 'svn:keywords' deleted from 'header.jpg'.

$ svn propdel svn:eol-style header.jpg
property 'svn:eol-style' deleted from 'header.jpg'.

$ svn commit header.jpg -m 'nuked bad props'
Sending        header.jpg

Committed revision 28450.

$ perl -pi -e 's|\n|\r|g' header.jpg

$ svn status
M      header.jpg

$ md5 header.jpg
MD5 (header.jpg) = 18e871e06c2ce2c6309b15a6ee51501d

$ svn revert header.jpg
Reverted 'header.jpg'

$ md5 header.jpg
MD5 (header.jpg) = b3edbfbd41c71ca0ca46b49ca1632680

$ svn proplist header.jpg

$ svn --version
svn, version 1.1.4 (r13838)
    compiled Jun 30 2005, 11:45:36


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

Re: Bug? v1.1.4 line return modifications go unnoticed when svn:eol-style is set.

Posted by Corey Jewett <cj...@mobliss.com>.
The documentation suggestion you've provided would be perfect. 
"svn:eol-style is like a box of chocolates."

Thanks for the help and quick responses.

Corey


On Jul 27, 2005, at 9:24 AM, Ben Collins-Sussman wrote:

>
> On Jul 27, 2005, at 11:15 AM, Corey Jewett wrote:
>
>> Meaning this is not a bug, but rather an esoteric issue I've 
>> overlooked in the documentation?
>>
>
> I'm not sure it's appropriate for the documentation to go into 
> technical implementation details.
>
> At the moment, the documentation says:  "set svn:eol-style, and then 
> svn will magically do the Right Thing."   In this case, you've set 
> svn:eol-style erroneously, and now the magical Right Thing is causing 
> behaviors you didn't expect.  There's no way to explain exactly *what* 
> to expect in this situation, without going into confusing 
> implementation details.  Perhaps the documentation might should simply 
> warn?  Something like:
>
> "Once you put Subversion in charge of managing line-endings, any 
> changes you make to line endings will be potentially lost or 
> unnoticed."
>
> ?
>


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

Re: Bug? v1.1.4 line return modifications go unnoticed when svn:eol-style is set.

Posted by Ben Collins-Sussman <su...@collab.net>.
On Jul 27, 2005, at 11:15 AM, Corey Jewett wrote:

> Meaning this is not a bug, but rather an esoteric issue I've  
> overlooked in the documentation?
>

I'm not sure it's appropriate for the documentation to go into  
technical implementation details.

At the moment, the documentation says:  "set svn:eol-style, and then  
svn will magically do the Right Thing."   In this case, you've set  
svn:eol-style erroneously, and now the magical Right Thing is causing  
behaviors you didn't expect.  There's no way to explain exactly  
*what* to expect in this situation, without going into confusing  
implementation details.  Perhaps the documentation might should  
simply warn?  Something like:

"Once you put Subversion in charge of managing line-endings, any  
changes you make to line endings will be potentially lost or unnoticed."

?


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

Re: Bug? v1.1.4 line return modifications go unnoticed when svn:eol-style is set.

Posted by Corey Jewett <cj...@mobliss.com>.
Meaning this is not a bug, but rather an esoteric issue I've overlooked 
in the documentation?

Corey


On Jul 27, 2005, at 9:10 AM, Ben Collins-Sussman wrote:

>
> On Jul 27, 2005, at 11:03 AM, Corey Jewett wrote:
>>
>> Apparently a file being flagged with svn:eol-style has deeper impact 
>> on svn than the manual and FAQ appreciate.
>>
>
> Yes, it causes subversion to assume that the repository file (and 
> .svn/text-base/) have specific 'canonicalized' line endings.  All of 
> the svn commands 'detranslate' the working file into the canonicalized 
> line endings before comparing with the text-base, so any modifications 
> you make to line-endings might be lost in the comparison operation.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>


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

Re: Bug? v1.1.4 line return modifications go unnoticed when svn:eol-style is set.

Posted by Ben Collins-Sussman <su...@collab.net>.
On Jul 27, 2005, at 11:03 AM, Corey Jewett wrote:
>
> Apparently a file being flagged with svn:eol-style has deeper  
> impact on svn than the manual and FAQ appreciate.
>

Yes, it causes subversion to assume that the repository file  
(and .svn/text-base/) have specific 'canonicalized' line endings.   
All of the svn commands 'detranslate' the working file into the  
canonicalized line endings before comparing with the text-base, so  
any modifications you make to line-endings might be lost in the  
comparison operation.


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