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

svn does not detect file recodings as changes

From: Lukas Reck <dasluq_at_gmail.com>
Date: 2007-02-18 17:22:46 CET

Hello

I recently had to recode some files under svn version control and I
had to go through some pains to commit the changes to the
repository...

Case in point:

lukas@hp-pv2000 ~/playground $ svnadmin create repo
lukas_at_hp-pv2000 ~/playground $ svn co file:///home/lukas/playground/repo wc
Checked out revision 0.
lukas@hp-pv2000 ~/playground $ echo -e '\xc3\xa9toile' > wc/testfile #
Some UTF-8 encoded text
lukas@hp-pv2000 ~/playground $ file wc/testfile # Verify the encoding
wc/testfile: UTF-8 Unicode text
lukas@hp-pv2000 ~/playground $ svn add wc/testfile && svn ci wc -m
'Added UTF-8 encoded test file'
A wc/testfile
Adding wc/testfile
Transmitting file data .
Committed revision 1.
lukas@hp-pv2000 ~/playground $ recode utf8..latin1 wc/testfile # now recode it
lukas@hp-pv2000 ~/playground $ file wc/testfile # Verify the encoding
wc/testfile: DOS executable (COM)
lukas@hp-pv2000 ~/playground $ svn status wc # the file has changed,
but svn does not see it!
lukas@hp-pv2000 ~/playground $ svn ci wc -m'Recoded testfile' # I
can't even check it in
lukas@hp-pv2000 ~/playground $ svn co
file:///home/lukas/playground/repo wc2 # And if I chack it out again
A wc2/testfile
Checked out revision 1.
lukas@hp-pv2000 ~/playground $ file wc2/testfile # it still is encoded in UTF-8
wc2/testfile: UTF-8 Unicode text

Seeing how svn's diff algorithm tries to be smarter than I am is
annoying. If this is a feature, the documentation should mention it,
and provide a workaround.

regards

Lukas Reck

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Feb 18 19:04:08 2007

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

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