SVN::D...:Record(3pm)
π SVN::Dump::Record(3pm) β aka the glow-up of a Subversion dump record β¨
okay bestie, sit down, hydrate, and let me tell you about SVN::Dump::Record π«Ά it's a Perl module, it's version 0.08, and it's literally the main character of every Subversion dump record you will ever touch. no cap.
π SYNOPSIS
# SVN::Dump::Record objects are returned by the next_record()
# method of SVN::Dump
periodt. that's the whole vibe β you don't build these bad boys yourself, they get handed to you π
πΈ DESCRIPTION
So a SVN::Dump::Record object? it represents a Subversion dump record. that's it, that's the girl. one object, one record, iconic behavior only π
π METHODS
SVN::Dump rolls up with the following groups of methods (the original says "gourps", which is honestly a typo with main character energy, we love her anyway π):
β¨ Record methods
new()β makes you a brand new, completely emptySVN::Dump::Recordobject. blank slate, fresh start, self-care π±type()β returns the record type, which it figures out by looking at the headers. if it can't work out the type, the method dies. rip, literally πset_header( $h, $v )β sets header$hto the value$v.get_header( $h )β grabs the value of header$h.set_property( $p, $v )β sets property$pto the value$v.get_property( $p )β grabs the value of property$p.delete_property( @k )β deletes the properties named in@p. (yes, the docs say@pwhile the signature says@k, she's doing her best π) properties that aren't in the record just get silently ignored β no drama, we move on.set_text( $t )β sets the value of the text block.get_text()β gets the value of the text block.
π§ Inner blocks manipulation
A SVN::Dump::Record is composed of several inner blocks of various kinds: SVN::Dump::Headers, SVN::Dump::Property and SVN::Dump::Text. she's got layers, she's complex, she contains multitudes π
The following methods give you access to these blocks:
set_headers_block( $headers )andget_headers_block()β get or set theSVN::Dump::Headersobject that represents the record headers.set_property_block( $property )andget_property_block()β get or set theSVN::Dump::Propertyobject that represents the record property block.delete_property( @keys )β deletes the given properties. behaves exactly like the builtindelete(). bestie behavior: just like Perl's own π«Άset_text_block( $text )andget_text_block()β get or set theSVN::Dump::Textobject that represents the record text block.set_included_record( $record )andget_included_record()β some special records are actually output recursively bysvnadmin dump. the "record in the record" is stored inside the parent record, so they get parsed as a single record with an included record.
get_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
and the way that there is a single blank line after the first header block, but four after the included one?? that's not a vibe, that's a lore drop π count them. count them.
update_headers()β updates the various...-lengthheaders. used internally, lowkey undercover.
β οΈ you must call this method if you update the inner property or text blocks directly, or the results of as_string() will be inconsistent. so inconsistent. a mess. don't do it to yourself π
π Information methods
has_prop()β returns a boolean telling you if the record has a property block.has_text()β returns a boolean telling you if the record has a text block.has_prop_only()β returns a boolean telling you if the record has only a property block (and no text block). minimalism β¨has_prop_or_text()β returns a boolean telling you if the record has a property block or a text block.property_length()β returns the length of the property block.text_length()β returns the length of the text block.
π€ Output method
as_string()β returns a string representation of the record that other Subversion tools, such assvnadmin, will actually understand. she speaks fluent svn π£οΈ
π¨ 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. ngl that's a whole problem, so be aware π
π¦ ENCAPSULATION
When you're using SVN::Dump to manipulate a SVN dump, you should not go poking at the SVN::Dump::Headers, SVN::Dump::Property and SVN::Dump::Text components of a SVN::Dump::Record object directly. hands off the merch, bestie π
ββοΈ use the appropriate set_...() and get_...() methods of the record object instead.
Why? because these methods compute the appropriate modifications of the header values, so that as_string() outputs the correct information after any modification of the record. that's the whole point. that's the slay. that's the iykyk π
π SEE ALSO
SVN::DumpSVN::Dump::ReaderSVN::Dump::HeadersSVN::Dump::PropertySVN::Dump::Text
go read them, they're all in the group chat π«Ά
Β©οΈ COPYRIGHT
Copyright 2006-2013 Philippe Bruhat (BooK), All Rights Reserved.
π LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie!! π this was documented by the User Contributed Perl Documentation crew, on perl v5.36.0, dated 2022-10-14, and it lives in section 3pm as SVN::D...:Record(3pm) β the truncated name is giving "she doesn't fit in the header" energy but we stan a legend πβ¨ byeeee π
π¦ where this page comes from
- ubuntu noble: libsvn-dump-perl 0.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsvn-dump-perl 0.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsvn-dump-perl 0.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms