Loading...
Searching...
No Matches
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.
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.
svn_mergeinfo_t | mergeinfo
| Mergeinfo parsed from svn:mergeinfo diff data, with one entry for forward merges and one for reverse merges.
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.
svn_tristate_t | old_executable_bit
| The old and new executability bits, as retrieved from the patch file, from the git-like mode headers.
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.
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.

## hunks

apr_array_header_t* svn_patch_t::hunks

An array containing an svn_diff_hunk_t * for each hunk parsed from the patch.

Definition at line 1266 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.

## new_executable_bit

svn_tristate_t svn_patch_t::new_executable_bit

Definition at line 1311 of file svn_diff.h.

## new_filename

const char* svn_patch_t::new_filename

Definition at line 1261 of file svn_diff.h.

## new_symlink_bit

svn_tristate_t svn_patch_t::new_symlink_bit

Definition at line 1328 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.

## operation

svn_diff_operation_kind_t svn_patch_t::operation

Represents the operation performed on the file.

Definition at line 1275 of file svn_diff.h.

## prop_patches

apr_hash_t* svn_patch_t::prop_patches

A hash table keyed by property names containing svn_prop_patch_t object for each property parsed from the patch.

Definition at line 1271 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.

## reverse_mergeinfo

svn_mergeinfo_t svn_patch_t::reverse_mergeinfo

Definition at line 1289 of file svn_diff.h.

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

- svn_diff.h