.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "native::Ra 3perl" .TH native::Ra 3perl 2024-04-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME SVN::Ra \- Subversion remote access functions .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use SVN::Core; \& use SVN::Ra; \& \& my $ra = SVN::Ra\->new(\*(Aqfile:///tmp/svntest\*(Aq); \& print $ra\->get_latest_revnum; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" SVN::Ra wraps the object-oriented \f(CW\*(C`svn_ra_plugin_t\*(C'\fR functions, providing access to a Subversion repository though a URL, using whichever repository access module is appropriate. .SH SVN::Ra .IX Header "SVN::Ra" .SS SVN::Ra\->new(...) .IX Subsection "SVN::Ra->new(...)" The constructor creates an RA object and calls \f(CW\*(C`open\*(C'\fR for it. Its parameters are either a hash of options or a single value containing the URL of the repository. Valid options are: .IP url 4 .IX Item "url" The URL of the repository. .IP auth 4 .IX Item "auth" An \f(CW\*(C`auth_baton\*(C'\fR could be given to the SVN::RA object. Defaults to an \&\f(CW\*(C`auth_provider\*(C'\fR with a \f(CW\*(C`username_provider\*(C'\fR. See SVN::Client for how to create \f(CW\*(C`auth_baton\*(C'\fR. .IP pool 4 .IX Item "pool" The pool for the RA session to use. Member functions will also be called with this pool. Defaults to a newly created root pool. .IP config 4 .IX Item "config" The config hash that could be obtained by calling \&\f(CWSVN::Core::config_get_config(undef)\fR. .IP callback 4 .IX Item "callback" The \f(CW\*(C`ra_callback\*(C'\fR namespace to use. Defaults to SVN::Ra::Callbacks. .PP The following examples will both do the same thing, with all the optional arguments taking their defaults: .PP .Vb 2 \& my $ra = SVN::Ra\->new(\*(Aqfile:///tmp/repos\*(Aq); \& my $ra = SVN::Ra\->new(url => \*(Aqfile:///tmp/repos\*(Aq); .Ve .SS METHODS .IX Subsection "METHODS" Please consult the svn_ra.h section in the Subversion API. Member functions of \f(CW\*(C`svn_ra_plugin_t\*(C'\fR can be called as methods of SVN::Ra objects, with the \f(CW\*(C`session_baton\*(C'\fR and \f(CW\*(C`pool\*(C'\fR arguments omitted. .ie n .IP "$ra\->change_rev_prop($revnum, $name, $value)" 4 .el .IP "\f(CW$ra\fR\->change_rev_prop($revnum, \f(CW$name\fR, \f(CW$value\fR)" 4 .IX Item "$ra->change_rev_prop($revnum, $name, $value)" Sets the revision (unversioned) property \f(CW$name\fR to \f(CW$value\fR on revision \f(CW$revnum\fR, or removes the property if \f(CW$value\fR is undef. .Sp .Vb 1 \& $ra\->change_rev_prop(123, \*(Aqsvn:log\*(Aq, \*(AqNew log message.\*(Aq); .Ve .Sp Of course this will only work if there is a \f(CW\*(C`pre\-revprop\-change\*(C'\fR hook available. .ie n .IP "$ra\->check_path($path, $revnum)" 4 .el .IP "\f(CW$ra\fR\->check_path($path, \f(CW$revnum\fR)" 4 .IX Item "$ra->check_path($path, $revnum)" Kind of node at \f(CW$path\fR in revision \f(CW$revnum\fR. A number which matches one of these constants: \&\f(CW$SVN::Node::none\fR, \f(CW$SVN::Node::file\fR, \&\f(CW$SVN::Node::dir\fR, \f(CW$SVN::Node::unknown\fR. .ie n .IP "$ra\->do_diff($revision, $target, $recurse, $ignore_ancestry, $versus_url, $editor)" 4 .el .IP "\f(CW$ra\fR\->do_diff($revision, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$ignore_ancestry\fR, \f(CW$versus_url\fR, \f(CW$editor\fR)" 4 .IX Item "$ra->do_diff($revision, $target, $recurse, $ignore_ancestry, $versus_url, $editor)" .PD 0 .ie n .IP "$ra\->do_diff2($revision, $target, $recurse, $ignore_ancestry, $text_deltas, $versus_url, $editor)" 4 .el .IP "\f(CW$ra\fR\->do_diff2($revision, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$ignore_ancestry\fR, \f(CW$text_deltas\fR, \f(CW$versus_url\fR, \f(CW$editor\fR)" 4 .IX Item "$ra->do_diff2($revision, $target, $recurse, $ignore_ancestry, $text_deltas, $versus_url, $editor)" .PD Both of these return a SVN::Ra::Reporter with which you can describe a working copy. It will then call methods on \f(CW$editor\fR to indicates the differences between the repository and the working copy. .Sp The \f(CW\*(C`do_diff2\*(C'\fR method was added in Subversion\ 1.4. It adds the \&\f(CW$text_deltas\fR option, which if false disables the generation of text deltas on the editor. With \f(CW\*(C`do_diff\*(C'\fR text deltas are always generated. .Sp .Vb 4 \& my $reporter = $ra\->do_diff(1, \*(Aq\*(Aq, 1, 0, $repos_url, \& MyEditor\->new); \& $reporter\->set_path(...); \& $reporter\->finish_report; .Ve .ie n .IP "$ra\->do_status($target, $revision, $recurse, $editor)" 4 .el .IP "\f(CW$ra\fR\->do_status($target, \f(CW$revision\fR, \f(CW$recurse\fR, \f(CW$editor\fR)" 4 .IX Item "$ra->do_status($target, $revision, $recurse, $editor)" Returns a SVN::Ra::Reporter to which you can describe the status of a working copy. It will then call methods on \f(CW$editor\fR to describe the current status of the working copy compared to the repository. .ie n .IP "$ra\->do_switch($revnum, $target, $recurse, $repos_url, $editor)" 4 .el .IP "\f(CW$ra\fR\->do_switch($revnum, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$repos_url\fR, \f(CW$editor\fR)" 4 .IX Item "$ra->do_switch($revnum, $target, $recurse, $repos_url, $editor)" Returns a SVN::Ra::Reporter with which you can describe a working copy. It will then call methods on \f(CW$editor\fR to indicate how to adjust the working copy to switch it to revision \f(CW$revnum\fR of \f(CW$repos_url\fR. .ie n .IP "$ra\->do_update($revision_to_update_to, $target, $recurse, $editor)" 4 .el .IP "\f(CW$ra\fR\->do_update($revision_to_update_to, \f(CW$target\fR, \f(CW$recurse\fR, \f(CW$editor\fR)" 4 .IX Item "$ra->do_update($revision_to_update_to, $target, $recurse, $editor)" Returns a SVN::Ra::Reporter object. Call methods on the reporter to describe the current state of your working copy (or whatever you're updating). After calling the reporter's \f(CWfinish_report()\fR method, Subversion will generate calls to your \f(CW$editor\fR to describe the differences between what you already have and the state of the repository in \&\f(CW$revision_to_update_to\fR. .Sp To update to the latest revision, pass \f(CW$SVN::Core::INVALID_REVNUM\fR for the first argument. .Sp \&\f(CW$target\fR should be the path to the part of the repository you are interested in. You won't be given information about changes outside this path. If you want everything, pass an empty string. .Sp If \f(CW$recurse\fR is true and the target is a directory, update recursively; otherwise, update just the target and its immediate entries, but not its child directories (if any). .Sp All paths are relative to the URL used to open \f(CW$ra\fR. .Sp The caller may not perform any RA operations using \f(CW$ra\fR before finishing the report, and may not perform any RA operations using \&\f(CW$ra\fR from within the editing operations of \f(CW$editor\fR. .Sp This example shows the simplest update, where the client tells the reporter that it has nothing to start with: .Sp .Vb 3 \& my $reporter = $ra\->do_update($revnum, \*(Aq\*(Aq, 1, MyEditor\->new); \& $reporter\->set_path(\*(Aq\*(Aq, 0, 1, undef); \& $reporter\->finish_report; .Ve .ie n .IP "$ra\->get_commit_editor($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" 4 .el .IP "\f(CW$ra\fR\->get_commit_editor($logmsg, \f(CW$callback\fR, \f(CW$callback_baton\fR, \f(CW$lock_tokens\fR, \f(CW$keep_locks\fR)" 4 .IX Item "$ra->get_commit_editor($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" .PD 0 .ie n .IP "$ra\->get_commit_editor2($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" 4 .el .IP "\f(CW$ra\fR\->get_commit_editor2($logmsg, \f(CW$callback\fR, \f(CW$callback_baton\fR, \f(CW$lock_tokens\fR, \f(CW$keep_locks\fR)" 4 .IX Item "$ra->get_commit_editor2($logmsg, $callback, $callback_baton, $lock_tokens, $keep_locks)" .PD Return an opaque editor object for committing a new revision to the repository. The return values should be passed to the SVN::Delta::Editor constructor to create an editor object you can actually use. For example: .Sp .Vb 4 \& my $editor = SVN::Delta::Editor\->new( \& $ra\->get_commit_editor( \& "I\*(Aqm going to commit some changes from within my Perl code.", \& \e&commit_callback, undef, {}, 0)); .Ve .Sp Now that you've got your editor you can call methods on it to describe changes in the tree you want to make, such as adding directories, changing file contents, etc. See SVN::Delta for documentation of the editor interface. .Sp The \f(CW$callback\fR function will be called during your call to the \&\f(CW\*(C`$ed\->close_edit()\*(C'\fR method, after the commit has succeeded. It will not be called if there were no changes to commit. If you don't need it, pass undef instead of a code ref. .Sp \&\f(CW\*(C`get_commit_editor2\*(C'\fR is identical to \f(CW\*(C`get_commit_editor\*(C'\fR except for the information passed to the callback function. The new version, added in Subversion\ 1.4, will pass the callback a single value (TODO: I can' test this, but it's probably an object or hash ref) which contains all the information. It also includes the error message from the post-commit hook script, which is not available with \f(CW\*(C`get_commit_editor\*(C'\fR. .Sp The callback for the original version will be passed three arguments: .RS 4 .IP \(bu 4 Number of the new revision. .IP \(bu 4 Date and time that the revision was committed, which will be exactly the same value as its \f(CW\*(C`svn:date\*(C'\fR revision property. It will be in this format: \f(CW\*(C`2006\-04\-05T12:17:48.180320Z\*(C'\fR .IP \(bu 4 The name of the author who committed the revision, which will be the same as the \f(CW\*(C`svn:author\*(C'\fR revision property. .RE .RS 4 .Sp The undef in the argument list in the example above is the baton which is meant to be passed to the commit callback, but it isn't. This isn't a problem since you can supply a closure as the callback so that it can get to whatever variables you need. .Sp The \f(CW$logmsg\fR value should be a string which will be stored in the \&\f(CW\*(C`svn:log\*(C'\fR revision property. If undef is passed instead then the new revision won't have a \f(CW\*(C`svn:log\*(C'\fR property. .Sp \&\f(CW$lock_tokens\fR should be a reference to a hash mapping the paths to lock tokens to use for them. I seems that with Subversion\ 1.2 this is required, so if you aren't using any locks simply pass \f(CW\*(C`{}\*(C'\fR. In Subversion\ 1.3.1 though it seems to be necessary to \fInot\fR pass this argument at all. .Sp If \f(CW$keep_locks\fR is true then locks on the files committed won't be released by the commit. .Sp The \f(CWget_commit_editor()\fR method itself returns a list of two items, the first of which (a \f(CW\*(C`_p_svn_delta_editor_t\*(C'\fR object) is the actual editor. The second is the editor baton. Neither is of any use without wrapping the pair of them in a SVN::Delta::Editor. .RE .ie n .IP $ra\->get_dated_revision($time) 4 .el .IP \f(CW$ra\fR\->get_dated_revision($time) 4 .IX Item "$ra->get_dated_revision($time)" TODO \- this doesn't seem to work in Subversion\ 1.3. .ie n .IP "$ra\->get_dir($path, $revnum)" 4 .el .IP "\f(CW$ra\fR\->get_dir($path, \f(CW$revnum\fR)" 4 .IX Item "$ra->get_dir($path, $revnum)" .PD 0 .ie n .IP "$ra\->get_dir2($path, $revnum, $dirent_fields)" 4 .el .IP "\f(CW$ra\fR\->get_dir2($path, \f(CW$revnum\fR, \f(CW$dirent_fields\fR)" 4 .IX Item "$ra->get_dir2($path, $revnum, $dirent_fields)" .PD Fetch the directory entries and properties of the directory at \f(CW$path\fR in revision \f(CW$revnum\fR .Sp A list of three values are returned. The first is a reference to a hash of directory entries. The keys are the names of all the files and directories in \f(CW$path\fR (not full paths, just the filenames). The values are _p_svn_dirent_t objects, with all their fields filled in. The third parameter to \f(CW\*(C`get_dir2\*(C'\fR allows you to select particular fields. TODO: I don't think the constants you'd use to construct the \f(CW$dirent_fields\fR value are provided in the Perl API. .Sp The second value is a number, which is only valid if \f(CW$revnum\fR is \&\f(CW$SVN::Core::INVALID_REVNUM\fR. 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. .Sp The third value returned will be a reference to a hash of all properties on the directory. This means \fIall\fR 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). .Sp .Vb 3 \& my ($dirents, undef, $props) = $ra\->get_dir(\*(Aqtrunk/dir\*(Aq, 123); \& my ($dirents, $fetched_revnum, $props) = $ra\->get_dir( \& \*(Aqtrunk/dir\*(Aq, $SVN::Core::INVALID_REVNUM); .Ve .ie n .IP "$ra\->get_file($path, $revnum, $fh)" 4 .el .IP "\f(CW$ra\fR\->get_file($path, \f(CW$revnum\fR, \f(CW$fh\fR)" 4 .IX Item "$ra->get_file($path, $revnum, $fh)" Fetch the contents and properties of the file at \f(CW$path\fR in revision \&\f(CW$revnum\fR. \f(CW$fh\fR 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. .Sp Note that \f(CW$path\fR cannot end in a slash unless it is just '/'. .Sp A list of two values are returned. The first is a number, which is only valid if \f(CW$revnum\fR is \f(CW$SVN::Core::INVALID_REVNUM\fR. 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. .Sp The second value returned will be a reference to a hash of all properties on the file. This means \fIall\fR 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). .Sp .Vb 2 \& my (undef, $props) = $ra\->get_file( \& \*(Aqtrunk/foo\*(Aq, 123, undef); \& \& open my $fh, \*(Aq>\*(Aq, \*(Aqtmp_out\*(Aq \& or die "error opening file: $!"; \& my (undef, $props) = $ra\->get_file( \& \*(Aqtrunk/foo\*(Aq, 123, $fh); \& \& my ($fetched_revnum, $props) = $ra\->get_file( \& \*(Aqtrunk/foo\*(Aq, $SVN::Core::INVALID_REVNUM, $fh); .Ve .ie n .IP "$ra\->get_file_revs($path, $start, $end, \e&callback)" 4 .el .IP "\f(CW$ra\fR\->get_file_revs($path, \f(CW$start\fR, \f(CW$end\fR, \e&callback)" 4 .IX Item "$ra->get_file_revs($path, $start, $end, &callback)" TODO \- doesn't seem to work in Subversion 1.3 .ie n .IP $ra\->get_latest_revnum 4 .el .IP \f(CW$ra\fR\->get_latest_revnum 4 .IX Item "$ra->get_latest_revnum" Return the number of the latest revision in the repository (HEAD). .ie n .IP "$ra\->get_locations($path, $peg_revnum, \e@location_revisions)" 4 .el .IP "\f(CW$ra\fR\->get_locations($path, \f(CW$peg_revnum\fR, \e@location_revisions)" 4 .IX Item "$ra->get_locations($path, $peg_revnum, @location_revisions)" TODO \- doesn't seem to work in Subversion 1.3 .ie n .IP $ra\->get_lock($path) 4 .el .IP \f(CW$ra\fR\->get_lock($path) 4 .IX Item "$ra->get_lock($path)" Returns a _p_svn_lock_t object containing information about the lock at \f(CW$path\fR, or undef if that path isn't currently locked. .ie n .IP $ra\->get_locks($path) 4 .el .IP \f(CW$ra\fR\->get_locks($path) 4 .IX Item "$ra->get_locks($path)" TODO \- doesn't seem to work in Subversion 1.3 .ie n .IP "$ra\->get_log(\e@paths, $start, $end, $limit, $discover_changed_paths, $strict_node_history, \e&callback)" 4 .el .IP "\f(CW$ra\fR\->get_log(\e@paths, \f(CW$start\fR, \f(CW$end\fR, \f(CW$limit\fR, \f(CW$discover_changed_paths\fR, \f(CW$strict_node_history\fR, \e&callback)" 4 .IX Item "$ra->get_log(@paths, $start, $end, $limit, $discover_changed_paths, $strict_node_history, &callback)" For \f(CW$limit\fR revisions from \f(CW$start\fR to \f(CW$end\fR, invoke the receiver \&\f(CWcallback()\fR with information about the changes made in the revision (log message, time, etc.). .Sp The caller may not invoke any RA operations using \f(CW$ra\fR from within the callback function. They may work in some situations, but it's not guaranteed. .Sp 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. .Sp \&\f(CW$start\fR and \f(CW$end\fR should be revision numbers. If \f(CW$start\fR has a lower value than \f(CW$end\fR then the revisions will be produced in ascending order (r1, r2, ...), otherwise in descending order. If \f(CW$start\fR is \&\f(CW$SVN::Core::INVALID_REVNUM\fR then it defaults to the latest revision. .Sp TODO \- the previous sentence should also be true of \f(CW$end\fR, but doing that gets an error message in Subversion 1.3. .Sp \&\f(CW$limit\fR is a number indicating the maximum number of times that the receiver \f(CWcallback()\fR should be called. If it is 0, there will be no limit. .Sp If \f(CW$discover_changed_paths\fR is true, then information about which changes were made to which paths is passed to \f(CWcallback()\fR. .Sp If \f(CW$strict_node_history\fR is true, copy history will not be traversed (if any exists) when harvesting the revision logs for each path. .Sp The callback function will be given the following arguments: .RS 4 .IP \(bu 4 A reference to a hash of paths changed by the revision. Only passed if \&\f(CW$discover_changed_paths\fR is true, otherwise undef is passed in its place. .Sp The hash's keys are the full paths to the files and directories changed. The values are _p_svn_log_changed_path_t objects. .IP \(bu 4 Revision number. .IP \(bu 4 Name of user who made the change, or undef if not known. .IP \(bu 4 Date and time the revision was committed. .IP \(bu 4 Log message as a single string, or undef. .IP \(bu 4 A pool object. .RE .RS 4 .Sp This example prints some of the information received in a simple format, showing which paths were changed in each revision, for all revisions starting from the first: .Sp .Vb 2 \& $ra\->get_log(\*(Aq\*(Aq, 1, $ra\->get_latest_revnum, 0, 1, 0, \& \e&log_callback); \& \& sub log_callback \& { \& my ($paths, $revnum, $user, $datetime, $logmsg) = @_; \& print "$datetime \- $user \- r$revnum\en"; \& \& while (my ($path, $changes) = each %$paths) { \& print $changes\->action, " $path\en"; \& if ($changes\->copyfrom_path) { \& print " from ", $changes\->copyfrom_path, \& " r", $changes\->copyfrom_rev, "\en" \& } \& } \& \& print "\en"; \& } .Ve .RE .ie n .IP $ra\->get_repos_root 4 .el .IP \f(CW$ra\fR\->get_repos_root 4 .IX Item "$ra->get_repos_root" Returns the repository's root URL. The value will not include a trailing '/'. The returned URL is guaranteed to be a prefix of the session's URL. .ie n .IP $ra\->get_uuid 4 .el .IP \f(CW$ra\fR\->get_uuid 4 .IX Item "$ra->get_uuid" Returns the repository's UUID as a string. .ie n .IP "$ra\->lock(\e%path_revs, $comment, $steal_lock, \e&callback)" 4 .el .IP "\f(CW$ra\fR\->lock(\e%path_revs, \f(CW$comment\fR, \f(CW$steal_lock\fR, \e&callback)" 4 .IX Item "$ra->lock(%path_revs, $comment, $steal_lock, &callback)" TODO \- doesn't seem to work in Subversion 1.3.2 .ie n .IP $ra\->reparent($url) 4 .el .IP \f(CW$ra\fR\->reparent($url) 4 .IX Item "$ra->reparent($url)" Change the root URL of the session in \f(CW$ra\fR to point to a different path. \f(CW$url\fR must be in the same repository as the one \f(CW$ra\fR is already accessing. .Sp New in Subversion\ 1.4. .ie n .IP "$ra\->replay($revnum, $low_water_mark, $send_deltas, $editor)" 4 .el .IP "\f(CW$ra\fR\->replay($revnum, \f(CW$low_water_mark\fR, \f(CW$send_deltas\fR, \f(CW$editor\fR)" 4 .IX Item "$ra->replay($revnum, $low_water_mark, $send_deltas, $editor)" Call methods on \f(CW$editor\fR to describe the changes made in the revisions after \f(CW$low_water_mark\fR, up to revision \f(CW$revnum\fR. This is like using \&\f(CWdo_update()\fR, except that it doesn't return a reporter object, and so you don't have to describe a working copy to it. It assumes that you've already got everything up to \f(CW$low_water_mark\fR. .Sp If \f(CW$send_deltas\fR is true then file contents and property values will be supplied, otherwise just filename changes. .Sp New in Subversion\ 1.4. .ie n .IP "$ra\->rev_prop($revnum, $name)" 4 .el .IP "\f(CW$ra\fR\->rev_prop($revnum, \f(CW$name\fR)" 4 .IX Item "$ra->rev_prop($revnum, $name)" Return the value of the unversioned property \f(CW$name\fR from revision \f(CW$revnum\fR. Returns undef if there is no such property. .Sp .Vb 1 \& print $ra\->rev_prop(123, \*(Aqsvn:date\*(Aq); .Ve .ie n .IP $ra\->rev_proplist($revnum) 4 .el .IP \f(CW$ra\fR\->rev_proplist($revnum) 4 .IX Item "$ra->rev_proplist($revnum)" Returns a reference to a hash containing all the unversioned properties of revision \f(CW$revnum\fR. .Sp .Vb 2 \& my $props = $ra\->rev_proplist(123); \& print $props\->{\*(Aqsvn:log\*(Aq}; .Ve .ie n .IP "$ra\->stat($path, $revnum)" 4 .el .IP "\f(CW$ra\fR\->stat($path, \f(CW$revnum\fR)" 4 .IX Item "$ra->stat($path, $revnum)" Returns a _p_svn_dirent_t object containing information about the file at \f(CW$path\fR in revision \f(CW$revnum\fR. .ie n .IP "$ra\->unlock(\e%path_tokens, $break_lock, \e&callback)" 4 .el .IP "\f(CW$ra\fR\->unlock(\e%path_tokens, \f(CW$break_lock\fR, \e&callback)" 4 .IX Item "$ra->unlock(%path_tokens, $break_lock, &callback)" TODO \- doesn't seem to work in Subversion 1.3.2 .SH SVN::Ra::Reporter .IX Header "SVN::Ra::Reporter" The SVN::Ra methods \f(CW\*(C`do_diff\*(C'\fR, \f(CW\*(C`do_status\*(C'\fR, \f(CW\*(C`do_switch\*(C'\fR, and \&\f(CW\*(C`do_update\*(C'\fR all return a SVN::Ra::Reporter object, which can be used to describe the working copy (or other available data) which the client has. Subversion uses this to figure out what new information should be provided through a tree delta editor. .PP Objects of this class are actually simple wrappers around underlying \&\f(CW\*(C`svn_ra_reporter2_t\*(C'\fR objects and their associated baton. .SS METHODS .IX Subsection "METHODS" .ie n .IP "$reporter\->set_path($path, $revision, $start_empty, $lock_token, $pool)" 4 .el .IP "\f(CW$reporter\fR\->set_path($path, \f(CW$revision\fR, \f(CW$start_empty\fR, \f(CW$lock_token\fR, \f(CW$pool\fR)" 4 .IX Item "$reporter->set_path($path, $revision, $start_empty, $lock_token, $pool)" Describe a working copy \f(CW$path\fR as being at a particular \f(CW$revision\fR. .Sp If \f(CW$start_empty\fR is true and \f(CW$path\fR is a directory, the implementor should assume the directory has no entries or properties. .Sp This will \fIoverride\fR any previous \f(CWset_path()\fR calls made on parent paths. \f(CW$path\fR is relative to the URL specified in \f(CW\*(C`SVN::Ra\->open()\*(C'\fR or \f(CW\*(C`SVN::Ra\->new()\*(C'\fR. .Sp If \f(CW$lock_token\fR is not undef, it is the lock token for \f(CW$path\fR in the WC. .Sp All temporary allocations are done in \f(CW$pool\fR. .ie n .IP "$reporter\->delete_path($path, $pool)" 4 .el .IP "\f(CW$reporter\fR\->delete_path($path, \f(CW$pool\fR)" 4 .IX Item "$reporter->delete_path($path, $pool)" Describe a working copy \f(CW$path\fR as missing. .Sp All temporary allocations are done in \f(CW$pool\fR. .ie n .IP "$reporter\->link_path($path, $url, $revision, $start_empty, $lock_token, $pool)" 4 .el .IP "\f(CW$reporter\fR\->link_path($path, \f(CW$url\fR, \f(CW$revision\fR, \f(CW$start_empty\fR, \f(CW$lock_token\fR, \f(CW$pool\fR)" 4 .IX Item "$reporter->link_path($path, $url, $revision, $start_empty, $lock_token, $pool)" Like \f(CWset_path()\fR, but differs in that \f(CW$path\fR in the working copy (relative to the root of the report driver) isn't a reflection of \&\f(CW$path\fR in the repository (relative to the URL specified when opening the RA layer), but is instead a reflection of a different repository \f(CW$url\fR at \f(CW$revision\fR. .Sp If \f(CW$start_empty\fR is true and \f(CW$path\fR is a directory, the implementor should assume the directory has no entries or props. .Sp If \f(CW$lock_token\fR is not undef, it is the lock token for \f(CW$path\fR in the WC. .Sp All temporary allocations are done in \f(CW$pool\fR. .ie n .IP $reporter\->finish_report($pool) 4 .el .IP \f(CW$reporter\fR\->finish_report($pool) 4 .IX Item "$reporter->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 \f(CWdo_update()\fR. No other reporting functions, including \f(CWabort_report()\fR, should be called after calling this function. .ie n .IP $reporter\->abort_report($pool) 4 .el .IP \f(CW$reporter\fR\->abort_report($pool) 4 .IX Item "$reporter->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. .SH SVN::Ra::Callbacks .IX Header "SVN::Ra::Callbacks" This is the wrapper class for \f(CW\*(C`svn_ra_callback_t\*(C'\fR. To supply custom callbacks to SVN::Ra, subclass this class and override the member functions. .SH AUTHORS .IX Header "AUTHORS" Chia-liang Kao .SH COPYRIGHT .IX Header "COPYRIGHT" .Vb 7 \& 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. .Ve