svn_patch_t Struct Reference

Data type to manage parsing of patches. More...

`#include <svn_diff.h>`

## Data Fields

const char * | old_filename
| The old and new file names as retrieved from the patch file. More...
const char * | new_filename
apr_array_header_t * | hunks
| An array containing an svn_diff_hunk_t * for each hunk parsed from the patch.
apr_hash_t * | prop_patches
| A hash table keyed by property names containing svn_prop_patch_t object for each property parsed from the patch.
svn_diff_operation_kind_t | operation
| Represents the operation performed on the file.
svn_boolean_t | reverse
| Indicates whether the patch is being interpreted in reverse. More...
svn_mergeinfo_t | mergeinfo
| Mergeinfo parsed from svn:mergeinfo diff data, with one entry for forward merges and one for reverse merges. More...
svn_mergeinfo_t | reverse_mergeinfo
svn_diff_binary_patch_t * | binary_patch
| Declares that there is a binary conflict and contains the information to apply it as parsed from the file. More...
svn_tristate_t | old_executable_bit
| The old and new executability bits, as retrieved from the patch file, from the git-like mode headers. More...
svn_tristate_t | new_executable_bit
svn_tristate_t | old_symlink_bit
| The old and new symlink bits, as retrieved from the patch file, from the git-like mode headers. More...
svn_tristate_t | new_symlink_bit

## Detailed Description

Data type to manage parsing of patches.

Represents a patch to one target file.

API users should not allocate structures of this type directly.

Since
  New in 1.7.

Definition at line 1255 of file svn_diff.h.

## Field Documentation

## binary_patch

svn_diff_binary_patch_t* svn_patch_t::binary_patch

Declares that there is a binary conflict and contains the information to apply it as parsed from the file.

Since
  New in 1.10.

Definition at line 1295 of file svn_diff.h.

## mergeinfo

svn_mergeinfo_t svn_patch_t::mergeinfo

Mergeinfo parsed from svn:mergeinfo diff data, with one entry for forward merges and one for reverse merges.

Either entry can be `NULL` if no such merges are part of the diff.

Since
  New in 1.9.

Definition at line 1288 of file svn_diff.h.

## old_executable_bit

svn_tristate_t svn_patch_t::old_executable_bit

The old and new executability bits, as retrieved from the patch file, from the git-like mode headers.

A patch may specify an executability change via old_executable_bit and new_executable_bit, via a SVN_PROP_EXECUTABLE propchange hunk, or both ways. It is upto caller how to decide how conflicting information is handled.

svn_tristate_unknown indicates the patch does not specify the corresponding bit.

Since
  New in 1.10.

Definition at line 1310 of file svn_diff.h.

## old_filename

const char* svn_patch_t::old_filename

The old and new file names as retrieved from the patch file.

These paths are UTF-8 encoded and canonicalized, but otherwise left unchanged from how they appeared in the patch file.

Definition at line 1260 of file svn_diff.h.

## old_symlink_bit

svn_tristate_t svn_patch_t::old_symlink_bit

The old and new symlink bits, as retrieved from the patch file, from the git-like mode headers.

A patch may specify a symlink change via old_symlink_bit and new_symlink_bit, via a SVN_PROP_SPECIAL propchange hunk, or both ways. It is upto caller how to decide how conflicting information is handled. Most implementations will currently just describe a replacement of the file though.

svn_tristate_unknown indicates the patch does not specify the corresponding bit.

Since
  New in 1.10.

Definition at line 1327 of file svn_diff.h.

## reverse

svn_boolean_t svn_patch_t::reverse

Indicates whether the patch is being interpreted in reverse.

### If so, how does this affect the interpretation of other fields?

Definition at line 1281 of file svn_diff.h.

The documentation for this struct was generated from the following file:

- svn_diff.h