Hi,
while trying to use svn_wc_parse_externals_description3 from Perl I
stumbled over a fex things.
Patches below are against trunk.
perl-bindings-1.patch
[[[
Make svn_wc_parse_externals_description3 available from Perl bindings.
* subversion/bindings/swig/include/svn_containers.swg:
Add output typemap for APR array of svn_wc_external_item2_t.
* subversion/bindings/swig/perl/native/Wc.pm:
Document function svn_wc_parse_externals_description3.
Add the magic to access struct svn_wc_external_item2_t
as an object and document its methods.
* subversion/bindings/swig/perl/native/Core.pm:
Fix a typo that prevented the use of
_p_svn_opt_revision_value_t objects.
]]]
perl-bindings-2.patch
[[[
Replace inline typemap with a function.
* subversion/bindings/swig/include/svn_types.swg:
The bulky input typemap for svn_opt_revision_t is inlined
by Swig for each use in the generated Perl bindings.
Move its body ...
* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
(svn_swig_pl_set_revision): ... to a new function here.
* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h:
Add function prototype.
]]]
perl-bindings-3.patch
[[[
Documentation fix for SVN::Ra.
* subversion/bindings/swig/perl/native/Ra.pm
Fix examples: the $path parameter for SVN::Ra::get_dir() and
SVN::Ra::get_file() must not start with a slash.
]]]
Cheers, Roderich
Index: subversion/bindings/swig/include/svn_containers.swg
===
--- subversion/bindings/swig/include/svn_containers.swg (revision 1440883)
+++ subversion/bindings/swig/include/svn_containers.swg (working copy)
@@ -492,6 +492,12 @@
}
}
#endif
+#ifdef SWIGPERL
+%typemap(argout) apr_array_header_t **externals_p {
+ %append_output
+(svn_swig_pl_convert_array(*$1, $descriptor(svn_wc_external_item2_t *)));
+}
+#endif
#ifdef SWIGRUBY
%typemap(argout) apr_array_header_t **externals_p {
%append_output(svn_swig_rb_apr_array_to_array_external_item2(*$1));
Index: subversion/bindings/swig/perl/native/Wc.pm
===
--- subversion/bindings/swig/perl/native/Wc.pm (revision 1440883)
+++ subversion/bindings/swig/perl/native/Wc.pm (working copy)
@@ -13,12 +13,29 @@
Incomplete
+=cut
+
+swig_init_asp_dot_net_hack($SVN::Core::gpool);
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item SVN::Wc::parse_externals_description3($parent_directory, $desc, $canonicalize_url, $pool);
+
+Parse the string $desc as an C value and return a reference
+to an array of L<_p_svn_wc_external_item2_t|svn_wc_external_item2_t> objects.
+If $canonicalize_url is true, canonicalize the C member of those objects.
+$parent_directory is only used in constructing error strings.
+
+=back
+
+=cut
+
=head1 OBJECTS
=cut
-swig_init_asp_dot_net_hack($SVN::Core::gpool);
-
package _p_svn_wc_t;
=head2 svn_wc_status2_t
@@ -228,6 +245,42 @@
# as method.
use SVN::Base qw(Wc svn_wc_entry_t_);
+=head2 svn_wc_external_item2_t
+
+=over 4
+
+=item $ext-Etarget_dir()
+
+The name of the subdirectory into which this external should be
+checked out. This is relative to the parent directory that
+holds this external item.
+
+=item $ext-Eurl()
+
+Where to check out from. This is possibly a relative external URL, as
+allowed in externals definitions, but without the peg revision.
+
+=item $ext-Erevision()
+
+What revision to check out,
+a L object.
+The only valid kind()s for this are $SVN::Core::opt_revision_number,
+$SVN::Core::opt_revision_date, and $SVN::Core::opt_revision_head.
+
+=item $ext-Epeg_revision()
+
+The peg revision to use when checking out,
+a L object.
+The only valid kind()s for this are $SVN::Core::opt_revision_number,
+$SVN::Core::opt_revision_date, and $SVN::Core::opt_revision_head.
+
+=back
+
+=cut
+
+package _p_svn_wc_external_item2_t;
+use SVN::Base qw(Wc svn_wc_external_item2_t_);
+
=head1 CONSTANTS
=head2 SVN::Wc::Notify::Action
Index: subversion/bindings/swig/perl/native/Core.pm
===
--- subversion/bindings/swig/perl/native/Core.pm (revision 1440883)
+++ subversion/bindings/swig/perl/native/Core.pm (working copy)
@@ -774,8 +774,8 @@
=cut
-package _p_svn_opt_revision_t_value;
-use SVN::Base qw(Core svn_opt_revision_t_value_);
+package _p_svn_opt_revision_value_t;
+use SVN::Base qw(Core svn_opt_revision_value_t_);
package _p_svn_config_t;
use SVN::Base qw(Core svn_config_);
Index: subversion/bindings/swig/include/svn_types.swg
===
--- subversion/bindings/swig/include/svn_types.swg (revision 1440883)
+++ subversion/bindings/swig/include/svn_types.swg (working copy)
@@ -1170,52 +1170,7 @@
#ifdef SWIGPERL
%typemap(in) svn_opt_revision_t * (svn_opt_revision_t rev) {
$1 = &rev;
-if ($input == NULL || $input == &PL_sv_undef || !SvOK($input)) {
-rev.kind = svn_opt_revision_unspecifie