Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/perl/native/Ra.pm view on Meta::CPAN
=over
=item $reporter-E<gt>set_path($path, $revision, $start_empty, $lock_token, $pool)
Describe a working copy C<$path> as being at a particular C<$revision>.
If C<$start_empty> is true and C<$path> is a directory, the
implementor should assume the directory has no entries or properties.
This will I<override> any previous C<set_path()> calls made on parent
paths. C<$path> is relative to the URL specified in C<SVN::Ra-E<gt>open()>
or C<SVN::Ra-E<gt>new()>.
If C<$lock_token> is not undef, it is the lock token for C<$path> in the WC.
All temporary allocations are done in C<$pool>.
=item $reporter-E<gt>delete_path($path, $pool)
Describe a working copy C<$path> as missing.
All temporary allocations are done in C<$pool>.
=item $reporter-E<gt>link_path($path, $url, $revision, $start_empty, $lock_token, $pool)
Like C<set_path()>, but differs in that C<$path> in the working copy
(relative to the root of the report driver) isn't a reflection of
C<$path> in the repository (relative to the URL specified when
opening the RA layer), but is instead a reflection of a different
repository C<$url> at C<$revision>.
If C<$start_empty> is true and C<$path> is a directory,
the implementor should assume the directory has no entries or props.
If C<$lock_token> is not undef, it is the lock token for C<$path> in the WC.
All temporary allocations are done in C<$pool>.
=item $reporter-E<gt>finish_report($pool)
Call this when the state report is finished; any directories
or files not explicitly 'set' are assumed to be at the
baseline revision originally passed into C<do_update()>. No other
reporting functions, including C<abort_report()>, should be called after
calling this function.
=item $reporter-E<gt>abort_report($pool)
If an error occurs during a report, this method should cause the
filesystem transaction to be aborted and cleaned up. No other reporting
methods should be called after calling this method.
=back
=cut
our $AUTOLOAD;
sub AUTOLOAD {
my $class = ref($_[0]);
$AUTOLOAD =~ s/^${class}::(SUPER::)?//;
return if $AUTOLOAD =~ m/^[A-Z]/;
my $self = shift;
no strict 'refs';
my $method = $self->can("invoke_$AUTOLOAD")
or die "no such method $AUTOLOAD";
no warnings 'uninitialized';
$method->(@$self, @_);
}
package SVN::Ra::Callbacks;
=head1 SVN::Ra::Callbacks
This is the wrapper class for C<svn_ra_callback_t>. To supply custom
callbacks to SVN::Ra, subclass this class and override the member
functions.
=cut
require SVN::Core;
sub new {
my $class = shift;
my $self = bless {}, $class;
%$self = @_;
return $self;
}
sub open_tmp_file {
local $^W; # silence the warning for unopened temp file
my ($self, $pool) = @_;
my ($fd, $name) = SVN::Core::io_open_unique_file(
( File::Temp::tempfile(
'XXXXXXXX', OPEN => 0, DIR => File::Spec->tmpdir
))[1], 'tmp', 1, $pool
);
return $fd;
}
sub get_wc_prop {
return undef;
}
=head1 AUTHORS
Chia-liang Kao E<lt>clkao@clkao.orgE<gt>
=head1 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
( run in 0.848 second using v1.01-cache-2.11-cpan-39bf76dae61 )