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

[TSVN] Propset CRCRLF crash

From: Nathan Kidd <nathan-svn_at_spicycrypto.ca>
Date: 2004-11-19 23:16:16 CET

Summary:
========
Tortoise will crash (taking explorer.exe down with it) when a property
value with a CRCRLF (0x0D 0x0D 0x0A) is entered and the user clicks
"Set". Happens consistently for me on two different machines, running
W2K SP4, TSVN 1.1.1.

How could such contorted line endings exist? Below is how it happend to me.

Procedure:
==========

[in any working copy, on any existing directory]

1. Add at least two lines to e.g. svn:ignore on directory foo
2. C:\> for %i in (foo) do @svn proplist %i -v >proplist.txt
3. Open proplist.txt in notepad. It looks normal. A hex editor will
reveal it has CRCRLF line endings, however.
4. CTRL-A and CTRL-C to copy those two lines.
5. In Explorer, right click any dir in a working copy, choose
Properties, Subversion tab.
6. In the drop-down property name list choose svn:ignore
7. Click the property value area and CTRL-V paste in these two lines.
8. Click the Set button.
9. Tortoise and explorer immediately crash.

I think it is realistic that more people would be using cmd.exe's for
loop and svn.exe in such a way. I was using it to compare properties on
multiple directories between two revisions. (Sadly, seeing property
differences seems to be a weakness of TSVN, and SVN in general.)

Besides fixing the actual crashing code, it might be useful to replace
*all* CR and LF character sequences with whatever TSVN uses internally
for line endings (I presume LF?) before the "Set button" operation is
performed. I.e. the regexp: s/[\r\n]+/\n/g

-Nathan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Nov 19 23:17:00 2004

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

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