perldoc > SVN::Client

๐Ÿ“˜ NAME

SVN::Client - Subversion client functions

๐Ÿš€ Quick Reference

Use CaseCommandDescription
๐Ÿ“ฆ Checkout a repository$client->checkout($url, $path, $revision, $recursive, $pool);Checkout a working copy from repository URL
๐Ÿ”„ Update working copy$client->update($path, $revision, $recursive, $pool);Update working copy to latest revision
โœ… Commit changes$client->commit($targets, $nonrecursive, $pool);Commit files/directories to repository
โž• Add files to version control$client->add($path, $recursive, $pool);Schedule file for addition
๐Ÿ“„ View file content$client->cat(\*FILEHANDLE, $target, $revision, $pool);Output file content to filehandle
๐Ÿ“œ Show log history$client->log($targets, $start, $end, $discover_changed_paths, $strict_node_history, \&receiver, $pool);Retrieve log messages
๐Ÿ”€ Merge branches$client->merge($src1, $rev1, $src2, $rev2, $target_wcpath, $recursive, $ignore_ancestry, $force, $dry_run, $pool);Merge changes from one source to another
๐Ÿšซ Revert local changes$client->revert($paths, $recursive, $pool);Restore pristine version of files
๐Ÿ“Š Show status$client->status($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $pool);Get working copy status

๐Ÿ“‹ SYNOPSIS

use SVN::Client;
my $client = new SVN::Client();

# setup to handle authentication the same as the command line client
my $config_dir = undef; # use default location
my $config = SVN:Core::config_get_config($config_dir);
my $config_category = $cfg->{SVN::Core::CONFIG_CATEGORY_CONFIG};
$client->auth(
  SVN::Core::cmdline_create_auth_baton(0,           #non_interactive
                                       undef,       #username
                                       undef,       #password
                                       $config_dir,
                                       0,           #no_auth_cache
                                       0,           #trust_server_cert
                                       $config_category,
                                       undef)       #cancel_callback
);

# Use first argument as target and canonicalize it before using
my $target;
if (SVN::Core::path_is_url($ARGV[0])) {
  $target = SVN::Core::uri_canonicalize($ARGV[0]);
} else {
  $target = SVN::Core::dirent_canonicalize($ARGV[0]);
}

# fetch the head revision of the target
$client->cat(\*STDOUT, $target, 'HEAD');

๐Ÿ“– DESCRIPTION

๐Ÿ“ฆ SVN::Client wraps the highest level of functions provided by subversion to accomplish specific tasks in an object oriented API. Methods are similar to the functions provided by the C API and as such the documentation for it may be helpful in understanding this interface.

โš ๏ธ There are a few notable differences from the C API. Most C function calls take a svn_client_ctx_t pointer as the next to last parameter. The Perl method calls take a SVN::Client object as the first parameter. This allows method call invocation of the methods to be possible. For example, the following are equivalent:

SVN::Client::add($client,$path, $recursive, $pool);
$client->add($path, $recursive, $pool);

๐Ÿ’ง Many of the C API calls also take a apr_pool_t pointer as their last argument. The Perl bindings generally deal with this for you and you do not need to pass a pool parameter. However, you may still pass a pool parameter as the last parameter to override the automatic handling of this for you.

๐Ÿ”ง Users of this interface should not directly manipulate the underlying hash values but should use the respective attribute methods. Many of these attribute methods do other things, especially when setting an attribute, besides simply manipulating the value in the hash.

๐Ÿ“Œ PARAMETER NOTES

The client methods described below take a variety of parameters. Many of them are similar. Methods accepting parameters named below will follow the rules below or will be noted otherwise in the method description.

โš™๏ธ METHODS

The following methods are available:

๐Ÿ†• Constructor

๐Ÿ“ File Operations

๐Ÿ”ง ATTRIBUTE METHODS

The following attribute methods are provided that allow you to set various configuration or retrieve it. They all take value(s) to set the attribute and return the new value of the attribute or no parameters which returns the current value.

๐Ÿ”‘ AUTHENTICATION PROVIDERS

The following functions get authentication providers for you. They come in two forms. Standard or File versions, which look for authentication information in the subversion configuration directory that was previously cached, or Prompt versions which call a subroutine to allow you to prompt the user for the information.

The functions that return the svn_auth_provider_object_t for prompt style providers take a reference to a Perl subroutine to use for the callback. The first parameter each of these subroutines receive is a credential object. The subroutines return the response by setting members of that object. Members may be set like so: $cred->username("breser"); These functions and credential objects always have a may_save member which specifies if the authentication data will be cached.

The providers are as follows:

NAMEWHAT IT HANDLES
simpleusername and password pairs
usernameusername only
ssl_server_trustserver certificates and failures authenticating them
ssl_client_certclient side certificate files
ssl_client_cert_pwpassword for a client side certificate file.

๐Ÿ›‘ CANCELLATION CALLBACK

This callback will be called periodically to see if the operation should be canceled. If the operation should be canceled, the function may return one of the following values:

๐Ÿ“ฆ OBJECTS

These are some of the object types that are returned from the methods and functions. Others are documented in SVN::Core and SVN::Wc. If an object is not documented, it is more than likely opaque and not something you can do anything with, except pass to other functions that require such objects.

๐Ÿ“„ svn_info_t

See SVN::Wc::svn_wc_entry_t for the rest of these. svn_client.h indicates that these were copied from that struct and mean the same things. They are also only useful when working with a WC.

๐Ÿ“ฆ svn_client_commit_item3_t

โœ… svn_client_commit_info_t

๐Ÿ“‹ svn_client_proplist_item_t

๐Ÿ“Š svn_client_diff_summarize_kind_t - SVN::Summarize

An enum of the following constants:

๐Ÿ“Š svn_client_diff_summarize_t

โž• ADDITIONAL METHODS

The following methods work, but are not currently documented in this file. Please consult the svn_client.h section in the Subversion API for more details.

๐Ÿ“ TODO

๐Ÿ‘ฅ AUTHORS

ยฉ๏ธ COPYRIGHT

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
SVN::Client
๐Ÿ“˜ NAME ๐Ÿš€ Quick Reference ๐Ÿ“‹ SYNOPSIS ๐Ÿ“– DESCRIPTION ๐Ÿ“Œ PARAMETER NOTES โš™๏ธ METHODS
๐Ÿ†• Constructor ๐Ÿ“ File Operations
๐Ÿ”ง ATTRIBUTE METHODS ๐Ÿ”‘ AUTHENTICATION PROVIDERS ๐Ÿ›‘ CANCELLATION CALLBACK ๐Ÿ“ฆ OBJECTS
๐Ÿ“„ svn_info_t ๐Ÿ“ฆ svn_client_commit_item3_t โœ… svn_client_commit_info_t ๐Ÿ“‹ svn_client_proplist_item_t ๐Ÿ“Š svn_client_diff_summarize_kind_t - SVN::Summarize ๐Ÿ“Š svn_client_diff_summarize_t
โž• ADDITIONAL METHODS ๐Ÿ“ TODO ๐Ÿ‘ฅ AUTHORS ยฉ๏ธ COPYRIGHT

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-01 06:58 @216.73.216.14
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^