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

diffs & removed directories

From: Gustavo Niemeyer <niemeyer_at_conectiva.com>
Date: 2002-10-19 17:31:48 CEST

While debugging the problem I presented in the last patch I sent, I've
discovered another interesting behavior of "svn diff". In the execution
below, notice that between revisions 12 and 13, "dir" and "dir/file"
were added.

[niemeyer_at_ibook ~/src/test]% svn diff file:///svnroot/test_at_12 \
                                      file:///svnroot/test_at_13
Index: dir/file
===================================================================
--- dir/file
+++ tmp.15136.00001 2002-10-19 12:17:36.000000000 -0300
@@ -0,0 +1 @@
+foo
[niemeyer_at_ibook ~/src/test]% svn diff file:///svnroot/test_at_13 \
                                      file:///svnroot/test_at_12
[niemeyer@ibook ~/src/test]%

That happens because in libsvn_repos/delta.c:delta_dirs(), delete()
is called for each entry in the source path that doesn't exist in
the target path. OTOH, the editor function
libsvn_client/repos_diff.c:delete_entry() simply checks the path kind,
and forwards the call to the libsvn_client/diff.c:diff_dir_deleted()
diff callback function, which does nothing.

IMO, delete_entry() should be changed to recurse into the directory
and call itself recursivelly for each entry, if recursion is enabled.

Can someone familiar with that code please confirm that, or explain
a better solution to fix that? If so, I can try to provide a patch.

Thanks!

-- 
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 19 17:34:25 2002

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.