You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mattias Engdegård <ma...@virtutech.se> on 2006/12/01 13:49:50 UTC

[PATCH] Issue 2646: Perl bindings for more client functions

This patch exports more client API functions to Perl users. Please apply.
This is issue 2646.

(Generally, when an issue has an attached patch fixing it, should I
change the issue type from DEFECT to PATCH? Would doing so increase
the probability that someone actually applied it?)

[[ 
Make many functions added since version 1.0 in the Client API visible
to users of the Perl bindings. They are already swig-wrapped, just not
exported. (issue 2646)

* subversion/bindings/swig/perl/native/Client.pm
  Export more API functions, and refactor to avoid unnecessary repetition.
]] 

Index: subversion/bindings/swig/perl/native/Client.pm
===================================================================
--- subversion/bindings/swig/perl/native/Client.pm	(revision 22204)
+++ subversion/bindings/swig/perl/native/Client.pm	(working copy)
@@ -5,12 +5,22 @@
 use SVN::Wc;
 
 package SVN::Client;
-use SVN::Base qw(Client svn_client_ checkout update switch add mkdir delete
-                 commit status log blame diff merge cleanup relocate
-                 revert resolved copy move revprop_set propset
-                 proplist revvprop_list export ls cat import propget
-                 uuid_from_url uuid_from_path url_from_path revprop_get
-                 revprop_list info); 
+my @_all_fns;
+BEGIN {
+    @_all_fns = qw(add add3 blame blame3 cat cat2 checkout checkout2 cleanup
+                   commit commit3 commit_item2_dup copy copy3 delete delete2
+                   diff diff3 diff_peg3 diff_summarize diff_summarize_peg
+                   export export3 import import2 info info_dup list lock
+                   log log2 log3 ls ls3
+                   merge merge2 merge_peg2 mkdir mkdir2 move move4
+                   propget propget2 proplist proplist2 proplist_item_dup
+                   propset propset2 relocate resolved revert
+                   revprop_get revprop_list revprop_set
+                   status status2 switch unlock update update2
+                   url_from_path uuid_from_path uuid_from_url);
+    require SVN::Base;
+    import SVN::Base (qw(Client svn_client_), @_all_fns);
+}
 
 =head1 NAME
 
@@ -820,13 +830,7 @@
 
 # import methods into our name space and wrap them in a closure
 # to support method calling style $ctx->log()
-foreach my $function (qw(checkout update switch add mkdir delete commit
-                       status log blame diff merge cleanup relocate
-                       revert resolved copy move revprop_set propset
-                       proplist revvprop_list export ls cat import
-                       propget uuid_from_url uuid_from_path
-                       url_from_path revprop_get revprop_list
-                       info))
+foreach my $function (@_all_fns)
 {
     no strict 'refs';
     my $real_function = \&{"SVN::_Client::svn_client_$function"};

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

Re: [PATCH] Issue 2646: Perl bindings for more client functions

Posted by Nik Clayton <ni...@ngo.org.uk>.
Hyrum K. Wright wrote:
> Mattias Engdegård wrote:
>> This patch exports more client API functions to Perl users. Please apply.
>> This is issue 2646.
>>
>> (Generally, when an issue has an attached patch fixing it, should I
>> change the issue type from DEFECT to PATCH? Would doing so increase
>> the probability that someone actually applied it?)
> 
> Ping...
> 
> Has a committer familiar with the perl bindings had a chance to look at
> Mattias's patch?  If nobody comments in the next few days, I'll file an
> issue.

Not a committer, but the patch itself is fine.  What's missing is links to 
the documentation.

This also impinges on the perl-bindings-with-named-params patch that I've 
sent round.

N

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

Re: [PATCH] Issue 2646: Perl bindings for more client functions

Posted by John Peacock <jp...@rowman.com>.
Hyrum K. Wright wrote:
> Has a committer familiar with the perl bindings had a chance to look at
> Mattias's patch?  If nobody comments in the next few days, I'll file an
> issue.
> 
> -Hyrum
> 
>> [[ 
>> Make many functions added since version 1.0 in the Client API visible
>> to users of the Perl bindings. They are already swig-wrapped, just not
>> exported. (issue 2646)
>>
>> * subversion/bindings/swig/perl/native/Client.pm
>>   Export more API functions, and refactor to avoid unnecessary repetition.
>> ]] 

I'm not a committer, but this patch is a complete no-brainer, since it 
is merely marking additional client functions (already implemented via 
SWIG) as being exported.  The much harder problem of actually adding 
documentation to the remainder of the Perl bindings is yet to be 
completed...

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

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

Re: [PATCH] Issue 2646: Perl bindings for more client functions

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Mattias Engdegård wrote:
> This patch exports more client API functions to Perl users. Please apply.
> This is issue 2646.
> 
> (Generally, when an issue has an attached patch fixing it, should I
> change the issue type from DEFECT to PATCH? Would doing so increase
> the probability that someone actually applied it?)

Ping...

Has a committer familiar with the perl bindings had a chance to look at
Mattias's patch?  If nobody comments in the next few days, I'll file an
issue.

-Hyrum

> [[ 
> Make many functions added since version 1.0 in the Client API visible
> to users of the Perl bindings. They are already swig-wrapped, just not
> exported. (issue 2646)
> 
> * subversion/bindings/swig/perl/native/Client.pm
>   Export more API functions, and refactor to avoid unnecessary repetition.
> ]] 
> 
> Index: subversion/bindings/swig/perl/native/Client.pm
> ===================================================================
> --- subversion/bindings/swig/perl/native/Client.pm	(revision 22204)
> +++ subversion/bindings/swig/perl/native/Client.pm	(working copy)
> @@ -5,12 +5,22 @@
>  use SVN::Wc;
>  
>  package SVN::Client;
> -use SVN::Base qw(Client svn_client_ checkout update switch add mkdir delete
> -                 commit status log blame diff merge cleanup relocate
> -                 revert resolved copy move revprop_set propset
> -                 proplist revvprop_list export ls cat import propget
> -                 uuid_from_url uuid_from_path url_from_path revprop_get
> -                 revprop_list info); 
> +my @_all_fns;
> +BEGIN {
> +    @_all_fns = qw(add add3 blame blame3 cat cat2 checkout checkout2 cleanup
> +                   commit commit3 commit_item2_dup copy copy3 delete delete2
> +                   diff diff3 diff_peg3 diff_summarize diff_summarize_peg
> +                   export export3 import import2 info info_dup list lock
> +                   log log2 log3 ls ls3
> +                   merge merge2 merge_peg2 mkdir mkdir2 move move4
> +                   propget propget2 proplist proplist2 proplist_item_dup
> +                   propset propset2 relocate resolved revert
> +                   revprop_get revprop_list revprop_set
> +                   status status2 switch unlock update update2
> +                   url_from_path uuid_from_path uuid_from_url);
> +    require SVN::Base;
> +    import SVN::Base (qw(Client svn_client_), @_all_fns);
> +}
>  
>  =head1 NAME
>  
> @@ -820,13 +830,7 @@
>  
>  # import methods into our name space and wrap them in a closure
>  # to support method calling style $ctx->log()
> -foreach my $function (qw(checkout update switch add mkdir delete commit
> -                       status log blame diff merge cleanup relocate
> -                       revert resolved copy move revprop_set propset
> -                       proplist revvprop_list export ls cat import
> -                       propget uuid_from_url uuid_from_path
> -                       url_from_path revprop_get revprop_list
> -                       info))
> +foreach my $function (@_all_fns)
>  {
>      no strict 'refs';
>      my $real_function = \&{"SVN::_Client::svn_client_$function"};