- SEE ALSO
SVN::Dump::Record - A SVN dump record
# SVN::Dump::Record objects are returned by the next_record() # method of SVN::Dump
An SVN::Dump::Record object represents a Subversion dump record.
SVN::Dump provides the following gourps of methods:
Create a new empty SVN::Dump::Record object.
Return the record type, as guessed from its headers.
The method dies if the record type cannot be determined.
- set_header( $h, $v )
Set the header
$hto the value
- get_header( $h )
Get the value of header
- set_property( $p, $v )
Set the property
$pto the value
- get_property( $p )
Get the value of property
- delete_property( @k )
Delete the properties named in
@p. Properties that do not exist in the record will be silently ignored.
- set_text( $t )
Set the value of the text block.
Get the value of the text block.
The following methods provide access to these blocks:
- set_headers_block( $headers )
Get or set the SVN::Dump::Headers object that represents the record headers.
- set_property_block( $property )
Get or set the SVN::Dump::Property object that represents the record property block.
- delete_property( @keys )
Delete the given properties. Behaves like the builtin
- set_text_block( $text )
Get or set the SVN::Dump::Text object that represents the record text block.
- set_included_record( $record )
Some special record are actually output recursiveley by svnadmin dump. The "record in the record" is stored within the parent record, so they are parsed as a single record with an included record.
set_record()give access to the included record.
According to the Subversion sources (subversion/libsvn_repos/dump.c), this is a "delete original, then add-with-history" node. The dump looks like this:
Node-path: tags/mytag/myfile Node-kind: file Node-action: delete Node-path: tags/mytag/myfile Node-kind: file Node-action: add Node-copyfrom-rev: 23 Node-copyfrom-path: trunk/myfile
Note that there is a single blank line after the first header block, and four after the included one.
Update the various
...-lengthheaders. Used internally.
You must call this method if you update the inner property or text blocks directly, or the results of
as_string()will be inconsistent.
Return a boolean value indicating if the record has a property block.
Return a boolean value indicating if the record has a text block.
Return a boolean value indicating if the record has only a property block (and no text block).
Return a boolean value indicating if the record has a property block or a text block.
Return the length of the property block.
Return the length of the text block.
Return a string representation of the record that will be understood by other Subversion tools, such as
Warning: dumping a record currently returns the information that was read from the original dump. This means that if you modified the property or text block of a record, the headers will be inconsistent.
When using SVN::Dump to manipulate a SVN dump, one should not access the SVN::Dump::Headers, SVN::Dump::Property and SVN::Dump::Text components of a SVN::Dump::Record object directly, but use the appropriate
get_...() methods of the record object.
These methods compute the appropriate modifications of the header values, so that the
as_string() method outputs the correct information after any modification of the record.
Copyright 2006-2013 Philippe Bruhat (BooK), All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.