Matthijs Kooijman <matthijs@stdin.nl>


Patch
r1241713, r1241691, r1241682, r1241600, r1241554, r1241553, r1241530, r1227828, r1035745

r1241713 | danielsh | 2012-02-07 18:30:48 -0600 (Tue, 07 Feb 2012)

Improve the testcase for the python binding for
svn_auth_get_platform_specific_client_providers.

This test was introduced in r1241530, but it only checked if a list was
returned. Now also the type of the elements of the list is checked.

* subversion/bindings/swig/python/tests/client.py
  (test_platform_providers): Improve testcase.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>


r1241691 | stsp | 2012-02-07 17:05:29 -0600 (Tue, 07 Feb 2012)

Only run the gnome keyring unlock function test when the needed function
is available. This should prevent test failures on platforms without
gnome-keyring.

* python/tests/client.py
  (testGnomeKeyring): Make conditional.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>


r1241682 | stsp | 2012-02-07 16:53:48 -0600 (Tue, 07 Feb 2012)

The conditional around the declaration of
svn_auth_set_gnome_keyring_unlock_prompt_func (introduced in r1241585)
was not functioning properly, it prevented the bindings from being
generated on all platforms instead of just those without gnome-keyring
support.

This is because the swig preprocessor did not have the needed #defines
available at the point where the function was declared. The reason the
conditional does work for the implementation, is that the implementation
is ignored by swig and included only in the core.c file, and that some
other include (presumably) makes svn_auth.h available.

To fix this, we move the declaration of the function to below the
include of svn_auth.h. While we here, also merge the declaration and
implementation using the swig %inline keyword.

* core.i
  (svn_auth_set_gnome_keyring_unlock_prompt_func): Merge declaration with
    implementation and move both below the include of svn_auth.h.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>


r1241600 | danielsh | 2012-02-07 14:32:11 -0600 (Tue, 07 Feb 2012)

Let the get-location-segments.py example pass a proper config to
svn_auth_get_platform_specific_client_providers.

This call was introduced in r1241530, but it did not properly pass a
configuration option.

* tools/examples/get-location-segments.py
  (main): Pass config to
    svn_auth_get_platform_specific_client_providers.

Patch by: Matthijs Kooijman


r1241554 | stsp | 2012-02-07 13:10:41 -0600 (Tue, 07 Feb 2012)

Allow setting the SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC
authentication parameter from the perl, python and ruby bindings.

This parameter cannot be set using the regular svn_auth_set_parameter
function, since the function from perl/python/ruby space must be wrapped
in a C function to allow it to be called. For this reason, a new
function, svn_auth_set_gnome_keyring_unlock_prompt_func, is introduced
(in the bindings only).

[in subversion/bindings/swig]

* core.i
  (svn_auth_set_gnome_keyring_unlock_prompt_func): Add function and
  setup corresponding authprompt_callback_typemap.

* perl/libsvn_swig_perl/swigutil_pl.c,
  perl/libsvn_swig_perl/swigutil_pl.h
  (svn_swig_pl_thunk_gnome_keyring_unlock_prompt): Add function (called
  by authprompt_callback_typemap)

* python/libsvn_swig_py/swigutil_py.c
  python/libsvn_swig_py/swigutil_py.h
  (svn_swig_py_auth_gnome_keyring_unlock_prompt_func): Add function
  (called by authprompt_callback_typemap)

* ruby/libsvn_swig_ruby/swigutil_rb.c,
  ruby/libsvn_swig_ruby/swigutil_rb.h
  (svn_swig_rb_auth_gnome_keyring_unlock_prompt_func): Add function
  (called by authprompt_callback_typemap)

* perl/native/t/3client.t,
  python/tests/client.py
  Add test for svn_auth_set_gnome_keyring_unlock_prompt_func.

[in tools/examples]

* get-location-segments.py,
  info.rb
  Use the new svn_auth_set_gnome_keyring_unlock_prompt_func function.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>


