You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/03/06 01:18:34 UTC

svn commit: r1664531 - /subversion/trunk/subversion/tests/cmdline/entries-dump.c

Author: rhuijben
Date: Fri Mar  6 00:18:33 2015
New Revision: 1664531

URL: http://svn.apache.org/r1664531
Log:
Make the entries dump tool used by our test tool use a newer wc api to
see if a directory has a working copy lock to avoid opening and closing
wc.db an extra time per directory, while we have an existing connection
(and transaction) open.

On Windows this resolves a 14 second delay in the testsuite on the new
upgrade_tests.py test with a read only wc.db.

It appears that Sqlite tries to open sqlite databases writable for some
time before giving up on Windows.

* subversion/tests/cmdline/entries-dump.c
  (entries_dump): Create wc context to allow using the svn_wc_locked2
    api, which can access the db directly.

Modified:
    subversion/trunk/subversion/tests/cmdline/entries-dump.c

Modified: subversion/trunk/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/entries-dump.c?rev=1664531&r1=1664530&r2=1664531&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/trunk/subversion/tests/cmdline/entries-dump.c Fri Mar  6 00:18:33 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,7 +95,13 @@ 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
@@ -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));
 



Re: svn commit: r1664531 - /subversion/trunk/subversion/tests/cmdline/entries-dump.c

Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 11 March 2015 at 17:49, Bert Huijben <be...@qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: Ivan Zhakov [mailto:ivan@visualsvn.com]
>> Sent: woensdag 11 maart 2015 15:32
>> To: dev@subversion.apache.org; Bert Huijben
>> Subject: Re: svn commit: r1664531 -
>> /subversion/trunk/subversion/tests/cmdline/entries-dump.c
>>
>> On 6 March 2015 at 03:18,  <rh...@apache.org> wrote:
>> > Author: rhuijben
>> > Date: Fri Mar  6 00:18:33 2015
>> > New Revision: 1664531
>> >
>> > URL: http://svn.apache.org/r1664531
>> > Log:
>> > Make the entries dump tool used by our test tool use a newer wc api to
>> > see if a directory has a working copy lock to avoid opening and closing
>> > wc.db an extra time per directory, while we have an existing connection
>> > (and transaction) open.
>> >
>> > On Windows this resolves a 14 second delay in the testsuite on the new
>> > upgrade_tests.py test with a read only wc.db.
>> >
>> > It appears that Sqlite tries to open sqlite databases writable for some
>> > time before giving up on Windows.
>> >
>> Hi Bert,
>>
>> I think this change should be added to r1664531 group nomination
>> because this 14 second delay is really annoying. What do you think?
>
> This fix has its own nomination and is already approved for 1.9.x
> (It is also nominated for 1.8.x)
>
> Before that it was approved I only +1'ed the actual fix and not this testcase.
> (I removed that split vote in r1665814)
>
I missed that. Sorry for noise.


-- 
Ivan Zhakov

RE: svn commit: r1664531 - /subversion/trunk/subversion/tests/cmdline/entries-dump.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Ivan Zhakov [mailto:ivan@visualsvn.com]
> Sent: woensdag 11 maart 2015 15:32
> To: dev@subversion.apache.org; Bert Huijben
> Subject: Re: svn commit: r1664531 -
> /subversion/trunk/subversion/tests/cmdline/entries-dump.c
> 
> On 6 March 2015 at 03:18,  <rh...@apache.org> wrote:
> > Author: rhuijben
> > Date: Fri Mar  6 00:18:33 2015
> > New Revision: 1664531
> >
> > URL: http://svn.apache.org/r1664531
> > Log:
> > Make the entries dump tool used by our test tool use a newer wc api to
> > see if a directory has a working copy lock to avoid opening and closing
> > wc.db an extra time per directory, while we have an existing connection
> > (and transaction) open.
> >
> > On Windows this resolves a 14 second delay in the testsuite on the new
> > upgrade_tests.py test with a read only wc.db.
> >
> > It appears that Sqlite tries to open sqlite databases writable for some
> > time before giving up on Windows.
> >
> Hi Bert,
> 
> I think this change should be added to r1664531 group nomination
> because this 14 second delay is really annoying. What do you think?

