[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SQLite and the Ruby bindings tests on Windows

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: Mon, 15 Dec 2008 23:30:39 +0900 (JST)

Hi,

In <ae6cb1100812142233n4920e50fufe2095e083948150_at_mail.gmail.com>
  "Re: SQLite and the Ruby bindings tests on Windows" on Sun, 14 Dec 2008 22:33:03 -0800,
  Joe Swatosh <joe.swatosh_at_gmail.com> wrote:

> > What about adding Svn::Client::Context#close and
> > Svn::Client::Context#initialize accepts a block?
> >
> > pseudo code:
> > class Svn::Client::Context
> > def initialize(...)
> > ...
> > return unless block_given?
> > begin
> > yield(self)
> > ensure
> > close
> > end
> > end
> >
> > def close
> > @pool.destroy
> > end
> > end
> >
> > But I'm not sure that 'close' is a good name for that...
> >
>
> Based on the above idea, I committed r34708. Instead of Context#initialize
> taking a block I modified SvnTestUtil#make_context to take a block. I think
> that worked better for updating the tests, but I'd like to see the
> Context#initialize take a block someday.

I think of an idea that 'destroy' is more better name rather
than 'close'. What about this? The attached patch includes
block supported #initialize.

> 3) Error:
> test_set_revision_by_date(SvnClientTest):
> Svn::Error::ClientUnrelatedResources:
> D:\svn\src-trunk\subversion\libsvn_client\ra.c:695:
> Svn::Error::ClientUnrelatedResources: Unable to find repository
> location for 'file:///D:/SVN/src-trunk/subversion/bindings/swig/ruby/repos/hello.txt'
> in revision 0
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in
> `svn_client_cat2'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in `cat2'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/client.rb:399:in `cat'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:2342:in
> `test_set_revision_by_date'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/util.rb:181:in
> `make_context'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:2331:in
> `test_set_revision_by_date'

> The last error is from the test you added for Takeuchi Yusuke. It looks like
> it should pass to me, but I didn't want to delay r34708 any longer.

It's passed on my environment. But I have other failures and
errors:

  1) Error:
test_merge(SvnClientTest):
Svn::Error::WcFoundConflict:
subversion/libsvn_client/commit_util.c:289: Svn::Error::WcFoundConflict: Aborting commit: '/home/kou/work/c/svn/subversion/bindings/swig/ruby/wc-tmp/wc/trunk/sample.txt' remains in conflict
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `svn_client_commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/client.rb:161:in `commit'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1016:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:937:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1040:in `test_merge'

  2) Error:
test_merge_peg(SvnClientTest):
Svn::Error::WcFoundConflict:
subversion/libsvn_client/commit_util.c:289: Svn::Error::WcFoundConflict: Aborting commit: '/home/kou/work/c/svn/subversion/bindings/swig/ruby/wc-tmp/wc/trunk/sample.txt' remains in conflict
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `svn_client_commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/client.rb:161:in `commit'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1016:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:937:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1046:in `test_merge_peg'

  3) Failure:
test_transaction(SvnFsTest) [/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_fs.rb:244]:
<false> is not true.

  4) Failure:
test_entry(SvnWcTest)
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:203:in `test_entry'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:117:in `_open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:95:in `open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:192:in `test_entry'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:186:in `test_entry':
<false> is not true.

  5) Failure:
test_relocate(SvnWcTest)
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:1002:in `test_relocate'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:117:in `_open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:101:in `probe_open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:989:in `test_relocate'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/ra.rb:33:in `open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:977:in `test_relocate'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:974:in `test_relocate':
<[["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"]]> expected but was
<[["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"]]>.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=984471

Hi,

In <ae6cb1100812142233n4920e50fufe2095e083948150_at_mail.gmail.com>
  "Re: SQLite and the Ruby bindings tests on Windows" on Sun, 14 Dec 2008 22:33:03 -0800,
  Joe Swatosh <joe.swatosh_at_gmail.com> wrote:

> > What about adding Svn::Client::Context#close and
> > Svn::Client::Context#initialize accepts a block?
> >
> > pseudo code:
> > class Svn::Client::Context
> > def initialize(...)
> > ...
> > return unless block_given?
> > begin
> > yield(self)
> > ensure
> > close
> > end
> > end
> >
> > def close
> > @pool.destroy
> > end
> > end
> >
> > But I'm not sure that 'close' is a good name for that...
> >
>
> Based on the above idea, I committed r34708. Instead of Context#initialize
> taking a block I modified SvnTestUtil#make_context to take a block. I think
> that worked better for updating the tests, but I'd like to see the
> Context#initialize take a block someday.

I think of an idea that 'destroy' is more better name rather
than 'close'. What about this? The attached patch includes
block supported #initialize.

> 3) Error:
> test_set_revision_by_date(SvnClientTest):
> Svn::Error::ClientUnrelatedResources:
> D:\svn\src-trunk\subversion\libsvn_client\ra.c:695:
> Svn::Error::ClientUnrelatedResources: Unable to find repository
> location for 'file:///D:/SVN/src-trunk/subversion/bindings/swig/ruby/repos/hello.txt'
> in revision 0
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in
> `svn_client_cat2'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in `cat2'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/client.rb:399:in `cat'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:2342:in
> `test_set_revision_by_date'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/util.rb:181:in
> `make_context'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:2331:in
> `test_set_revision_by_date'

> The last error is from the test you added for Takeuchi Yusuke. It looks like
> it should pass to me, but I didn't want to delay r34708 any longer.

It's passed on my environment. But I have other failures and
errors:

  1) Error:
test_merge(SvnClientTest):
Svn::Error::WcFoundConflict:
subversion/libsvn_client/commit_util.c:289: Svn::Error::WcFoundConflict: Aborting commit: '/home/kou/work/c/svn/subversion/bindings/swig/ruby/wc-tmp/wc/trunk/sample.txt' remains in conflict
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `svn_client_commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/client.rb:161:in `commit'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1016:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:937:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1040:in `test_merge'

  2) Error:
test_merge_peg(SvnClientTest):
Svn::Error::WcFoundConflict:
subversion/libsvn_client/commit_util.c:289: Svn::Error::WcFoundConflict: Aborting commit: '/home/kou/work/c/svn/subversion/bindings/swig/ruby/wc-tmp/wc/trunk/sample.txt' remains in conflict
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `svn_client_commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/util.rb:86:in `commit4'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/client.rb:161:in `commit'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1016:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:937:in `assert_merge'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_client.rb:1046:in `test_merge_peg'

  3) Failure:
test_transaction(SvnFsTest) [/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_fs.rb:244]:
<false> is not true.

  4) Failure:
test_entry(SvnWcTest)
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:203:in `test_entry'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:117:in `_open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:95:in `open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:192:in `test_entry'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:186:in `test_entry':
<false> is not true.

  5) Failure:
test_relocate(SvnWcTest)
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:1002:in `test_relocate'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:117:in `_open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/wc.rb:101:in `probe_open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:989:in `test_relocate'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/svn/ra.rb:33:in `open'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:977:in `test_relocate'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/util.rb:181:in `make_context'
/home/kou/work/c/svn/subversion/bindings/swig/ruby/test/test_wc.rb:974:in `test_relocate':
<[["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"]]> expected but was
<[["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  nil],
 ["9a53476b-51b9-471e-bb71-47511291e7c5",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  "file:///home/kou/work/c/svn/subversion/bindings/swig/ruby/repos/dir2"]]>.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=984471
Received on 2008-12-15 15:31:40 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.