r1241553 | stsp | 2012-02-07 13:04:02 -0600 (Tue, 07 Feb 2012)

Fix the ruby bindings for svn_auth_get_platform_specific_client_providers.

The bindings were present, but due to a missing argout typemap for
apr_array_header_t **providers, they threw a not implemented error. This
was fixed for perl in r1035745 and for python in r1241530, but was still
broken for ruby.

[in subversion/bindings/swig]

* include/svn_containers.swg
  (apr_array_header_t **providers):
  New SWIGRUBY typemap.

* ruby/libsvn_swig_ruby/swigutil_rb.c,
  ruby/libsvn_swig_ruby/swigutil_rb.h
  (svn_swig_rb_apr_array_to_array_auth_provider_object): Add function.

* ruby/svn/core.rb
  (add_platform_specific_client_providers, add_providers): Add
  functions.

[in tools/examples]

* info.rb
  Add a new example that shows how to do remote access instead of
  working on an existing working copy (like the existing examples do).
  This example also shows how to call
  svn_auth_get_platform_specific_client_providers.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>


r1241530 | danielsh | 2012-02-07 11:44:43 -0600 (Tue, 07 Feb 2012)

Fix the python bindings for svn_auth_get_platform_specific_client_providers.

The bindings were present, but due to a missing argout typemap for
apr_array_header_t **providers, they threw a not implemented error. This
was fixed for perl in r1035745, but was still broken for python and
ruby.  (The ruby bindings will be fixed in a separate commit.)

[in subversion/bindings/swig]

* include/svn_containers.swg
  (apr_array_header_t **RANGELIST):
    Track rename.
  (apr_array_header_t **providers):
    New SWIGPYTHON typemap.

* python/libsvn_swig_py/swigutil_py.c
  (convert_rangelist): Rename to..
  (convert_pointerlist): .. this.
    Use 'void *' instead of a concrete pointer type for the array elements.
  (svn_swig_py_ranglist_to_list): Rename to..
  (svn_swig_py_pointerlist_to_list): .. this.
  (svn_swig_py_mergeinfo_to_dict):
    Track renames.

* python/libsvn_swig_py/swigutil_py.h
  (svn_swig_py_ranglist_to_list): Rename to..
  (svn_swig_py_pointerlist_to_list): .. this.

* python/test/client.py
  (test_platform_providers): Add testcase.

* tools/examples/get-location-segments.py
  (main): Use svn_auth_get_platform_specific_client_providers.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>


r1227828 | danielsh | 2012-01-05 14:54:09 -0600 (Thu, 05 Jan 2012)

Fix the swig-py examples.

When trying to run the get-location-segments.py, it throws:

    TypeError: Unexpected NULL parent pool on proxy object

Somehow, the "_parent_pool" property wasn't initialized on the context.
Not sure how this works, but creating a context using
client.svn_client_create_context() instead of client.ctx_t() (which
subversion/bindings/swig/python/tests/pool.py also does) fixes this
error and makes the example work again.

* tools/examples/get-location-segments.py
  (main): Use client.svn_client_create_context instead of client.ctx_t.

* tools/examples/SvnCLBrowse
  (SvnCLBrowse.__init__): Same.

Patch by: Matthijs Kooijman <matthijs@stdin.nl>
(SvnCLBrowse part by me)


r1035745 | hwright | 2010-11-16 12:59:39 -0600 (Tue, 16 Nov 2010)

Add support to the Perl bindings for the apr_array_header_t** providers type.
This fixes svn_auth_get_platform_specific_client_providers() in the Perl
bindings.  Test case included.

[ Note: This *looks* good, and all the tests pass, but I know so little Perl
as to make my own review almost useless. ]

Patch by: Matthijs Kooijman <matthijs@stdin.nl>

* subversion/bindings/swig/include/svn_containers.swg:
  Add typemap for apr_array_header_t **providers.

* subversion/bindings/swig/perl/native/t/3client.t:
  Add the new test, and run it.