---
name: "SVN::Dump::Record"
section: "3pm"
platform: "linux"
package: "libsvn-dump-perl"
version: "0.08-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SVN::Dump::Record"
---

# SVN::Dump::Record(3pm)

A SVN dump record

## NAME

SVN::Dump::Record - A SVN dump record

## VERSION

version 0.08

## SYNOPSIS

```
    # SVN::Dump::Record objects are returned by the next_record()
    # method of SVN::Dump
```

## DESCRIPTION

An SVN::Dump::Record object represents a Subversion dump record.

## METHODS

SVN::Dump provides the following gourps of methods:

### Record methods

- **new()**

  Create a new empty SVN::Dump::Record object.

- **type()**

  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 `$h` to the value `$v`.

- get\_header( $h )

  Get the value of header `$h`.

- set\_property( $p, $v )

  Set the property `$p` to the value `$v`.

- get\_property( $p )

  Get the value of property `$p`.

- 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\_text()**

  Get 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.

The following methods provide access to these blocks:

- set\_headers\_block( $headers )

  - **get\_headers\_block()**

  Get or set the SVN::Dump::Headers object that represents the record headers.

- set\_property\_block( $property )

  - **get\_property\_block()**

  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 `"delete()"`.

- set\_text\_block( $text )

  - **get\_text\_block()**

  Get or set the SVN::Dump::Text object that represents the record text block.

- set\_included\_record( $record )

  - **get\_included\_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.

  `"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
  ```

  Note that there is a single blank line after the first header block, and four after the included one.

- **update\_headers()**

  Update the various `"...-length"` headers. 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.**

### Information methods

- **has\_prop()**

  Return a boolean value indicating if the record has a property block.

- **has\_text()**

  Return a boolean value indicating if the record has a text block.

- **has\_prop\_only()**

  Return a boolean value indicating if the record has only a property block (and no text block).

- **has\_prop\_or\_text()**

  Return a boolean value indicating if the record has a property block or a text block.

- **property\_length()**

  Return the length of the property block.

- **text\_length()**

  Return the length of the text block.

### Output method

- **as\_string()**

  Return a string representation of the record that will be understood by other Subversion tools, such as `"svnadmin"`.

  **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.

## ENCAPSULATION

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 `"set_...()"` and `"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.

## SEE ALSO

SVN::Dump, SVN::Dump::Reader, SVN::Dump::Headers, SVN::Dump::Property, SVN::Dump::Text.

## 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.
