Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/subversion/bindings/swig/perl/native/Ra.pm  view on Meta::CPAN

C<$SVN::Core::INVALID_REVNUM>.  If that is the case then the latest revision
will be fetched, and the revision number (the HEAD revision) will be returned
as the second value.  Otherwise the revision number returned will be
completely arbitrary.

The third value returned will be a reference to a hash of all properties
on the directory.  This means I<all> properties: not just ones controlled by
the user and stored in the repository fs, but non-tweakable ones
generated by the SCM system itself (e.g. 'wcprops', 'entryprops', etc).

    my ($dirents, undef, $props) = $ra->get_dir('trunk/dir', 123);
    my ($dirents, $fetched_revnum, $props) = $ra->get_dir(
        'trunk/dir', $SVN::Core::INVALID_REVNUM);

=item $ra-E<gt>get_file($path, $revnum, $fh)

Fetch the contents and properties of the file at C<$path> in revision
C<$revnum>.  C<$fh> should be a Perl filehandle, to which the contents
of the file will be written, or undef if you don't need the file contents.

Note that C<$path> cannot end in a slash unless it is just '/'.

A list of two values are returned.  The first is a number, which is only
valid if C<$revnum> is C<$SVN::Core::INVALID_REVNUM>.  If that is the
case then the latest revision will be fetched, and the revision number
(the HEAD revision) will be returned as the first value.  Otherwise the
number returned will be completely arbitrary.

The second value returned will be a reference to a hash of all properties
on the file.  This means I<all> properties: not just ones controlled by
the user and stored in the repository fs, but non-tweakable ones
generated by the SCM system itself (e.g. 'wcprops', 'entryprops', etc).

    my (undef, $props) = $ra->get_file(
        'trunk/foo', 123, undef);

    open my $fh, '>', 'tmp_out'
        or die "error opening file: $!";
    my (undef, $props) = $ra->get_file(
        'trunk/foo', 123, $fh);

    my ($fetched_revnum, $props) = $ra->get_file(
        'trunk/foo', $SVN::Core::INVALID_REVNUM, $fh);

=item $ra-E<gt>get_file_revs($path, $start, $end, \&callback)

TODO - doesn't seem to work in Subversion 1.3

=item $ra-E<gt>get_latest_revnum

Return the number of the latest revision in the repository (HEAD).

=item $ra-E<gt>get_locations($path, $peg_revnum, \@location_revisions)

TODO - doesn't seem to work in Subversion 1.3

=item $ra-E<gt>get_lock($path)

Returns a L<_p_svn_lock_t|SVN::Core/_p_svn_lock_t> object containing
information about the lock at C<$path>, or undef if that path isn't
currently locked.

=item $ra-E<gt>get_locks($path)

TODO - doesn't seem to work in Subversion 1.3

=item $ra-E<gt>get_log(\@paths, $start, $end, $limit, $discover_changed_paths, $strict_node_history, \&callback)

For C<$limit> revisions from C<$start> to C<$end>, invoke the receiver
C<callback()> with information about the changes made in the revision
(log message, time, etc.).

The caller may not invoke any RA operations using C<$ra> from
within the callback function.  They may work in some situations, but
it's not guaranteed.

The first argument can be either a single string or a reference to an
array of strings.  Each of these indicates a path in the repository
which you are interested in.  Revisions which don't change any of these
paths (or files below them) will be ignored.  Simply pass '' if you don't
want to limit by path.

C<$start> and C<$end> should be revision numbers.  If C<$start> has a lower
value than C<$end> then the revisions will be produced in ascending order
(r1, r2, ...), otherwise in descending order.  If C<$start> is
C<$SVN::Core::INVALID_REVNUM> then it defaults to the latest revision.

TODO - the previous sentence should also be true of $end, but doing that
gets an error message in Subversion 1.3.

C<$limit> is a number indicating the maximum number of times that the
receiver C<callback()> should be called.  If it is 0, there will be no
limit.

If C<$discover_changed_paths> is true, then information about which changes
were made to which paths is passed to C<callback()>.

If C<$strict_node_history> is true, copy history will not be traversed
(if any exists) when harvesting the revision logs for each path.

The callback function will be given the following arguments:

=over

=item *

A reference to a hash of paths changed by the revision.  Only passed if
C<$discover_changed_paths> is true, otherwise undef is passed in its
place.

The hash's keys are the full paths to the files and directories changed.
The values are L<_p_svn_log_changed_path_t|SVN::Core/_p_svn_log_changed_path_t>
objects.

=item *

Revision number.

=item *

Name of user who made the change, or undef if not known.



( run in 2.004 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )