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

[PATCH] perl bindings: Another large merge of my work.

From: Ben Reser <ben_at_reser.org>
Date: 2004-01-07 02:33:55 CET

Here comes the latest batch of updates to the perl bindings that I've
been working on. This should bring us mostly to the point of
SVN::Client being complete. I need to complete unit tests for:
cleanup, diff, export, merge, move, relocate, resolved, switch, and
some of the callbacks. Some of those may have some work needed to them
to make them work. I just haven't gotten to them yet.

This depends on the following two patches being applied:
[PATCH] Fix documentation link for svn_dirent_t (at least the minimal
patch I submitted last night).
[PATCH] Let SWIG pickup the INVALID and IGNORED REVNUM constants.

Large bindings update. Adds new error handling. Support
for log_msg, notify, cancel callbacks. blame and status
receivers. Extensive documentation. Easier use of
single parameters being passed into functions expecting
an array. Extensive unit testing.

* subversion/bindings/swig/core.i
  For perl bindings pull in svn_error_codes.h.
  Make an error message more specific.
  Fix a warning on a assignment in an if statement.
  For perl bindings pull in svn_error.h so we can wrap it.
  Fix the immutable lines to work with the fixed struct tags.

* subversion/bindings/swig/svn_types.i
  Rework the typemap for svn_error_t to work with the new
    default error handler.
  Typemap for calling svn_strerror.

* subversion/bindings/swig/svn_string.i
  Typemaps for svn_stringbuf_t *.

* subversion/bindings/swig/swigutil_pl.c
* subversion/bindings/swig/swigutil_pl.h
  Allow scripts to pass single scalars in places where arrays
    are required to avoid needing to do: [$foo].
  (svn_swig_pl_convert_array): New function that behaves like
    svn_swig_pl_convert_hash, converting whatever apr array into
    a perl array of swig types.
  (svn_swig_pl_callback_thunk): Renamed from perl_callback_thunk
    and is no longer a static. Needed for error handling.
  perl_func_invoker typedef moved to header file, needed
    for svn_swig_pl_callback.
  (svn_swig_pl_callback_thunk): If result paramameter is NULL,
    call the perl sub with G_VOID & G_DISCARD to avoid leaking
  Make a variety of calls to svn_swig_pl_callback_thunk that
    were not using the result pass NULL for the result.
  Make a variety of calls to svn_swig_pl_callback_thunk that
    were using the result call SvREFCNT_dec when done with the
    result so it will be freed.
  (svn_swig_pl_notify_func): New thunk for notify callback.
  (svn_swig_pl_get_commit_log_func): New thunk for log_msg callback.
  (svn_swig_pl_cancel_func): New thunk for cancel callback.
  (svn_swig_pl_status_func): New thunk for status receiver.
  (svn_swig_pl_blame_func): New thunk for blame receiver.
  Better error messages when unable to convert from SWIG types.
* subversion/bindings/swig/svn_client.i
  Don't ignore svn_client_proplist_item_t for perl.
  Add svn_client_ctx_t as an OUTPARAM to support the new constructor.
  Typemaps for apr_array_header_t ** and apr_hash_t *prop_hash to handle
    return from svn_client_proplist().
  Remove FIXME typemaps for unnecessary apr_hash_t **statushash and
    svn_wc_notify_func_t notify_func, void *notify_baton,
    svn_client_get_commit_log_t log_msg_func, void *log_msg_baton,
    and apr_hash_t **statushash. We handle them differently then
    the other bindings do.
  Add typemap for handling receiver for svn_client_status.
  Add typemap for handling receiver for svn_client_blame.
  Extend the typemap used to get the return from the
    svn_client_get_*_prompt calls to the notify_baton, log_msg_baton,
    and cancel_baton accessor functions.
  Return undef if svn_client_commit_info_t does not get filled.
  Typemap for the wcprop_changes member of the svn_client_commit_info_t.
  Typemaps for svn_client_create_context().
  Make some comment formating match the style of the other comments.
  Handle const char **url and const char **uuid as outputs from
    svn_client_url_from_path, svn_client_uuid_from_url, and
* subversion/bindings/swig/perl/t/1repos.t
* subversion/bindings/swig/perl/t/2fs.t
* subversion/bindings/swig/perl/t/3client.t
* subversion/bindings/swig/perl/t/4pool.t
  Add plan
  Use File::Path's rmtree to remove the temporary files instead
    of shelling out with rm -f. More platform neutral.
  Use File::Temp for createion of tempdir to make temp files in.
    Also more platform neutral.
  Turn off warnings that show up for constants defined by SWIG
    that perl thinks are only being used once.
* subversion/bindings/swig/perl/t/3client.t
  Extensive additions of unit tests.

* subversion/bindings/swig/perl/t/0use.t
  Text with use_ok instead of require_ok now that it works right.

* subversion/bindings/swig/perl/Core.pm
  Change documentation to use instead of require.
  Use =over and =back properly in the documentation.
  Add constants for INVALID_REVNUM and IGNORED_REVNUM.
  Grammar and typo corrections in the documentation.
  Use entities for > rather than the literal chars in the documentation.
  Add SVN::Error and the new error handling support.
  Documentation for objects: SVN::Node, svn_config_t, svn_dirent_t,
    svn_auth_cred_simple_t, svn_auth_cred_username_t,
    svn_auth_cred_ssl_server_trust_t, svn_auth_ssl_server_cert_info_t,
    svn_auth_cred_ssl_client_cert_t, svn_auth_cred_ssl_client_cert_pw_t,
  Support and documentation for constants in SVN::Auth::SSL.

* subversion/bindings/swig/perl/Wc.pm
  Add documentation, including docs for the various objects.
  Add package _p_svn_wc_status_t for method style use of the object.
  Support and documentation for constants in SVN::Wc::Notify::Action,
    SVN::Wc::Notify::State, and SVN::Wc::Notify::Status.

* subversion/bindings/swig/perl/Client.pm
  use SVN::Wc because it is needed for status.
  Add wrapping for propget, uuid_from_url, uuid_from_path, url_from_path,
    revprop_get, and revprop_list.
  Add PARAMETER NOTES section to the documentation to avoid duplicating
    the same documentation over and over and over again in the method
  Use entities in the documentation rather than literal >s.
  Add documentation for the config, cancel, log_msg, and notify
    keys to the constructor. Also alphabetize the list.
  Switch to using svn_client_create_context().
  Support for the config, cancel, log_msg, and notify keys to the
  Extensive documentation for all the methods, in alpha order, except
    the constructor comes first.
  Refactor the wrapping to better handle the reordering of args. This
    allows us to accept old style function call style with a
    _p_svn_client_ctx_t or SVN::Client object. And support method
    call style for methods that don't actually take a $ctx arg.
  Grammar and typo fixes in the existing documentation.
  New documentation for the notify, log_msg and cancel accessor functions.
  Use shorter and easier constants in the documentation.
  Documentation for the svn_client_commit_item_t
    and svn_client_commit_info_t objects.
  Update TODO.
  Fix spacing in AUTHORS.

* subversion/bindings/swig/apr.i
  Remove the unnecessary apr_time_t FIXME typemap.

Ben Reser <ben@reser.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Wed Jan 7 02:34:43 2004

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.