On 01/26/2012 06:44 PM, C. Michael Pilato wrote:

Vijay, I think you have misunderstood what these docstrings are claiming.

They are not saying, "When Subversion calls the FS-loading API, it tends to
pass FALSE for validate_props by default."

They are describing the quite literal implementation of the older function
as it related to the newer one.  They are saying, "Calling
svn_repos_load_fs2() is just like calling svn_repos_load_fs3() with all the
same parameters, except the new parameter validate_props is always FALSE.

Your docstring change above is incorrect, because the implementations of the
older svn_repos_load_fs2() and svn_repos_get_fs_build_parser2() functions
has not changed.  Furthermore, those old imlementations are not allowed to
change, because that would change the behaviors of those functions, breaking
our compatibility promise.

Thanks cmpilato. I got it.

Attaching the updated patch and log message.

Thanks & Regards,
Vijayaguru
Index: subversion/libsvn_repos/load-fs-vtable.c
===================================================================
--- subversion/libsvn_repos/load-fs-vtable.c    (revision 1236546)
+++ subversion/libsvn_repos/load-fs-vtable.c    (working copy)
@@ -160,12 +160,12 @@
                 apr_pool_t *pool)
 {
   if (validate_props)
-    return svn_fs_change_rev_prop2(svn_repos_fs(repos), revision, name,
-                                   NULL, value, pool);
-  else
     return svn_repos_fs_change_rev_prop4(repos, revision, NULL, name,
                                          NULL, value, FALSE, FALSE,
                                          NULL, NULL, pool);
+  else
+    return svn_fs_change_rev_prop2(svn_repos_fs(repos), revision, name,
+                                   NULL, value, pool);
 }
 
 /* Change property NAME to VALUE for PATH in TXN_ROOT.  If
Fix the helper function 'change_rev_prop' to use functions which perform
validation of the property value if 'validate_props' is set. Otherwise,
bypass those checks.

* subversion/libsvn_repos/load-fs-vtable.c
  (change_rev_prop): Do the property validation indeed if 'validate_props' is
    set.

Patch by: Vijayaguru G <vijay{_AT_}collab.net>

Reply via email to