You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Vladimir Prus <gh...@cs.msu.su> on 2003/01/17 09:40:54 UTC

svn diff acting wrong after merge

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

Re: svn diff acting wrong after merge

Posted by Vladimir Prus gh...@cs.msu.su.
Philip Martin wrote:

I still get:

Index: dir/dir2/file.cpp
===================================================================
Index: dir/dir2/file.cpp
===================================================================
--- dir/dir2/file.cpp   (revision 4)
+++ dir/dir2/file.cpp   (working copy)
 
 
 That's not the output I get by running 'svn diff -r3'.  It is the
 output I get by running 'svn diff', it's also the output I expect for
 that command.

Your commit 4478 fixes the behaviour I've seen. No wonder it was hard to
reproduce.

Thanks,
Volodya


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn diff acting wrong after merge

Posted by Philip Martin ph...@codematters.co.uk.
Vladimir Prus ghost@cs.msu.su writes:

 Philip Martin wrote:
  I cannot reproduce it.
 
 Strange. I can reproduce it still.
 
 I still get:
 
 Index: dir/dir2/file.cpp
 ===================================================================
 Index: dir/dir2/file.cpp
 ===================================================================
 --- dir/dir2/file.cpp   (revision 4)
 +++ dir/dir2/file.cpp   (working copy)

That's not the output I get by running 'svn diff -r3'.  It is the
output I get by running 'svn diff', it's also the output I expect for
that command.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org