Daizu::Wc::UpdateEditor - Subversion editor for updating database working copies
This Subversion delta editor can be used to receive updates from Subversion and load the new information into Daizu CMS database working copies. For example, to check out data into a fresh, newly created working copy:
my $editor = Daizu::Wc::UpdateEditor->new( cms => $cms, db => $db, wc_id => $wc_id, revnum => $revnum, branch_id => $branch_id, branch_path => $branch_path, ); my $reporter = $cms->ra->do_update($revnum, $branch_path, 1, $editor); $reporter->set_path('', 0, 1, undef); $reporter->finish_report;
This should be used inside a database transaction, so that the changes can be rolled back if anything goes wrong.
The methods called by Subversion are described in the documentation for SVN::Delta::Editor.
Directory and file batons are a reference to a hash containing the following values:
ID number of their entry in the
Relative to branch root (same as 'path' value in
If the property 'svn:mime-type' has been set on this file, then this will be the value of it, otherwise
If this is a file and
apply_textdelta()has been called on it, there is also a string which will hold the data of the file. It is put in the database when
close_file()is called. Otherwise this will be
A reference to a hash of all properties set or deleted while the baton was open. It will be undef if no properties have been changed. Used during
close_directory()to call custom property loaders if appropriate.
True if the content or any properties of a file have been updated. This is used when the file or directory is closed to determine whether the 'modified_at' timestamp should be set.
True if the file or directory was added anew rather than opened.
The file/directory batons are
undef for directories which aren't stored in the working copy, but are further up the directory hierarchy, such as 'trunk'.
This software is copyright 2006 Geoff Richards <firstname.lastname@example.org>. For licensing information see this page: