.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" 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::Repos 3" .TH native::Repos 3 2024-10-03 "perl v5.40.0" "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::Repos \- Subversion repository functions .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& use SVN::Core; \& use SVN::Repos; \& use SVN::Fs; \& \& my $repos = SVN::Repos::open(\*(Aq/path/to/repos\*(Aq); \& print $repos\->fs()\->youngest_rev; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" SVN::Repos wraps the object-oriented \f(CW\*(C`svn_repos_t\*(C'\fR functions, providing access to a Subversion repository on the local filesystem. .SS CONSTRUCTORS .IX Subsection "CONSTRUCTORS" .IP SVN::Repos::open($path) 4 .IX Item "SVN::Repos::open($path)" This function opens an existing repository, and returns an \&\f(CW\*(C`SVN::Repos\*(C'\fR object. .ie n .IP "create($path, undef, undef, $config, $fs_config)" 4 .el .IP "create($path, undef, undef, \f(CW$config\fR, \f(CW$fs_config\fR)" 4 .IX Item "create($path, undef, undef, $config, $fs_config)" This function creates a new repository, and returns an \f(CW\*(C`SVN::Repos\*(C'\fR object. .SS METHODS .IX Subsection "METHODS" .ie n .IP "$repos\->dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_callback)" 4 .el .IP "\f(CW$repos\fR\->dump_fs($dump_fh, \f(CW$feedback_fh\fR, \f(CW$start_rev\fR, \f(CW$end_rev\fR, \f(CW$incremental\fR, \f(CW$cancel_callback\fR)" 4 .IX Item "$repos->dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_callback)" .PD 0 .ie n .IP "$repos\->dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_callback)" 4 .el .IP "\f(CW$repos\fR\->dump_fs2($dump_fh, \f(CW$feedback_fh\fR, \f(CW$start_rev\fR, \f(CW$end_rev\fR, \f(CW$incremental\fR, \f(CW$deltify\fR, \f(CW$cancel_callback\fR)" 4 .IX Item "$repos->dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_callback)" .PD Create a dump file of the repository from revision \f(CW$start_rev\fR to \f(CW$end_rev\fR , store it into the filehandle \f(CW$dump_fh\fR, and write feedback on the progress of the operation to filehandle \f(CW$feedback_fh\fR. .Sp If \f(CW$incremental\fR is TRUE, the first revision dumped will be a diff against the previous revision (usually it looks like a full dump of the tree). .Sp If \f(CW$use_deltas\fR is TRUE, output only node properties which have changed relative to the previous contents, and output text contents as svndiff data against the previous contents. Regardless of how this flag is set, the first revision of a non-incremental dump will be done with full plain text. A dump with \f(CW@a\fR use_deltas set cannot be loaded by Subversion 1.0.x. .Sp If \f(CW$cancel_callback\fR is not \f(CW\*(C`undef\*(C'\fR, it must be a code reference that is called periodically to determine whether the client wishes to cancel the dump. See "CANCELLATION CALLBACK" in SVN::Client for details. .Sp Example: .Sp .Vb 2 \& use SVN::Core; \& use SVN::Repos; \& \& my $repos = SVN::Repos::open(\*(Aq/repo/sandbox\*(Aq); \& \& open my $fh, ">/tmp/tmp.dump" or die "Cannot open file: $!\en"; \& \& my $start_rev = 10; \& my $end_rev = 20; \& my $incremental = 1; \& my $deltify = 1; \& \& $repos\->dump_fs2($fh, \e*STDOUT, # Dump file => $fh, Feedback => STDOUT \& $start_rev, $end_rev, # Revision Range \& $incremental, $deltify, # Options \& undef); # Cancel Callback \& \& close $fh; .Ve .ie n .IP "$repos\->load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_callback);" 4 .el .IP "\f(CW$repos\fR\->load_fs($dumpfile_fh, \f(CW$feedback_fh\fR, \f(CW$uuid_action\fR, \f(CW$parent_dir\fR, \f(CW$cancel_callback\fR);" 4 .IX Item "$repos->load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_callback);" .PD 0 .ie n .IP "$repos\->load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_callback);" 4 .el .IP "\f(CW$repos\fR\->load_fs2($dumpfile_fh, \f(CW$feedback_fh\fR, \f(CW$uuid_action\fR, \f(CW$parent_dir\fR, \f(CW$use_pre_commit_hook\fR, \f(CW$use_post_commit_hook\fR, \f(CW$cancel_callback\fR);" 4 .IX Item "$repos->load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_callback);" .PD Loads a dumpfile specified by the \f(CW$dumpfile_fh\fR filehandle into the repository. If the dumpstream contains copy history that is unavailable in the repository, an error will be thrown. .Sp The repository's UUID will be updated iff the dumpstream contains a UUID and \&\f(CW$uuid_action\fR is not equal to \f(CW$SVN::Repos::load_uuid_ignore\fR and either the repository contains no revisions or \f(CW$uuid_action\fR is equal to \&\f(CW$SVN::Repos::load_uuid_force\fR. .Sp If the dumpstream contains no UUID, then \f(CW$uuid_action\fR is ignored and the repository UUID is not touched. .Sp If \f(CW$parent_dir\fR is not null, then the parser will reparent all the loaded nodes, from root to \f(CW@a\fR parent_dir. The directory \f(CW$parent_dir\fR must be an existing directory in the repository. .Sp If \f(CW$use_pre_commit_hook\fR is set, call the repository's pre-commit hook before committing each loaded revision. .Sp If \f(CW$use_post_commit_hook\fR is set, call the repository's post-commit hook after committing each loaded revision. .Sp If \f(CW$cancel_callback\fR is not \f(CW\*(C`undef\*(C'\fR, it must be a code reference that is called periodically to determine whether the client wishes to cancel the load. See "CANCELLATION CALLBACK" in SVN::Client for details. .Sp You must at least provide \f(CW\*(C`undef\*(C'\fR for these parameters for the method call to work. .Sp Example: use SVN::Core; use SVN::Repos; .Sp .Vb 1 \& my $repos = SVN::Repos::open(\*(Aq/repo/test_repo\*(Aq); \& \& open my $fh, "/repo/sandbox.dump" or die "Cannot open file: $!\en"; \& \& my $parent_dir = \*(Aq/\*(Aq; \& my $use_pre_commit_hook = 0; \& my $use_post_commit_hook = 0; \& \& $repos\->load_fs2($fh, \e*STDOUT, \& $SVN::Repos::load_uuid_ignore, # Ignore uuid \& $parent_dir, \& $use_pre_commit_hook, # Use pre\-commit hook? \& $use_post_commit_hook, # Use post\-commit hook? \& undef, undef); \& \& \& close $fh; .Ve .ie n .IP $repos\->\fBfs()\fR 4 .el .IP \f(CW$repos\fR\->\fBfs()\fR 4 .IX Item "$repos->fs()" Returns the \f(CW\*(C`SVN::Fs\*(C'\fR object for this repository. .ie n .IP "$repos\->get_logs([$path, ...], $start, $end, $discover_changed_paths, $strict_node_history, $receiver)" 4 .el .IP "\f(CW$repos\fR\->get_logs([$path, ...], \f(CW$start\fR, \f(CW$end\fR, \f(CW$discover_changed_paths\fR, \f(CW$strict_node_history\fR, \f(CW$receiver\fR)" 4 .IX Item "$repos->get_logs([$path, ...], $start, $end, $discover_changed_paths, $strict_node_history, $receiver)" Iterates over all the revisions that affect the list of paths passed as the first parameter, starting at \f(CW$start\fR, and ending at \f(CW$end\fR. .Sp \&\f(CW$receiver\fR is called for each change. The arguments to \f(CW$receiver\fR are: .RS 4 .ie n .IP $self 4 .el .IP \f(CW$self\fR 4 .IX Item "$self" The \f(CW\*(C`SVN::Repos\*(C'\fR object. .ie n .IP $paths 4 .el .IP \f(CW$paths\fR 4 .IX Item "$paths" \&\f(CW\*(C`undef\*(C'\fR if \f(CW$discover_changed_paths\fR is false. Otherwise, contains a hash of paths that have changed in this revision. .ie n .IP $rev 4 .el .IP \f(CW$rev\fR 4 .IX Item "$rev" The revision this change occurred in. .ie n .IP $date 4 .el .IP \f(CW$date\fR 4 .IX Item "$date" The date and time the revision occurred. .ie n .IP $msg 4 .el .IP \f(CW$msg\fR 4 .IX Item "$msg" The log message associated with this revision. .ie n .IP $pool 4 .el .IP \f(CW$pool\fR 4 .IX Item "$pool" An \f(CW\*(C`SVN::Pool\*(C'\fR object which may be used in the function. .RE .RS 4 .Sp If \f(CW$strict_node_history\fR is true then copies will not be traversed. .RE .SS "ADDITIONAL METHODS" .IX Subsection "ADDITIONAL METHODS" The following methods work, but are not currently documented in this file. Please consult the svn_repos.h section in the Subversion API for more details. .ie n .IP $repos\->get_commit_editor(...) 4 .el .IP \f(CW$repos\fR\->get_commit_editor(...) 4 .IX Item "$repos->get_commit_editor(...)" .PD 0 .ie n .IP $repos\->get_commit_editor2(...) 4 .el .IP \f(CW$repos\fR\->get_commit_editor2(...) 4 .IX Item "$repos->get_commit_editor2(...)" .ie n .IP $repos\->path(...) 4 .el .IP \f(CW$repos\fR\->path(...) 4 .IX Item "$repos->path(...)" .ie n .IP $repos\->db_env(...) 4 .el .IP \f(CW$repos\fR\->db_env(...) 4 .IX Item "$repos->db_env(...)" .ie n .IP $repos\->lock_dir(...) 4 .el .IP \f(CW$repos\fR\->lock_dir(...) 4 .IX Item "$repos->lock_dir(...)" .ie n .IP $repos\->db_lockfile(...) 4 .el .IP \f(CW$repos\fR\->db_lockfile(...) 4 .IX Item "$repos->db_lockfile(...)" .ie n .IP $repos\->hook_dir(...) 4 .el .IP \f(CW$repos\fR\->hook_dir(...) 4 .IX Item "$repos->hook_dir(...)" .ie n .IP $repos\->start_commit_hook(...) 4 .el .IP \f(CW$repos\fR\->start_commit_hook(...) 4 .IX Item "$repos->start_commit_hook(...)" .ie n .IP $repos\->pre_commit_hook(...) 4 .el .IP \f(CW$repos\fR\->pre_commit_hook(...) 4 .IX Item "$repos->pre_commit_hook(...)" .ie n .IP $repos\->post_commit_hook(...) 4 .el .IP \f(CW$repos\fR\->post_commit_hook(...) 4 .IX Item "$repos->post_commit_hook(...)" .ie n .IP $repos\->pre_revprop_change(...) 4 .el .IP \f(CW$repos\fR\->pre_revprop_change(...) 4 .IX Item "$repos->pre_revprop_change(...)" .ie n .IP $repos\->post_revprop_change(...) 4 .el .IP \f(CW$repos\fR\->post_revprop_change(...) 4 .IX Item "$repos->post_revprop_change(...)" .ie n .IP $repos\->dated_revision(...) 4 .el .IP \f(CW$repos\fR\->dated_revision(...) 4 .IX Item "$repos->dated_revision(...)" .ie n .IP $repos\->fs_commit_txn(...) 4 .el .IP \f(CW$repos\fR\->fs_commit_txn(...) 4 .IX Item "$repos->fs_commit_txn(...)" .ie n .IP $repos\->fs_being_txn_for_commit(...) 4 .el .IP \f(CW$repos\fR\->fs_being_txn_for_commit(...) 4 .IX Item "$repos->fs_being_txn_for_commit(...)" .ie n .IP $repos\->fs_being_txn_for_update(...) 4 .el .IP \f(CW$repos\fR\->fs_being_txn_for_update(...) 4 .IX Item "$repos->fs_being_txn_for_update(...)" .ie n .IP $repos\->fs_change_rev_prop(...) 4 .el .IP \f(CW$repos\fR\->fs_change_rev_prop(...) 4 .IX Item "$repos->fs_change_rev_prop(...)" .ie n .IP $repos\->node_editor(...) 4 .el .IP \f(CW$repos\fR\->node_editor(...) 4 .IX Item "$repos->node_editor(...)" .ie n .IP $repos\->dump_fs(...) 4 .el .IP \f(CW$repos\fR\->dump_fs(...) 4 .IX Item "$repos->dump_fs(...)" .ie n .IP $repos\->load_fs(...) 4 .el .IP \f(CW$repos\fR\->load_fs(...) 4 .IX Item "$repos->load_fs(...)" .ie n .IP $repos\->get_fs_build_parser(...) 4 .el .IP \f(CW$repos\fR\->get_fs_build_parser(...) 4 .IX Item "$repos->get_fs_build_parser(...)" .PD .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