You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/04/28 05:10:50 UTC

svn commit: r1331666 - /subversion/trunk/subversion/libsvn_delta/compat.c

Author: gstein
Date: Sat Apr 28 03:10:50 2012
New Revision: 1331666

URL: http://svn.apache.org/viewvc?rev=1331666&view=rev
Log:
Fix log_tests 38. See the inserted comment for how this "fixes" it.

* subversion/libsvn_delta/compat.c:
  (drive_changes): change the REVISION parameter to SVN_INVALID_REVNUM
    in the svn_delta_path_driver() call. add explanation.

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1331666&r1=1331665&r2=1331666&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Sat Apr 28 03:10:50 2012
@@ -2157,9 +2157,26 @@ drive_changes(const struct editor_baton 
       APR_ARRAY_PUSH(paths, const char *) = ev1_relpath;
     }
 
-  /* Note: dropping const on the callback_baton  */
+  /* We need to pass SVN_INVALID_REVNUM to the path_driver. It uses this
+     revision whenever it opens directory batons. If we specified a "real"
+     value, such as eb->root.base_revision, then it might use that for a
+     subdirectory *incorrectly*.
+
+     Specifically, log_tests 38 demonstrates that erroneous behavior when
+     it attempts to open "/A" at revision 0 (not there, of course).
+
+     All this said: passing SVN_INVALID_REVNUM to all of those
+     open_directory() calls is not the best behavior either, but it does
+     happen to magically work. (ugh)
+
+     Thankfully, we're moving away from this skitchy behavior to Ev2.
+
+     Final note: every other caller of svn_delta_path_driver() passes
+     SVN_INVALID_REVNUM, so we can't be the only goofball.
+
+     Note: dropping const on the callback_baton.  */
   SVN_ERR(svn_delta_path_driver(eb->deditor, eb->dedit_baton,
-                                eb->root.base_revision, paths,
+                                SVN_INVALID_REVNUM, paths,
                                 apply_change, (void *)eb,
                                 scratch_pool));