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

svn diff acting wrong after merge

From: Vladimir Prus <ghost_at_cs.msu.su>
Date: 2003-01-17 10:40:54 CET

Using svn rev 4408, I get strange diff behaviour.
I have WC which is at revision 810. After running

     svn merge -r807:809 .

the "svn diff" produces really strange output.

     svn diff -r809 > A.diff

contains:

Index: asm_estimate/Jamfile
===================================================================
--- asm_estimate/Jamfile (revision 810)
+++ asm_estimate/Jamfile (working copy)

How comes? I did request diff against 809! Luckily, this bug reproduces
on a smaller example. The script below

#/bin/bash

cd /tmp
rm -rf svn wc wc2

svnadmin create svn
svn co file://localhost/tmp/svn wc

cd wc

svn mkdir dir
svn mkdir dir/dir2

echo "int main() {}" > dir/dir2/file.cpp
svn add dir/dir2/file.cpp
svn ci -m ""

# Make a copy of WC
cp -r . ../wc2

echo "int main() { return 0; }" > dir/dir2/file.cpp
svn ci -m ""

touch dir/dir2/file2.cpp
svn add dir/dir2/file2.cpp
svn ci -m ""

# Use the copy of WC to blow away last commit
cp ../wc2/dir/dir2/* dir/dir2
svn ci -m ""

# Attempt to recover our changes
svn merge -r1:3 .

# Look what we've got

svn diff -r3
#################################

produces

Index: dir/dir2/file.cpp
===================================================================
Index: dir/dir2/file.cpp
===================================================================
--- dir/dir2/file.cpp (revision 4)
+++ dir/dir2/file.cpp (working copy)
@@ -1 +1 @@
-int main() {}
+int main() { return 0; }

- Volodya

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 17 10:38:27 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.