subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1707993 - /subversion/trunk/subversion/libsvn_repos/delta.c
Date Sun, 11 Oct 2015 16:09:27 GMT
Author: stefan2
Date: Sun Oct 11 16:09:27 2015
New Revision: 1707993

URL: http://svn.apache.org/viewvc?rev=1707993&view=rev
Log:
Speed up revprop access in svn_repos_dir_delta2() using the latest FS API.

* subversion/libsvn_repos/delta.c
  (svn_repos_dir_delta2): Refresh the revprops only once, at the beginning
                          of the operation. This is the only public function
                          in this file, so we still fulfil the visibility
                          guarantees for revprop changes.
  (delta_proplists): Read revprops from cache if we can.

Modified:
    subversion/trunk/subversion/libsvn_repos/delta.c

Modified: subversion/trunk/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/delta.c?rev=1707993&r1=1707992&r2=1707993&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/delta.c (original)
+++ subversion/trunk/subversion/libsvn_repos/delta.c Sun Oct 11 16:09:27 2015
@@ -266,6 +266,13 @@ svn_repos_dir_delta2(svn_fs_root_t *src_
        _("Invalid editor anchoring; at least one of the "
          "input paths is not a directory and there was no source entry"));
 
+  /* Don't report / compare stale revprops.  However, revprop changes that
+   * are made by a 3rd party outside this delta operation, may not be
+   * detected as per our visibility guarantees.  Reset the revprop caches
+   * for both roots in case they belong to different svn_fs_t instances. */
+  SVN_ERR(svn_fs_refresh_revision_props(svn_fs_root_fs(tgt_root), pool));
+  SVN_ERR(svn_fs_refresh_revision_props(svn_fs_root_fs(src_root), pool));
+
   /* Set the global target revision if one can be determined. */
   if (svn_fs_is_revision_root(tgt_root))
     {
@@ -491,8 +498,8 @@ delta_proplists(struct context *c,
           SVN_ERR(change_fn(c, object, SVN_PROP_ENTRY_COMMITTED_REV,
                             cr_str, subpool));
 
-          SVN_ERR(svn_fs_revision_proplist(&r_props, fs, committed_rev,
-                                           pool));
+          SVN_ERR(svn_fs_revision_proplist2(&r_props, fs, committed_rev,
+                                            FALSE, pool, subpool));
 
           /* Transmit the committed-date. */
           committed_date = svn_hash_gets(r_props, SVN_PROP_REVISION_DATE);



Mime
View raw message