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

bug in diff parsing

From: Baz <brian.ewins_at_gmail.com>
Date: 2006-04-20 14:02:33 CEST

Hi,
we experienced some strange problems here where far fewer files were
being reported as changed in a diff in tortoise and in the command
line svn. Investigating it a bit, I think there's a bug in how
tortoise parses unified diffs. Tortoise doesn't list any files changed
after it encounters lines *inside* a hunk starting '---'. The lines
that triggered this for us were deleted sql comments (first '-' is
delete, followed by '--' for the sql comment)

Its easy to reproduce the problem. Create two files, test1.txt,
test2.txt containing these two lines:

-- this line will trip up tortoise
this one is ok

Commit these. Now edit *both* files to remove the first line, and
commit. We're editing both lines here because tortoise won't report
the second file in the diff, but I don't know which it'll report
first; making both files trigger the bug means tortoise will omit a
file either way.

Now show the log for the dir, and compare the two revisions you just
committed. Tortoise will only show one file changed, but the diff
output on the command line is:
$ svn diff -r 9676:9677 http://glacvs/svn/logbugz
Index: trunk/test2.txt
===================================================================
--- trunk/test2.txt (revision 9676)
+++ trunk/test2.txt (revision 9677)
@@ -1,2 +1 @@
--- this line will trip up tortoise
 this line is ok
\ No newline at end of file
Index: trunk/test1.txt
===================================================================
--- trunk/test1.txt (revision 9676)
+++ trunk/test1.txt (revision 9677)
@@ -1,2 +1 @@
--- this line will trip up tortoise
 this line is ok
\ No newline at end of file

I'd report this as a bug but the bug tracker appears to be down
("Flyspray was unable to connect to the database. Check your settings
in flyspray.conf.php")

Any thoughts?

Cheers,
Baz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Thu Apr 20 14:02:50 2006

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

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