.\" -*- 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 "SVN::Simple::Edit 3" .TH SVN::Simple::Edit 3 2024-07-13 "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::Simple::Edit \- A simple interface for driving svn delta editors .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& my $edit = SVN::Simple::Edit\->new \& (_editor => [SVN::Repos::get_commit_editor($repos, "file://$repospath", \& \*(Aq/\*(Aq, \*(Aqroot\*(Aq, \*(AqFOO\*(Aq, \e&committed)], \& ); \& \& $edit\->open_root($fs\->youngest_rev); \& $edit\->add_directory (\*(Aqtrunk\*(Aq); \& $edit\->add_file (\*(Aqtrunk/filea\*(Aq); \& $edit\->modify_file ("trunk/fileb", "content", $checksum); \& $edit\->delete_entry ("trunk/filec"); \& $edit\->close_edit (); \& ... \& $edit\->copy_directory (\*(Aqbranches/a, trunk, 0); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" SVN::Simple::Edit wraps the subversion delta editor with a perl friendly interface and then you could easily drive it for describing changes to a tree. A common usage is to wrap the commit editor, so you could make commits to a subversion repository easily. .PP This also means you can not supply the \f(CW$edit\fR object as an delta_editor to other API, and that's why this module is named \&\fB::Edit\fR instead of \fB::Editor\fR. .PP See SVN::Simple::Editor for simple interface implementing a delta editor. .SH PARAMETERS .IX Header "PARAMETERS" .SS "for constructor" .IX Subsection "for constructor" .IP _editor 4 .IX Item "_editor" The editor that will receive delta editor calls. .IP missing_handler 4 .IX Item "missing_handler" Called when parent directory are not opened yet, could be: .RS 4 .IP \e&SVN::Simple::Edit::build_missing 4 .IX Item "&SVN::Simple::Edit::build_missing" Always build parents if you don't open them explicitly. .IP \e&SVN::Simple::Edit::open_missing 4 .IX Item "&SVN::Simple::Edit::open_missing" Always open the parents if you don't create them explicitly. .IP "SVN::Simple::Edit::check_missing ([$root])" 4 .IX Item "SVN::Simple::Edit::check_missing ([$root])" Check if the path exists on \f(CW$root\fR. Open it if so, otherwise create it. .RE .RS 4 .RE .IP root 4 .IX Item "root" The default root to use by SVN::Simple::Edit::check_missing. .IP base_path 4 .IX Item "base_path" The base path the edit object is created to send delta editor calls. .IP noclose 4 .IX Item "noclose" Do not close files or directories. This might make non-sorted operations on directories/files work. .SH METHODS .IX Header "METHODS" Note: Don't expect all editors will work with operations not sorted in DFS order. .IP "open_root ($base_rev)" 4 .IX Item "open_root ($base_rev)" .PD 0 .IP "add_directory ($path)" 4 .IX Item "add_directory ($path)" .IP "open_directory ($path)" 4 .IX Item "open_directory ($path)" .ie n .IP "copy_directory ($path, $from, $fromrev)" 4 .el .IP "copy_directory ($path, \f(CW$from\fR, \f(CW$fromrev\fR)" 4 .IX Item "copy_directory ($path, $from, $fromrev)" .IP "add_file ($path)" 4 .IX Item "add_file ($path)" .IP "open_file ($path)" 4 .IX Item "open_file ($path)" .ie n .IP "copy_file ($path, $from, $fromrev)" 4 .el .IP "copy_file ($path, \f(CW$from\fR, \f(CW$fromrev\fR)" 4 .IX Item "copy_file ($path, $from, $fromrev)" .IP "delete_entry ($path)" 4 .IX Item "delete_entry ($path)" .ie n .IP "change_dir_prop ($path, $propname, $propvalue)" 4 .el .IP "change_dir_prop ($path, \f(CW$propname\fR, \f(CW$propvalue\fR)" 4 .IX Item "change_dir_prop ($path, $propname, $propvalue)" .ie n .IP "change_file_prop ($path, $propname, $propvalue)" 4 .el .IP "change_file_prop ($path, \f(CW$propname\fR, \f(CW$propvalue\fR)" 4 .IX Item "change_file_prop ($path, $propname, $propvalue)" .IP "close_edit ()" 4 .IX Item "close_edit ()" .PD .SH AUTHORS .IX Header "AUTHORS" Chia-liang Kao .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2003\-2004 by Chia-liang Kao . .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See