I ran into this issue and found the related bug report. 'svn diff'
isn't giving correct (or at least expected) results after a directory
has been deleted.
http://subversion.tigris.org/issues/show_bug.cgi?id=2333
Looking at the test script at the bottom of the bug report, it appears
to test the deletion of a file, not a directory.
I've tested the following script against SVN 1.4.3 and 1.4.5 and it
fails to provide an accurate 'forward' diff.
---------------------------
#!/bin/bash
svnadmin create /root/SVN/mytest
svn co file:///root/SVN/mytest
mkdir mytest/subdir
svn add mytest/subdir
echo "Hi There" > mytest/subdir/myfile
svn add mytest/subdir/myfile
svn -m "creation" ci mytest
rm mytest/subdir/myfile
svn del mytest/subdir/myfile
rm -rf mytest/subdir
svn del mytest/subdir
svn -m "deletion" ci mytest
echo
echo "DIFF rev 1 -> 2:"
svn diff -r 1:2 file:///root/SVN/mytest
echo
echo "DIFF rev 2 -> 1:"
svn diff -r 2:1 file:///root/SVN/mytest
echo "When you are finished, please run:"
echo "run: svnadmin deltify /root/SVN/mytest"
------------------------------------------------
SAMPLE OUTPUT:
Checked out revision 0.
A mytest/subdir
A mytest/subdir/myfile
Adding mytest/subdir
Adding mytest/subdir/myfile
Transmitting file data .
Committed revision 1.
D mytest/subdir/myfile
D mytest/subdir
Deleting mytest/subdir
Committed revision 2.
DIFF rev 1 -> 2:
DIFF rev 2 -> 1:
Index: subdir/myfile
===================================================================
--- subdir/myfile (revision 0)
+++ subdir/myfile (revision 1)
@@ -0,0 +1 @@
+Hi There
When you are finished, please run:
run: svnadmin deltify /root/SVN/mytest
Let me know if you have any questions, I'd be happy to test more.
-Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 10 22:34:51 2007