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

Re: svn commit: r28018 - trunk/subversion/bindings/swig/ruby/svn

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-11-26 01:37:23 CET

Hi kou

On Nov 25, 2007 4:20 PM, <joeswatosh@tigris.org> wrote:
> Author: joeswatosh
> Date: Sun Nov 25 16:20:47 2007
> New Revision: 28018
>
> Log:
> Duplication reduction by using Svn::Wc::AdmAccess#update_editor2 to implement
> update_editor, and Svn::Wc::AdmAccess#switch_editor2 to implement
> switch_editor.
>
> * subversion/bindings/swig/ruby/svn/wc.rb
> (Svn::Wc::AdmAccess#update_editor): Implement with update_editor2.
> (Svn::Wc::AdmAccess#switch_editor): Implement with switch_editor2.
>
> Suggested by: kou
>
>
> Modified:
> trunk/subversion/bindings/swig/ruby/svn/wc.rb
>
> Modified: trunk/subversion/bindings/swig/ruby/svn/wc.rb
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/swig/ruby/svn/wc.rb?pathrev=28018&r1=28017&r2=28018
> ==============================================================================
> --- trunk/subversion/bindings/swig/ruby/svn/wc.rb (original)
> +++ trunk/subversion/bindings/swig/ruby/svn/wc.rb Sun Nov 25 16:20:47 2007
> @@ -300,25 +300,16 @@
> depth=nil, allow_unver_obstruction=false, diff3_cmd=nil,
> notify_func=nil, cancel_func=nil, traversal_info=nil,
> preserved_exts=nil)
> - preserved_exts ||= []
> - traversal_info ||= _traversal_info
> -
> - # TODO(rb support fetch_fun): implement support for the fetch_func
> - # callback.
> - fetch_func = nil
> - # TODO(rb support conflict_fun): implement support for the
> - # conflict_func callback.
> - conflict_func=nil
> - results = Wc.get_update_editor3(target_revision, self, target,
> - use_commit_times, depth,
> - allow_unver_obstruction,
> - notify_func, cancel_func, conflict_func,
> - fetch_func, diff3_cmd,
> - preserved_exts, traversal_info)
> - target_revision_address, editor, editor_baton = results
> - editor.__send__(:target_revision_address=, target_revision_address)
> - editor.baton = editor_baton
> - editor
> + update_editor2(:target => target,
> + :target_revision => target_revision,
> + :use_commit_times => use_commit_times,
> + :depth => depth,
> + :allow_unver_obstruction => allow_unver_obstruction,
> + :diff3_cmd => diff3_cmd,
> + :notify_func => notify_func,
> + :cancel_func => cancel_func,
> + :traversal_info => traversal_info,
> + :preserved_exts => preserved_exts )
> end
>
> UPDATE_EDITOR2_REQUIRED_ARGUMENTS_KEYS = [:target]
> @@ -371,23 +362,18 @@
> allow_unver_obstruction=false, diff3_cmd=nil,
> notify_func=nil, cancel_func=nil, traversal_info=nil,
> preserved_exts=nil)
> - preserved_exts ||= []
> - traversal_info ||= _traversal_info
> - # TODO(rb support conflict_fun): implement support for the
> - # conflict_func callback.
> - conflict_func=nil
> - results = Wc.get_switch_editor3(target_revision, self, target,
> - switch_url, use_commit_times, depth,
> - allow_unver_obstruction,
> - notify_func, cancel_func,
> - conflict_func,
> - diff3_cmd, preserved_exts,
> - traversal_info)
> - target_revision_address, editor, editor_baton = results
> - editor.__send__(:target_revision_address=, target_revision_address)
> - editor.baton = editor_baton
> - editor
> - end
> + switch_editor2(:target => target,
> + :switch_url => switch_url,
> + :target_revision => target_revision,
> + :use_commit_times => use_commit_times,
> + :depth => depth,
> + :allow_unver_obstruction => allow_unver_obstruction,
> + :diff3_cmd => diff3_cmd,
> + :notify_func => notify_func,
> + :cancel_func => cancel_func,
> + :traversal_info => traversal_info,
> + :preserved_exts => preserved_exts )
> + end
>
> SWITCH_EDITOR2_REQUIRED_ARGUMENTS_KEYS = [:target, :switch_url]
> def switch_editor2(arguments={})
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>

This is better, but it still duplicates the defaults. Maybe we should
consider the defaults as a constant hash again?

--
Thanks,
Joe
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 26 01:37:32 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.