This fix has its own nomination and is already approved for 1.9.x
(It is also nominated for 1.8.x)

Before that it was approved I only +1'ed the actual fix and not this testcase.
(I removed that split vote in r1665814)

	Bert


Re: svn commit: r1664531 - /subversion/trunk/subversion/tests/cmdline/entries-dump.c

Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 11 March 2015 at 17:35, Branko Čibej <br...@wandisco.com> wrote:
> On 11.03.2015 15:31, Ivan Zhakov wrote:
>> On 6 March 2015 at 03:18,  <rh...@apache.org> wrote:
>>> Author: rhuijben
>>> Date: Fri Mar  6 00:18:33 2015
>>> New Revision: 1664531
>>>
>>> URL: http://svn.apache.org/r1664531
>>> Log:
>>> Make the entries dump tool used by our test tool use a newer wc api to
>>> see if a directory has a working copy lock to avoid opening and closing
>>> wc.db an extra time per directory, while we have an existing connection
>>> (and transaction) open.
>>>
>>> On Windows this resolves a 14 second delay in the testsuite on the new
>>> upgrade_tests.py test with a read only wc.db.
>>>
>>> It appears that Sqlite tries to open sqlite databases writable for some
>>> time before giving up on Windows.
>>>
>> Hi Bert,
>>
>> I think this change should be added to r1664531 group nomination
>> because this 14 second delay is really annoying. What do you think?
>
> Um, this /is/ the r1664531 commit. What am I missing?
>
I meant r1664476. Sorry for typo.

-- 
Ivan Zhakov

Re: svn commit: r1664531 - /subversion/trunk/subversion/tests/cmdline/entries-dump.c

Posted by Branko Čibej <br...@wandisco.com>.
On 11.03.2015 15:31, Ivan Zhakov wrote:
> On 6 March 2015 at 03:18,  <rh...@apache.org> wrote:
>> Author: rhuijben
>> Date: Fri Mar  6 00:18:33 2015
>> New Revision: 1664531
>>
>> URL: http://svn.apache.org/r1664531
>> Log:
>> Make the entries dump tool used by our test tool use a newer wc api to
>> see if a directory has a working copy lock to avoid opening and closing
>> wc.db an extra time per directory, while we have an existing connection
>> (and transaction) open.
>>
>> On Windows this resolves a 14 second delay in the testsuite on the new
>> upgrade_tests.py test with a read only wc.db.
>>
>> It appears that Sqlite tries to open sqlite databases writable for some
>> time before giving up on Windows.
>>
> Hi Bert,
>
> I think this change should be added to r1664531 group nomination
> because this 14 second delay is really annoying. What do you think?

Um, this /is/ the r1664531 commit. What am I missing?

-- Brane

Re: svn commit: r1664531 - /subversion/trunk/subversion/tests/cmdline/entries-dump.c

Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 6 March 2015 at 03:18,  <rh...@apache.org> wrote:
> Author: rhuijben
> Date: Fri Mar  6 00:18:33 2015
> New Revision: 1664531
>
> URL: http://svn.apache.org/r1664531
> Log:
> Make the entries dump tool used by our test tool use a newer wc api to
> see if a directory has a working copy lock to avoid opening and closing
> wc.db an extra time per directory, while we have an existing connection
> (and transaction) open.
>
> On Windows this resolves a 14 second delay in the testsuite on the new
> upgrade_tests.py test with a read only wc.db.
>
> It appears that Sqlite tries to open sqlite databases writable for some
> time before giving up on Windows.
>
Hi Bert,

I think this change should be added to r1664531 group nomination
because this 14 second delay is really annoying. What do you think?


-- 
Ivan Zhakov