You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/03/19 19:23:13 UTC

svn commit: r1667827 - in /subversion/branches/1.9.x: ./ STATUS subversion/tests/cmdline/entries-dump.c

Author: svn-role
Date: Thu Mar 19 18:23:13 2015
New Revision: 1667827

URL: http://svn.apache.org/r1667827
Log:
Merge the r1664531 group from trunk:

 * r1664531, r1664532
   Improve database usage in entries-test to speed up test runs
   Justification:
     Use of the non deprecated function to check if the working copy is
     locked avoids re-opening the database for each and every directory.
     This decreases the total time to run the testsuite by > 2%, by just
     reducing the number of db operations.
   Votes:
     +1: rhuijben, philip, brane

Modified:
    subversion/branches/1.9.x/   (props changed)
    subversion/branches/1.9.x/STATUS
    subversion/branches/1.9.x/subversion/tests/cmdline/entries-dump.c

Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 19 18:23:13 2015
@@ -89,4 +89,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663450,1663697,1663706,1663749,1664084-1664085,1665164,1665611-1665612
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663450,1663697,1663706,1663749,1664084-1664085,1664531-1664532,1665164,1665611-1665612

Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1667827&r1=1667826&r2=1667827&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Thu Mar 19 18:23:13 2015
@@ -178,16 +178,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1664531, r1664532
-   Improve database usage in entries-test to speed up test runs
-   Justification:
-     Use of the non deprecated function to check if the working copy is
-     locked avoids re-opening the database for each and every directory.
-     This decreases the total time to run the testsuite by > 2%, by just
-     reducing the number of db operations.
-   Votes:
-     +1: rhuijben, philip, brane
-
  * r1664476, r1664480, r1664481, r1664483, r1664507, r1664520, r1664521, r1664523, r1664526, r1664527, r1665845, r1665850, r1665852
    Automatic create sqlite_stat1 table in wc.db if it doesn't exist.
    Justification:

Modified: subversion/branches/1.9.x/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/cmdline/entries-dump.c?rev=1667827&r1=1667826&r2=1667827&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/1.9.x/subversion/tests/cmdline/entries-dump.c Thu Mar 19 18:23:13 2015
@@ -74,12 +74,19 @@ entries_dump(const char *dir_path, svn_w
   apr_hash_index_t *hi;
   svn_boolean_t locked;
   svn_error_t *err;
+  svn_wc_context_t *wc_ctx = NULL;
+  const char *dir_abspath;
 
   err = svn_wc_adm_open3(&adm_access, related, dir_path, FALSE, 0,
                          NULL, NULL, pool);
   if (!err)
     {
-      SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
+      SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL,
+                                             svn_wc__adm_get_db(adm_access),
+                                             pool));
+      SVN_ERR(svn_dirent_get_absolute(&dir_abspath, dir_path, pool));
+
+      SVN_ERR(svn_wc_locked2(NULL, &locked, wc_ctx, dir_abspath, pool));
       SVN_ERR(svn_wc_entries_read(&entries, adm_access, TRUE, pool));
     }
   else if (err && err->apr_err == SVN_ERR_WC_LOCKED
@@ -88,12 +95,18 @@ entries_dump(const char *dir_path, svn_w
     {
       /* Common caller error: Can't open a baton when there is one. */
       svn_error_clear(err);
-      SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
+
+      SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL,
+                                             svn_wc__adm_get_db(related),
+                                             pool));
+      SVN_ERR(svn_dirent_get_absolute(&dir_abspath, dir_path, pool));
+
+      SVN_ERR(svn_wc_locked2(NULL, &locked, wc_ctx, dir_abspath, pool));
       SVN_ERR(svn_wc_entries_read(&entries, related, TRUE, pool));
     }
   else
     {
-      const char *dir_abspath, *lockfile_path;
+      const char *lockfile_path;
       svn_node_kind_t kind;
 
       /* ### Should svn_wc_adm_open3 be returning UPGRADE_REQUIRED? */
@@ -161,6 +174,9 @@ entries_dump(const char *dir_path, svn_w
       printf("entries['%s'] = e\n", (const char *)key);
     }
 
+  if (wc_ctx)
+    SVN_ERR(svn_wc_context_destroy(wc_ctx));
+
   if (adm_access)
     SVN_ERR(svn_wc_adm_close2(adm_access, pool));