Damian Sinclair wrote:
>> So an "svn proplist -v <file>" in your working copy shows
>> both "svn:eol-style : native" and "svn:mime-type :
> The mime-type isn't set, the eol-style is. Seeing as all the operations
> outside of this one are working fine and the svn book's statement:
> "Unless otherwise noted using a versioned file's svn:mime-type property,
> Subversion assumes the file contains human-readable data.", Subversion
> seems happy to assume that these files are text seeing as they aren't
> set to be anything else. Is this viewpoint wrong?
I thought the mime-type was required but perhaps not. However, the
behavior you are seeing is definitely not the intended purpose so I'd be
interested in figuring out what the problem is and I think "working
around" it would be the wrong approach. I don't see how this can be a
problem with the vss2svn program but if it is we need to fix that
(although perhaps the new auto-props feature in that script would have
helped in your case).
If I add a file on Windows and don't set svn:eol-style, then check it
out on Linux, it has CRLF endings as expected. But if I then set
svn:eol-style to "native" on Linux and commit it, the line endings are
immediately changed to LF. At that point if I change anything in the
file then an "svn diff" correctly shows only my changes. This all works
whether I set the svn:eol-style during the first commit, or later on,
and regardless of which platform I actually set the property on.
Now, maybe I misunderstand how exactly "svn diff" works, but if it is
showing that every line has changed in your file, then either the file
itself has had its line endings changed, or its "pristine" copy in
.svn/text-base has had it changed. The latter should never happen but it
has to be one of the two. So at this point I would do the following:
1. Check out a WC with files where svn:eol-style is native.
2. Examine the file and its copy in .svn/text base with a hex editor to
make sure they both have the expected line ending.
3. Make a change to the WC file as usual.
4. Run "svn diff" and confirm that you are seeing the "incorrect"
behavior that every line is changed.
5. If it is showing that every line has changed as you describe, then
again examine the WC file and its copy in .svn/text-base using a hex
editor. One of the two has to have had its line endings changed.
If step #2 is failing (i.e. the line endings aren't "native" as they
should be) then it's a problem with the repository or its properties
somehow. If step #5 is failing then something else is changing the line
endings. At least then you will narrow down exactly where the problem is.
Received on Wed Jan 31 16:20:48 2007