Manual Pages for UNIX Darwin command on man SVN::Core
MyWebUniversity

Manual Pages for UNIX Darwin command on man SVN::Core

native::Core(3) User Contributed Perl Documentation native::Core(3)

NAME

SVN::Core - Core module of the subversion perl bindings

SYNOPSIS

use SVN::Core; # does aprinitialize and cleanup for you

# create a root pool and set it as default pool for later use

my $pool = SVN::Pool->newdefault;

sub something {

# create a subpool of the current default pool

my $pool = SVN::Pool->newdefaultsub;

# some svn operations...

# $pool gets destroyed and the previous default pool

# is restored when $pool's lexical scope ends

}

# svnstreamt as native perl io handle

my $stream = $txn->root->applytext('trunk/filea', undef);

print $stream $text;

close $stream;

# native perl io handle as svnstreamt

SVN::Repos::dumpfs($repos, \*STDOUT, \*STDERR,

0, $repos->fs->youngestrev, 0);

DESCRIPTION

SVN::Core implements higher level functions of fundamental subversion

functions. FFUUNNCCTTIIOONNSS

SVN::Core::authopen([auth provider array]);

Takes a reference to an array of authentication providers and returns an authbaton. If you use prompt providers you can not use this function, but need to use the authopenhelper.

SVN::Core::authopenhelper([auth provider array);

Prompt providers return two values instead of one. The 2nd parameter is a reference to whatever was passed into them as the callback. authopenhelper splits up these arguments, passing the provider objects into authopen which gives it an authbaton and putting the other ones in an array. The first return value of this function is the authbaton, the second is a reference to an array containing the references to the callbacks. These callback arrays should be stored in the object the authbaton is attached to. OOTTHHEERR OOBBJJEECCTTSS

ssvvnnssttrreeaammtt - SSVVNN::::SSttrreeaamm

You can use native perl io handles (including io globs) as svnstreamt in subversion functions. Returned svnstreamt are also translated into perl io handles, so you could access them with regular print, read, etc. Note that some functions take a stream to read or write, while it does not close it but still hold the reference to the handle. In this case the handle won't be destroyed properly. You should always use correct default pool before calling such functions.

ssvvnnppoooolltt - SSVVNN::::PPooooll

The perl bindings significantly simplify the usage of pools, while still being manually adjustable. Functions requiring pool as the last argument (which are, almost all of the subversion functions), the pool is optionally. The default pool is used if it is omitted. If default pool is not set, a new root pool will be created and set as default automatically when the first function requiring a default pool is called. For callback functions providing pool to your subroutine, you could

also use $pool->default to make it the default pool in the scope.

Methods

new ([$parent])

Create a new pool. The pool is a root pool if $parent is not

supplied.

newdefault ([$parent])

Create a new pool. The pool is a root pool if $parent is not

supplied. Set the new pool as default pool. newdefaultsub Create a new subpool of the current default pool, and set the resulting pool as new default pool. clear Clear the pool. destroy Destroy the pool. If the pool is the default pool, restore the previous default pool as default. This is normally called automatically when the SVN::Pool object is no longer used and destroyed by the perl garbage collector.

ssvvnneerrrroorrtt - SSVVNN::::EErrrroorr

By default the perl bindings handle exceptions for you. The default handler automatically croaks with an appropriate error message. This is likely sufficient for simple scripts, but more complex usage may demand handling of errors. You can override the default exception handler by changing the

$SVN::Error::handler variable. This variable holds a reference to a

perl sub that should be called whenever an error is returned by a svn function. This sub will be passed a svnerrort object. Its return value is ignored.

If you set the $SVN::Error::handler to undef then each call will return

an svnerrort object as its first return in the case of an error, followed by the normal return values. If there is no error then a svnerrort will not be returned and only the normal return values will be returned. When using this mode you should be careful only to call

functions in array context. For example: my ($ci) =

$ctx->mkdir('http://svn/foo'); In this case $ci will be an svnerrort

object if an error occurs and a svnclientcommitinfo object

otherwise. If you leave the parenthesis off around $ci (scalar

context) it will be the commitinfo object, which in the case of an error will be undef. If you plan on using this exception handling, understanding the exception handling system the C API uses is helpful. You can find information on it in the HACKING file and the API documentation. Looking at the implementation of SVN::Error::croakonerror and SVN::Error::expandedmessage may be helpful as well.

$svnerrort->aprerr()

APR error value, possibly SVN custom error.

$svnerrort->message()

Details from producer of error.

$svnerrort->child()

svnerrort object of the error that's wrapped.

$svnerrort->pool()

The pool holding this error and any child errors it wraps.

$svnerrort->file()

Source file where the error originated.

$svnerrort->line()

Source line where the error originated.

SVN::Error::strerror($aprstatust)

Returns the english description of the status code.

$svnerrort->strerror()

Returns the english description of the aprerr status code set on

the $svnerrort. This is short for:

SVN::Error::strerror($svnerrort->aprerr());

SVN::Error::create($aprerr, $child, $message);

Returns a new svnerrort object with the error status specified in

$aprerr, the child as $child, and error message of $message.

SVN::Error::quickwrap($child, $newmsg); or

$child->quickwrap($newmsg);

A quick n' easy way to create a wrappered exception with your own message before throwing it up the stack.

$child is the svnerrort object you want to wrap and $newmsg is

the new error string you want to set.

SVN::Error::compose($chain, $newerror); or

$chain->compose($newerror);

Add newerr to the end of $chain's chain of errors.

The $newerr chain will be copied into $chain's pool and destroyed,

so $newerr itself becomes invalid after this function.

SVN::Error::clear($svnerrort); or $svnerrort->clear();

Free the memory used by $svnerrort, as well as all ancestors and

descendants of $svnerrort.

You must call this on every svnerrort object you get or you will leak memory.

SVN::Error::expandedmessage($svnerrort) or

$svnerrort->expandedmessage()

Returns the error message by tracing through the svnerrort object and its children and concatenating the error messages. This is how the internal exception handlers get their error messages.

SVN::Error::iserror($value)

Returns true if the value is an svnerror type return. Returns false if the value is anything else or undefined. This is useful for seeing if a call has returned an error. SVN::Error::croakonerror Default error handler. It takes an svnerrort and extracts the error messages from it and croaks with those messages. It can be used two ways. The first is detailed above as setting it as the automatic exception handler via setting

$SVN::Error::handler.

The 2nd is if you have $SVN::Error::handler set to undef as a

wrapper for calls you want to croak on when there is an error but don't want to have to write an explicit error handler for example: my

$resultrev=SVN::Error::croakonerror($ctx->checkout($url,$path,'HEAD',1));

If there is no error then croakonerror will return the arguments passed to it unchanged. SVN::Error::confessonerror The same as croakonerror except it will give a more detailed stack backtrace. Including showing internal calls within the implementations of the perl bindings. This is useful if you're working on developing the bindings. SVN::Error::ignoreerror This is useful for wrapping around calls which you wish to ignore any potential error. It checks to see if the first parameter is an error and if it is it clears it. It then returns all the other parameters. ssvvnnllooggcchhaannggeeddppaatthhtt

$lcp->action()

'A'dd, 'D'elete, 'R'eplace, 'M'odify

$lcp->copyfrompath()

Source path of copy (if any).

$lcp->copyfromrev()

Source revision of copy (if any).

ssvvnnnnooddeekkiinnddtt - SSVVNN::::NNooddee

An enum of the following constants:

$SVN::Node::none, $SVN::Node::file, $SVN::Node::dir,

$SVN::Node::unknown.

ssvvnnooppttrreevviissiioonntt ssvvnnccoonnffiiggtt Opaque object describing a set of configuration options. ssvvnnddiirreenntttt

$dirent->kind()

Node kind. One of these constants: $SVN::Node::none,

$SVN::Node::file, $SVN::Node::dir, $SVN::Node::unknown.

$dirent->size()

Length of file text, or 0 for directories.

$dirent->hasprops()

Does the node have props?

$dirent->createdrev()

Last rev in which this node changed.

$dirent->time()

Time of createdrev (mod-time).

$dirent->lastauthor()

Author of created rev. ssvvnnaauutthhccrreeddssiimmpplleett

$simple->username()

Username.

$simple->password()

Password.

$simple->maysave()

Indicates if the credentials may be saved (to disk). ssvvnnaauutthhccrreedduusseerrnnaammeett

$username->username()

Username.

$username->maysave()

Indicates if the credentials may be saved (to disk). ssvvnnaauutthhccrreeddssssllsseerrvveerrttrruusstttt

$strust->maysave()

Indicates if the credentials may be saved (to disk).

$strust->acceptedfailures()

Bit mask of the accepted failures. ssvvnnaauutthhssssllsseerrvveerrcceerrttiinnffoott

$scert->hostname()

Primary CN.

$scert->fingerprint()

ASCII fingerprint.

$scert->validfrom()

ASCII date from which the certificate is valid.

$scert->validuntil()

ASCII date until which the certificate is valid.

$scert->issuerdname()

DN of the certificate issuer.

$scert->asciicert()

Base-64 encoded DER certificate representation.

ssvvnnaauutthhccrreeddssssllcclliieennttcceerrtttt

$ccert->certfile()

Full paths to the certificate file.

$ccert->maysave()

Indicates if the credentials may be saved (to disk). ssvvnnaauutthhccrreeddssssllcclliieennttcceerrttppwwtt

$ccertpw->password()

Certificate password.

$ccertpw->maysave()

Indicates if the credentials may be saved (to disk). CCOONNSSTTAANNTTSS SSVVNN::::AAuutthh::::SSSSLL

$SVN::Auth::SSL::NOTYETVALID

Certificate is not yet valid.

$SVN::Auth::SSL::EXPIRED

Certificate has expired.

$SVN::Auth::SSL::CNMISMATCH

Certificate's CN (hostname) does not match the remote hostname.

$SVN::Auth::SSL::UNKNOWNCA

Certificate authority is unknown (i.e. not trusted).

$SVN::Auth::SSL::OTHER

Other failure. This can happen if neon has introduced a new failure bit that we do not handle yet. AUTHORS

Chia-liang Kao

COPYRIGHT Copyright (c) 2003 CollabNet. All rights reserved. This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also

available at http://subversion.tigris.org/license-1.html. If newer

versions of this license are posted there, you may use a newer version instead, at your option. This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history and logs, available at http://subversion.tigris.org/.

perl v5.8.8 2006-02-17 native::Core(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™