[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: ghudson's 'svn st' problem he mentioned on IRC...

From: <kfogel_at_collab.net>
Date: 2003-12-30 17:04:02 CET

> Thinking out loud here:
> One possibility is that there used to be a bug which caused the files
> to be stored incorrectly (LF, say, instead of CRLF) even after the
> svn:eol-style was set to CRLF. If our working copy code correctly
> translates ("repairs") LF->CRLF, but is sensitive enough to *not*
> convert CRLF->CRCRLF, then these old, wrongly stored files would still
> get correct working files on the client side, but their text bases
> would be messed up. Investigating...

If the 'repair' parameter to svn_subst_translate_stream() is true,
then we'll get the sensitive behavior described above. Walking up
relevant callers, this maps to the 'repair' parameter of
svn_subst_copy_and_translate(). And the two relevant callers of that


...which, at least on first glance, both pass true for 'repair' where
it matters. (See the 'style == svn_subst_eol_style_fixed' case of the
latter, for example.)

However, even doing a checkout now, instead of an update, doesn't
reproduce the bug in the obvious recipe. In the script included
below, the two 'ls's below print 18 bytes and 19 bytes respectively.

So my initial diagnosis is: we used to have a bug, whereby something's
eol-style could get set yet its content wouldn't be immediately
translated. But due to the the repair behavior, this bug was never
visible in the working file. And now, the bug seems to be gone, at
least judging by the results of the script below. (It seems we
encountered something similar before, see Philip's commit of r7597).

The thing that bothers me is, I can't find the commit where we fixed
this bug, if that's what it was. There's evidence in our repository
that it once existed, but we can't see it now, yet there's no record
of its disappearance. (This must be how it feels to be a



rm -rf repos wc

svnadmin create repos


svn co ${URL}/ wc

cd wc
echo "This is fish.txt." > fish.txt
svn add fish.txt
svn ci -m "Adding fish.txt." fish.txt

echo "Size of fish.txt before eol set to CRLF:"
echo ""
ls -l fish.txt
echo ""

svn propset svn:eol-style CRLF fish.txt
svn ci -m "Setting eol to CRLF." fish.txt

cd ..

rm -rf wc

svn co ${URL}/ wc

cd wc

echo "Size of fish.txt after eol set to CRLF:"
echo ""
ls -l fish.txt
echo ""

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 30 17:56:02 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.