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

Re: svn commit: r26006 - in trunk/subversion/bindings/swig: include ruby/libsvn_swig_ruby ruby/svn

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2007-08-11 07:56:21 CEST

Hi,

In <ae6cb1100708102119n1d6c5490n886cb1eb4ee944aa@mail.gmail.com>
  "Re: svn commit: r26006 - in trunk/subversion/bindings/swig: include ruby/libsvn_swig_ruby ruby/svn" on Fri, 10 Aug 2007 21:19:07 -0700,
  "Joe Swatosh" <joe.swatosh@gmail.com> wrote:

> However, I'm still unhappy with the svn_swig_rb_conflict_resolver_func
> function itself. It feels like it should return the
> svn_wc_conflict_result_t, but I wasn't sure how to make that happen.
> Not to mention that there is no test for any of this (I've no idea how
> I could tie this together).

I don't know about the recent API but test_resolved in
test_client.rb will help you. Because the test causes
conflict on purpose.

> Now that you've let me get started complaining, I'm not nuts about all
> the default arguments to Svn::Wc::AdmAccess#update_editor and
> switch_editor. Is it time to start considering a hash? How about (DO
> NOT COMMIT!):

> It looks like we've broken compatibility with 1.4.x for that function
> already. That may have to be a different discussion.

I think it's not good to break API compatibility for now. I
think the time is 2.0.0. In my thought, we define xxx_yyy2
methods for hash argument version. And xxx_yyy methods still
use the current style. How about this idea?

Of cause we should validate arguments of hash argument
version methods (xxx_yyy2). We'll need to use the following
method:

  class Hash
    def assert_valid_keys(*valid_keys)
      unknown_keys = keys - [valid_keys].flatten
      unless unknown_keys.empty?
        raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}")
      end
    end
  end

# The above method is quoted from ActiveSupport.

Thanks,

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Aug 11 07:54:30 2007

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.