Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/perl/native/Client.pm view on Meta::CPAN
=item $client-E<gt>export($from, $to, $revision, $force, $pool);
Export the contents of either a subversion repository or a subversion
working copy into a 'clean' directory (meaning a directory with no
administrative directories).
$from is either the path to the working copy on disk, or a URL
to the repository you wish to export.
$to is the path to the directory where you wish to create the exported
tree.
$revision is the revision that should be exported, which is only used
when exporting from a repository. It may be undef otherwise.
The notify callback will be called for the items exported.
Returns the value of the revision actually exported or
$SVN::Core::INVALID_REVNUM for local exports.
=item $client-E<gt>import($path, $url, $nonrecursive, $pool);
Import file or directory $path into repository directory $url at head.
If some components of $url do not exist then create parent directories
as necessary.
If $path is a directory, the contents of that directory are imported
directly into the directory identified by $url. Note that the directory
$path itself is not imported; that is, the basename of $path is not part
of the import.
If $path is a file, then the dirname of $url is the directory receiving the
import. The basename of $url is the filename in the repository. In this case
if $url already exists, raise an error.
The notify callback (if defined) will be called as the import progresses, with
any of the following actions: $SVN::Wc::Notify::Action::commit_added,
$SVN::Wc::Notify::Action::commit_postfix_txdelta.
Use $nonrecursive to indicate that imported directories should not recurse
into any subdirectories they may have.
Uses the log_msg callback to determine the log message for the commit when
one is needed.
Returns a svn_client_commit_info_t object.
=item $client-E<gt>info($path_or_url, $peg_revision, $revision, \&receiver, $recurse);
Invokes \&receiver passing it information about $path_or_url for $revision.
The information returned is system-generated metadata, not the sort of
"property" metadata created by users. For methods available on the object
passed to \&receiver, B<see svn_info_t>.
If both revision arguments are either svn_opt_revision_unspecified or NULL,
then information will be pulled solely from the working copy; no network
connections will be made.
Otherwise, information will be pulled from a repository. The actual node
revision selected is determined by the $path_or_url as it exists in
$peg_revision. If $peg_revision is undef, then it defaults to HEAD for URLs
or WORKING for WC targets.
If $path_or_url is not a local path, then if $revision is PREV (or some other
kind that requires a local path), an error will be returned, because the
desired revision cannot be determined.
Uses the authentication baton cached in ctx to authenticate against the
repository.
If $recurse is true (and $path_or_url is a directory) this will be a recursive
operation, invoking $receiver on each child.
my $receiver = sub {
my( $path, $info, $pool ) = @_;
print "Current revision of $path is ", $info->rev, "\n";
};
$client->info( 'foo/bar.c', undef, 'WORKING', $receiver, 0 );
=item $client-E<gt>log5($targets, $peg_revision, $revision_ranges, $limit, $discover_changed_paths, $strict_node_history, $include_merged_revisions, $revprops, \&log_entry_receiver, $pool);
Invoke C<log_entry_receiver> on each log message from
each revision range in C<$revision_ranges> in turn,
inclusive (but never invoke C<log_entry_receiver> on a given log message more
than once).
C<$targets> is a reference to an array of either a URL followed by zero
or more relative paths, or 1 working copy path, for which log
messages are desired. If the array contains only a single element
you may set C<$targets> to this element instead.
C<log_entry_receiver> is invoked only on messages whose
revisions involved a change to some path in C<$targets>.
C<$peg_revision> indicates in which revision C<$targets> are valid.
If C<$peg_revision> is C<undef>, it defaults to 'HEAD'
for URLs or 'WORKING' for WC paths.
C<$revision_ranges> is either a single I<revision range> or a reference
to an array of them. A I<revision range> may be specified
as a reference to a two-element array C<[$start, $end]>
of L<$revision|/$revision>s or a
L<SVN::Core::svn_opt_revision_range_t|SVN::Core/svn_opt_revision_range_t>
object. Examples:
$revision_ranges = ['HEAD', 1];
$revision_ranges = [[2, 3], [5, 8], [13, 21]];
If C<$limit> is non-zero only invoke C<log_entry_receiver>
on the first C<$limit> logs.
If C<$discover_changed_paths> is true, then the I<changed_paths2> field
in the C<$log_entry> argument to C<log_entry_receiver> will be
populated on each invocation. I<Note:> The I<text_modified> and
I<props_modified> fields of the I<changed_paths2> structure may have the value
C<$SVN::Tristate::unknown> if the repository does not report that information.
If C<$strict_node_history> is true, copy history (if any exists) will
not be traversed while harvesting revision logs for each target.
If C<$include_merged_revisions> is true, log information for revisions
( run in 0.813 second using v1.01-cache-2.11-cpan-3782747c604 )