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

[PATCH] Documenation update for Client.pm

From: Ben Reser <ben_at_reser.org>
Date: 2003-11-27 11:28:34 CET

This patch should be added after the other patch I sent a bit ago that
adds the prompt functions, since it adds some documentation for them.

* subversion/bindings/swig/perl/Client.pm
    Fix the docs so the example actually works. Add documenation for
    get_simple_prompt_provider.

===================================================================
--- subversion/bindings/swig/perl/Client.pm (revision 7861)
+++ subversion/bindings/swig/perl/Client.pm (working copy)
@@ -11,14 +11,32 @@
     require SVN::Client;
     my $ctx = SVN::_Client::new_svn_client_ctx_t ();
 
- $ctx->auth_baton (SVN::Core::auth_open
- ([SVN::Client::get_simple_provider,
- SVN::Client::get_username_provider]));
+ $ctx->auth_baton (SVN::Core::auth_open()
+ ([SVN::Client::get_simple_provider(),
+ SVN::Client::get_simple_prompt_provider(\&simple_prompt,2),
+ SVN::Client::get_username_provider()]));
 
     SVN::Client::cat (\*STDOUT,
                       'http://svn.collab.net/repos/svn/trunk/README',
                       'HEAD', $ctx);
 
+ sub simple_prompt {
+ my $cred = shift;
+ my $realm = shift;
+ my $default_username = shift;
+ my $pool = shift;
+
+ print "Enter authentication info for realm: $realm\n";
+ print "Username: ";
+ my $username = <>;
+ chop($username);
+ $cred->username($username);
+ print "Password: ";
+ my $password = <>;
+ chomp($password);
+ $cred->password($password);
+ }
+
 =head1 DESCRIPTION
 
 SVN::Client wraps the highest level of functions provided by

-- 
Ben Reser <ben@reser.org>
http://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 Thu Nov 27 11:46:10 2003

This is an archived mail posted to the Subversion Dev mailing list.