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

[BUG] svn diff produces bogus data, please verify

From: Jani Averbach <jaa_at_cc.jyu.fi>
Date: 2003-05-12 16:50:38 CEST

Hello,

I just noticed that svn will produce a bogus diff.

svn --version
svn, version 0.21.0 (dev build)
   compiled Apr 19 2003, 17:02:14

Here is the script, and below is output (I cleared out the non-interesting
parts of output):

### start of script

svnadmin create repo
svn mkdir -m '' file://`pwd`/repo/trunk
svn mkdir -m '' file://`pwd`/repo/tags
svn co file://`pwd`/repo/trunk repo-wc

cat <<EOF > repo-wc/f.txt
foo
bar
snafu
EOF

svn add repo-wc/f.txt
svn ci -m '' repo-wc/f.txt
svn cp -m '' repo-wc/f.txt file://`pwd`/repo/tags/f-1.txt

# 'edit' the file, remove a line, add fews
cat <<EOF > repo-wc/f.txt
foo
snafu
abcdefgh
opqrstuw
EOF

svn ci -m '' repo-wc/f.txt
svn cp -m '' repo-wc/f.txt file://`pwd`/repo/tags/f-2.txt

svn diff file://`pwd`/repo/tags/f-1.txt file://`pwd`/repo/tags/f-2.txt

svn co file://`pwd`/repo/tags repo-tags
diff -u repo-tags/f-1.txt repo-tags/f-2.txt

### end of script

And the output:

sh ../svn-test.sh

### here is svn diff file://`pwd`/repo/tags/f-1.txt file://`pwd`/repo/tags/f-2.txt
Index: f-2.txt
===================================================================
--- f-2.txt (.../1.txt) (revision 6)
+++ f-2.txt (.../2.txt) (revision 6)
@@ -1,4 +1,4 @@
 foo
-snafu
-abcdefgh
+u
+abcdabcdefgh
 opqrstuw

### Here is diff -u repo-tags/f-1.txt repo-tags/f-2.txt
--- repo-tags/f-1.txt 2003-05-12 17:22:53.000000000 +0300
+++ repo-tags/f-2.txt 2003-05-12 17:22:53.000000000 +0300
@@ -1,3 +1,4 @@
 foo
-bar
 snafu
+abcdefgh
+opqrstuw

It seems that the file names are wrong and the diff is wrong with svn
diff. If somebody could verify that with a present client, it would be
nice.

BR, Jani

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 12 16:51:35 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.