Subversion
Data Structures | Macros | Typedefs | Enumerations | Functions
svn_types.h File Reference

Subversion's data types. More...

#include "svn_types_impl.h"
#include <stdlib.h>
#include <limits.h>
#include <apr.h>
#include <apr_version.h>
#include <apr_errno.h>
#include <apr_pools.h>
#include <apr_hash.h>
#include <apr_tables.h>
#include <apr_time.h>
#include <apr_strings.h>
#include "svn_error.h"

Go to the source code of this file.

Data Structures

struct  svn_error_t
 Subversion error object. More...
 
struct  svn_dirent_t
 A general subversion directory entry. More...
 
struct  svn_commit_info_t
 All information about a commit. More...
 
struct  svn_log_changed_path2_t
 A structure to represent a path that changed for a log entry. More...
 
struct  svn_log_changed_path_t
 A structure to represent a path that changed for a log entry. More...
 
struct  svn_log_entry_t
 A structure to represent all the information about a particular log entry. More...
 
struct  svn_lock_t
 A lock object, for client & server to share. More...
 
struct  svn_merge_range_t
 Mergeinfo representing a merge of a range of revisions. More...
 
struct  svn_location_segment_t
 A representation of a segment of an object's version history with an emphasis on the object's location in the repository as of various revisions. More...
 

Macros

#define SVN_DEPRECATED
 Macro used to mark deprecated functions. More...
 
#define SVN_EXPERIMENTAL
 Macro used to mark experimental functions. More...
 
#define SVN_NEEDS_SENTINEL_NULL
 Macro used to mark functions that require a final null sentinel argument. More...
 
#define SVN_UNALIGNED_ACCESS_IS_OK   0
 Indicate whether the current platform supports unaligned data access. More...
 
#define TRUE   1
 uhh... More...
 
#define FALSE   0
 uhh... More...
 
#define SVN_VA_NULL   ((struct svn__null_pointer_constant_stdarg_sentinel_t*)0)
 Null pointer constant used as a sentinel in variable argument lists. More...
 
#define APR_ARRAY_IDX(ary, i, type)   (((type *)(ary)->elts)[i])
 index into an apr_array_header_t
 
#define APR_ARRAY_PUSH(ary, type)   (*((type *)apr_array_push(ary)))
 easier array-pushing syntax
 
#define SVN__APR_STATUS_IS_ENOTDIR(s)   APR_STATUS_IS_ENOTDIR(s)
 On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of invalid-pathname error but not ERROR_INVALID_NAME, so we include it. More...
 
#define SVN__APR_STATUS_IS_EPIPE(s)   APR_STATUS_IS_EPIPE(s)
 On Windows, APR_STATUS_IS_EPIPE does not include ERROR_NO_DATA error. More...
 
#define SVN_IS_VALID_REVNUM(n)   ((n) >= 0)
 About Special Files in Subversion. More...
 
#define SVN_IGNORED_REVNUM   ((svn_revnum_t) -1)
 Not really invalid...just unimportant – one day, this can be its own unique value, for now, just make it the same as SVN_INVALID_REVNUM.
 
#define SVN_STR_TO_REV(str)   ((svn_revnum_t) atol(str))
 Convert NULL-terminated C string str to a revision number.
 
#define SVN_REVNUM_T_FMT   "ld"
 Originally intended to be used in printf()-style functions to format revision numbers. More...
 
#define SVN_INVALID_FILESIZE   ((svn_filesize_t) -1)
 The 'official' invalid file size constant.
 
#define SVN_FILESIZE_T_FMT   APR_INT64_T_FMT
 In printf()-style functions, format file sizes using this.
 
#define SVN_DEPTH_INFINITY_OR_FILES(recurse)   ((recurse) ? svn_depth_infinity : svn_depth_files)
 Return svn_depth_infinity if boolean recurse is TRUE, else return svn_depth_files. More...
 
#define SVN_DEPTH_INFINITY_OR_IMMEDIATES(recurse)   ((recurse) ? svn_depth_infinity : svn_depth_immediates)
 Return svn_depth_infinity if boolean recurse is TRUE, else return svn_depth_immediates. More...
 
#define SVN_DEPTH_INFINITY_OR_EMPTY(recurse)   ((recurse) ? svn_depth_infinity : svn_depth_empty)
 Return svn_depth_infinity if boolean recurse is TRUE, else return svn_depth_empty. More...
 
#define SVN_DEPTH_IS_RECURSIVE(depth)   ((depth) == svn_depth_infinity || (depth) == svn_depth_unknown)
 Return a recursion boolean based on depth. More...
 
#define SVN_DIRENT_KIND   0x00001
 An indication that you are interested in the kind field.
 
#define SVN_DIRENT_SIZE   0x00002
 An indication that you are interested in the size field.
 
#define SVN_DIRENT_HAS_PROPS   0x00004
 An indication that you are interested in the has_props field.
 
#define SVN_DIRENT_CREATED_REV   0x00008
 An indication that you are interested in the created_rev field.
 
#define SVN_DIRENT_TIME   0x00010
 An indication that you are interested in the time field.
 
#define SVN_DIRENT_LAST_AUTHOR   0x00020
 An indication that you are interested in the last_author field.
 
#define SVN_DIRENT_ALL   ~((apr_uint32_t ) 0)
 A combination of all the dirent fields.
 
#define SVN_KEYWORD_MAX_LEN   255
 The maximum size of an expanded or un-expanded keyword.
 
#define SVN_KEYWORD_REVISION_LONG   "LastChangedRevision"
 The most recent revision in which this file was changed.
 
#define SVN_KEYWORD_REVISION_SHORT   "Rev"
 Short version of LastChangedRevision.
 
#define SVN_KEYWORD_REVISION_MEDIUM   "Revision"
 Medium version of LastChangedRevision, matching the one CVS uses. More...
 
#define SVN_KEYWORD_DATE_LONG   "LastChangedDate"
 The most recent date (repository time) when this file was changed.
 
#define SVN_KEYWORD_DATE_SHORT   "Date"
 Short version of LastChangedDate.
 
#define SVN_KEYWORD_AUTHOR_LONG   "LastChangedBy"
 Who most recently committed to this file.
 
#define SVN_KEYWORD_AUTHOR_SHORT   "Author"
 Short version of LastChangedBy.
 
#define SVN_KEYWORD_URL_LONG   "HeadURL"
 The URL for the head revision of this file.
 
#define SVN_KEYWORD_URL_SHORT   "URL"
 Short version of HeadURL.
 
#define SVN_KEYWORD_ID   "Id"
 A compressed combination of the other four keywords.
 
#define SVN_KEYWORD_HEADER   "Header"
 A full combination of the first four keywords. More...
 
#define SVN_STREAM_CHUNK_SIZE   102400
 A buffer size that may be used when processing a stream of data. More...
 
#define SVN_MAX_OBJECT_SIZE   (((apr_size_t) -1) / 2)
 The maximum amount we can ever hold in memory.
 
#define SVN_LINENUM_MAX_VALUE   ULONG_MAX
 The maximum value of an svn_linenum_t. More...
 

Typedefs

typedef int svn_boolean_t
 YABT: Yet Another Boolean Type.
 
typedef struct svn_error_t svn_error_t
 Subversion error object. More...
 
typedef struct svn_version_t svn_version_t
 
typedef apr_int64_t svn_filesize_t
 The size of a file in the Subversion FS.
 
typedef struct svn_dirent_t svn_dirent_t
 A general subversion directory entry. More...
 
typedef struct svn_commit_info_t svn_commit_info_t
 All information about a commit. More...
 
typedef struct svn_log_changed_path2_t svn_log_changed_path2_t
 A structure to represent a path that changed for a log entry. More...
 
typedef struct svn_log_changed_path_t svn_log_changed_path_t
 A structure to represent a path that changed for a log entry. More...
 
typedef struct svn_log_entry_t svn_log_entry_t
 A structure to represent all the information about a particular log entry. More...
 
typedef svn_error_t *(* svn_log_entry_receiver_t) (void *baton, svn_log_entry_t *log_entry, apr_pool_t *pool)
 The callback invoked by log message loopers, such as svn_ra_plugin_t.get_log() and svn_repos_get_logs(). More...
 
typedef svn_error_t *(* svn_log_message_receiver_t) (void *baton, apr_hash_t *changed_paths, svn_revnum_t revision, const char *author, const char *date, const char *message, apr_pool_t *pool)
 Similar to svn_log_entry_receiver_t, except this uses separate parameters for each part of the log entry. More...
 
typedef svn_error_t *(* svn_commit_callback2_t) (const svn_commit_info_t *commit_info, void *baton, apr_pool_t *pool)
 Callback function type for commits. More...
 
typedef svn_error_t *(* svn_commit_callback_t) (svn_revnum_t new_revision, const char *date, const char *author, void *baton)
 Same as svn_commit_callback2_t, but uses individual data elements instead of the svn_commit_info_t structure. More...
 
typedef svn_error_t *(* svn_cancel_func_t) (void *cancel_baton)
 A user defined callback that subversion will call with a user defined baton to see if the current operation should be continued. More...
 
typedef struct svn_lock_t svn_lock_t
 A lock object, for client & server to share. More...
 
typedef struct svn_merge_range_t svn_merge_range_t
 Mergeinfo representing a merge of a range of revisions. More...
 
typedef struct svn_location_segment_t svn_location_segment_t
 A representation of a segment of an object's version history with an emphasis on the object's location in the repository as of various revisions. More...
 
typedef svn_error_t *(* svn_location_segment_receiver_t) (svn_location_segment_t *segment, void *baton, apr_pool_t *pool)
 A callback invoked by generators of svn_location_segment_t objects, used to report information about a versioned object's history in terms of its location in the repository filesystem over time.
 
typedef unsigned long svn_linenum_t
 A line number, such as in a file or a stream. More...
 

Enumerations

enum  svn_recurse_kind {
  svn_nonrecursive = 1,
  svn_recursive
}
 An enum to indicate whether recursion is needed.
 

Functions

const void * apr_hash_this_key (apr_hash_index_t *hi)
 Return the key of the hash table entry indexed by hi.
 
apr_ssize_t apr_hash_this_key_len (apr_hash_index_t *hi)
 Return the key length of the hash table entry indexed by hi.
 
void * apr_hash_this_val (apr_hash_index_t *hi)
 Return the value of the hash table entry indexed by hi.
 
const char * svn_node_kind_to_word (svn_node_kind_t kind)
 Return a constant string expressing kind as an English word, e.g., "file", "dir", etc. More...
 
svn_node_kind_t svn_node_kind_from_word (const char *word)
 Return the appropriate node_kind for word. More...
 
const char * svn_tristate__to_word (svn_tristate_t tristate)
 Return a constant string "true", "false" or NULL representing the value of tristate. More...
 
svn_tristate_t svn_tristate__from_word (const char *word)
 Return the appropriate tristate for word. More...
 
svn_error_tsvn_revnum_parse (svn_revnum_t *rev, const char *str, const char **endptr)
 Parse NULL-terminated C string str as a revision number and store its value in rev. More...
 
const char * svn_depth_to_word (svn_depth_t depth)
 Return a constant string expressing depth as an English word, e.g., "infinity", "immediates", etc. More...
 
svn_depth_t svn_depth_from_word (const char *word)
 Return the appropriate depth for depth_str. More...
 
svn_dirent_tsvn_dirent_dup (const svn_dirent_t *dirent, apr_pool_t *pool)
 Return a deep copy of dirent, allocated in pool. More...
 
svn_dirent_tsvn_dirent_create (apr_pool_t *result_pool)
 Create a new svn_dirent_t instance with all values initialized to their not-available values. More...
 
svn_commit_info_tsvn_create_commit_info (apr_pool_t *pool)
 Allocate an object of type svn_commit_info_t in pool and return it. More...
 
svn_commit_info_tsvn_commit_info_dup (const svn_commit_info_t *src_commit_info, apr_pool_t *pool)
 Return a deep copy src_commit_info allocated in pool. More...
 
svn_log_changed_path2_tsvn_log_changed_path2_create (apr_pool_t *pool)
 Returns an svn_log_changed_path2_t, allocated in pool with all fields initialized to NULL, None or empty values. More...
 
svn_log_changed_path2_tsvn_log_changed_path2_dup (const svn_log_changed_path2_t *changed_path, apr_pool_t *pool)
 Return a deep copy of changed_path, allocated in pool. More...
 
svn_log_changed_path_tsvn_log_changed_path_dup (const svn_log_changed_path_t *changed_path, apr_pool_t *pool)
 Return a deep copy of changed_path, allocated in pool. More...
 
svn_log_entry_tsvn_log_entry_create (apr_pool_t *pool)
 Returns an svn_log_entry_t, allocated in pool with all fields initialized to NULL values. More...
 
svn_log_entry_tsvn_log_entry_dup (const svn_log_entry_t *log_entry, apr_pool_t *pool)
 Return a deep copy of log_entry, allocated in pool. More...
 
svn_error_tsvn_mime_type_validate (const char *mime_type, apr_pool_t *pool)
 Validate mime_type. More...
 
svn_boolean_t svn_mime_type_is_binary (const char *mime_type)
 Return FALSE iff mime_type is a textual type. More...
 
svn_lock_tsvn_lock_create (apr_pool_t *pool)
 Returns an svn_lock_t, allocated in pool with all fields initialized to NULL values. More...
 
svn_lock_tsvn_lock_dup (const svn_lock_t *lock, apr_pool_t *pool)
 Return a deep copy of lock, allocated in pool. More...
 
const char * svn_uuid_generate (apr_pool_t *pool)
 Return a formatted Universal Unique IDentifier (UUID) string. More...
 
svn_merge_range_tsvn_merge_range_dup (const svn_merge_range_t *range, apr_pool_t *pool)
 Return a copy of range, allocated in pool. More...
 
svn_boolean_t svn_merge_range_contains_rev (const svn_merge_range_t *range, svn_revnum_t rev)
 Returns true if the changeset committed in revision rev is one of the changesets in the range range. More...
 
svn_location_segment_tsvn_location_segment_dup (const svn_location_segment_t *segment, apr_pool_t *pool)
 Return a deep copy of segment, allocated in pool. More...
 

Detailed Description

Subversion's data types.

@if copyrights

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations

under the License.

Definition in file svn_types.h.

Macro Definition Documentation

◆ FALSE

#define FALSE   0

uhh...

false

Definition at line 150 of file svn_types.h.

◆ SVN__APR_STATUS_IS_ENOTDIR

#define SVN__APR_STATUS_IS_ENOTDIR (   s)    APR_STATUS_IS_ENOTDIR(s)

On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of invalid-pathname error but not ERROR_INVALID_NAME, so we include it.

We also include ERROR_DIRECTORY as that was not included in apr versions before 1.4.0 and this fix is not backported

Definition at line 287 of file svn_types.h.

◆ SVN__APR_STATUS_IS_EPIPE

#define SVN__APR_STATUS_IS_EPIPE (   s)    APR_STATUS_IS_EPIPE(s)

On Windows, APR_STATUS_IS_EPIPE does not include ERROR_NO_DATA error.

So we include it.

Definition at line 298 of file svn_types.h.

◆ SVN_DEPRECATED

#define SVN_DEPRECATED

Macro used to mark deprecated functions.

Since
New in 1.6.

Definition at line 62 of file svn_types.h.

◆ SVN_DEPTH_INFINITY_OR_EMPTY

#define SVN_DEPTH_INFINITY_OR_EMPTY (   recurse)    ((recurse) ? svn_depth_infinity : svn_depth_empty)

Return svn_depth_infinity if boolean recurse is TRUE, else return svn_depth_empty.

Note
New code should never need to use this, it is called only from pre-depth APIs, for compatibility.
Since
New in 1.5.

Definition at line 508 of file svn_types.h.

◆ SVN_DEPTH_INFINITY_OR_FILES

#define SVN_DEPTH_INFINITY_OR_FILES (   recurse)    ((recurse) ? svn_depth_infinity : svn_depth_files)

Return svn_depth_infinity if boolean recurse is TRUE, else return svn_depth_files.

Note
New code should never need to use this, it is called only from pre-depth APIs, for compatibility.
Since
New in 1.5.

Definition at line 486 of file svn_types.h.

◆ SVN_DEPTH_INFINITY_OR_IMMEDIATES

#define SVN_DEPTH_INFINITY_OR_IMMEDIATES (   recurse)    ((recurse) ? svn_depth_infinity : svn_depth_immediates)

Return svn_depth_infinity if boolean recurse is TRUE, else return svn_depth_immediates.

Note
New code should never need to use this, it is called only from pre-depth APIs, for compatibility.
Since
New in 1.5.

Definition at line 497 of file svn_types.h.

◆ SVN_DEPTH_IS_RECURSIVE

#define SVN_DEPTH_IS_RECURSIVE (   depth)    ((depth) == svn_depth_infinity || (depth) == svn_depth_unknown)

Return a recursion boolean based on depth.

Although much code has been converted to use depth, some code still takes a recurse boolean. In most cases, it makes sense to treat unknown or infinite depth as recursive, and any other depth as non-recursive (which in turn usually translates to svn_depth_files).

Definition at line 518 of file svn_types.h.

◆ SVN_EXPERIMENTAL

#define SVN_EXPERIMENTAL

Macro used to mark experimental functions.

Since
New in 1.9.

Definition at line 88 of file svn_types.h.

◆ SVN_IS_VALID_REVNUM

#define SVN_IS_VALID_REVNUM (   n)    ((n) >= 0)

About Special Files in Subversion.

Subversion denotes files that cannot be portably created or modified as "special" files (svn_node_special). It stores these files in the repository as a plain text file with the svn:special property set. The file contents contain: a platform-specific type string, a space character, then any information necessary to create the file on a supported platform. For example, if a symbolic link were being represented, the repository file would have the following contents:

"link /path/to/link/target"

Where 'link' is the identifier string showing that this special file should be a symbolic link and '/path/to/link/target' is the destination of the symbolic link.

Special files are stored in the text-base exactly as they are stored in the repository. The platform specific files are created in the working copy at EOL/keyword translation time using svn_subst_copy_and_translate2(). If the current platform does not support a specific special file type, the file is copied into the working copy as it is seen in the repository. Because of this, users of other platforms can still view and modify the special files, even if they do not have their unique properties.

New types of special files can be added by:

  1. Implementing a platform-dependent routine to create a uniquely named special file and one to read the special file in libsvn_subr/io.c.
  2. Creating a new textual name similar to SVN_SUBST__SPECIAL_LINK_STR in libsvn_subr/subst.c.
  3. Handling the translation/detranslation case for the new type in create_special_file_from_stream and detranslate_special_file, using the routines from 1. Valid revision numbers begin at 0

Definition at line 393 of file svn_types.h.

◆ SVN_LINENUM_MAX_VALUE

#define SVN_LINENUM_MAX_VALUE   ULONG_MAX

The maximum value of an svn_linenum_t.

Since
New in 1.7.

Definition at line 1251 of file svn_types.h.

◆ SVN_NEEDS_SENTINEL_NULL

#define SVN_NEEDS_SENTINEL_NULL

Macro used to mark functions that require a final null sentinel argument.

Since
New in 1.9.

Definition at line 109 of file svn_types.h.

◆ SVN_REVNUM_T_FMT

#define SVN_REVNUM_T_FMT   "ld"

Originally intended to be used in printf()-style functions to format revision numbers.

Deprecated due to incompatibilities with language translation tools (e.g. gettext).

New code should use a bare "%ld" format specifier for formatting revision numbers.

Deprecated:
Provided for backward compatibility with the 1.0 API.

Definition at line 429 of file svn_types.h.

◆ SVN_STREAM_CHUNK_SIZE

#define SVN_STREAM_CHUNK_SIZE   102400

A buffer size that may be used when processing a stream of data.

Note
We don't use this constant any longer, since it is considered to be unnecessarily large.
Deprecated:
Provided for backwards compatibility with the 1.3 API.

Definition at line 1026 of file svn_types.h.

◆ SVN_UNALIGNED_ACCESS_IS_OK

#define SVN_UNALIGNED_ACCESS_IS_OK   0

Indicate whether the current platform supports unaligned data access.

On the majority of machines running SVN (x86 / x64), unaligned access is much cheaper than repeated aligned access. Define this macro to 1 on those machines. Unaligned access on other machines (e.g. IA64) will trigger memory access faults or simply misbehave.

Note: Some platforms may only support unaligned access for integers (PowerPC). As a result this macro should only be used to determine if unaligned access is supported for integers.

Since
New in 1.7.

Definition at line 134 of file svn_types.h.

◆ SVN_VA_NULL

#define SVN_VA_NULL   ((struct svn__null_pointer_constant_stdarg_sentinel_t*)0)

Null pointer constant used as a sentinel in variable argument lists.

Use of this macro ensures that the argument is of the correct size when a pointer is expected. (The macro NULL is not defined as a pointer on all systems, and the arguments to variadic functions are not converted automatically to the expected type.)

Since
New in 1.9.

Definition at line 170 of file svn_types.h.

◆ TRUE

#define TRUE   1

uhh...

true

Definition at line 145 of file svn_types.h.

Typedef Documentation

◆ svn_cancel_func_t

typedef svn_error_t*(* svn_cancel_func_t) (void *cancel_baton)

A user defined callback that subversion will call with a user defined baton to see if the current operation should be continued.

If the operation should continue, the function should return SVN_NO_ERROR, if not, it should return SVN_ERR_CANCELLED.

Definition at line 1085 of file svn_types.h.

◆ svn_commit_callback2_t

typedef svn_error_t*(* svn_commit_callback2_t) (const svn_commit_info_t *commit_info, void *baton, apr_pool_t *pool)

Callback function type for commits.

When a commit succeeds, an instance of this is invoked with the commit_info, along with the baton closure. pool can be used for temporary allocations.

Note
Implementers of this callback that pass this callback to svn_ra_get_commit_editor3() should be careful with returning errors as these might be returned as commit errors. See the documentation of svn_ra_get_commit_editor3() for more details.
Since
New in 1.4.

Definition at line 1001 of file svn_types.h.

◆ svn_commit_callback_t

typedef svn_error_t*(* svn_commit_callback_t) (svn_revnum_t new_revision, const char *date, const char *author, void *baton)

Same as svn_commit_callback2_t, but uses individual data elements instead of the svn_commit_info_t structure.

Deprecated:
Provided for backward compatibility with the 1.3 API.

Definition at line 1011 of file svn_types.h.

◆ svn_commit_info_t

All information about a commit.

Note
Objects of this type should always be created using the svn_create_commit_info() function.
Since
New in 1.3.

◆ svn_dirent_t

typedef struct svn_dirent_t svn_dirent_t

A general subversion directory entry.

Note
To allow for extending the svn_dirent_t structure in future releases, always use svn_dirent_create() to allocate the stucture.
Since
New in 1.6.

◆ svn_error_t

typedef struct svn_error_t svn_error_t

Subversion error object.

Defined here, rather than in svn_error.h, to avoid a recursive #include situation.

◆ svn_linenum_t

typedef unsigned long svn_linenum_t

A line number, such as in a file or a stream.

Since
New in 1.7.

Definition at line 1245 of file svn_types.h.

◆ svn_lock_t

typedef struct svn_lock_t svn_lock_t

A lock object, for client & server to share.

A lock represents the exclusive right to add, delete, or modify a path. A lock is created in a repository, wholly controlled by the repository. A "lock-token" is the lock's UUID, and can be used to learn more about a lock's fields, and or/make use of the lock. Because a lock is immutable, a client is free to not only cache the lock-token, but the lock's fields too, for convenience.

Note that the 'is_dav_comment' field is wholly ignored by every library except for mod_dav_svn. The field isn't even marshalled over the network to the client. Assuming lock structures are created with apr_pcalloc(), a default value of 0 is universally safe.

Note
in the current implementation, only files are lockable.
Since
New in 1.2.

◆ svn_log_changed_path2_t

A structure to represent a path that changed for a log entry.

Note
To allow for extending the svn_log_changed_path2_t structure in future releases, always use svn_log_changed_path2_create() to allocate the structure.
Since
New in 1.6.

◆ svn_log_changed_path_t

A structure to represent a path that changed for a log entry.

Same as the first three fields of svn_log_changed_path2_t.

Deprecated:
Provided for backward compatibility with the 1.5 API.

◆ svn_log_entry_receiver_t

typedef svn_error_t*(* svn_log_entry_receiver_t) (void *baton, svn_log_entry_t *log_entry, apr_pool_t *pool)

The callback invoked by log message loopers, such as svn_ra_plugin_t.get_log() and svn_repos_get_logs().

This function is invoked once on each log message, in the order determined by the caller (see above-mentioned functions).

baton is what you think it is, and log_entry contains relevant information for the log message. Any of log_entry->author, log_entry->date, or log_entry->message may be NULL.

If log_entry->date is neither NULL nor the empty string, it was generated by svn_time_to_cstring() and can be converted to apr_time_t with svn_time_from_cstring().

If log_entry->changed_paths is non-NULL, then it contains as keys every path committed in log_entry->revision; the values are (svn_log_changed_path_t *) structures.

If log_entry->has_children is TRUE, the message will be followed immediately by any number of merged revisions (child messages), which are terminated by an invocation with SVN_INVALID_REVNUM. This usage may be recursive.

Use pool for temporary allocation. If the caller is iterating over log messages, invoking this receiver on each, we recommend the standard pool loop recipe: create a subpool, pass it as pool to each call, clear it after each iteration, destroy it after the loop is done. (For allocation that must last beyond the lifetime of a given receiver call, use a pool in baton.)

Since
New in 1.5.

Definition at line 967 of file svn_types.h.

◆ svn_log_entry_t

A structure to represent all the information about a particular log entry.

Note
To allow for extending the svn_log_entry_t structure in future releases, always use svn_log_entry_create() to allocate the structure.
Since
New in 1.5.

◆ svn_log_message_receiver_t

typedef svn_error_t*(* svn_log_message_receiver_t) (void *baton, apr_hash_t *changed_paths, svn_revnum_t revision, const char *author, const char *date, const char *message, apr_pool_t *pool)

Similar to svn_log_entry_receiver_t, except this uses separate parameters for each part of the log entry.

Deprecated:
Provided for backward compatibility with the 1.4 API.

Definition at line 978 of file svn_types.h.

◆ svn_merge_range_t

Mergeinfo representing a merge of a range of revisions.

Since
New in 1.5

Function Documentation

◆ svn_commit_info_dup()

svn_commit_info_t* svn_commit_info_dup ( const svn_commit_info_t src_commit_info,
apr_pool_t *  pool 
)

Return a deep copy src_commit_info allocated in pool.

Since
New in 1.4.

◆ svn_create_commit_info()

svn_commit_info_t* svn_create_commit_info ( apr_pool_t *  pool)

Allocate an object of type svn_commit_info_t in pool and return it.

The revision field of the new struct is set to SVN_INVALID_REVNUM. All other fields are initialized to NULL.

Note
Any object of the type svn_commit_info_t should be created using this function. This is to provide for extending the svn_commit_info_t in the future.
Since
New in 1.3.

◆ svn_depth_from_word()

svn_depth_t svn_depth_from_word ( const char *  word)

Return the appropriate depth for depth_str.

word is as returned from svn_depth_to_word(). If depth_str does not represent a recognized depth, return svn_depth_unknown.

Since
New in 1.5.

◆ svn_depth_to_word()

const char* svn_depth_to_word ( svn_depth_t  depth)

Return a constant string expressing depth as an English word, e.g., "infinity", "immediates", etc.

The string is not localized, as it may be used for client<->server communications.

Since
New in 1.5.

◆ svn_dirent_create()

svn_dirent_t* svn_dirent_create ( apr_pool_t *  result_pool)

Create a new svn_dirent_t instance with all values initialized to their not-available values.

Since
New in 1.8.

◆ svn_dirent_dup()

svn_dirent_t* svn_dirent_dup ( const svn_dirent_t dirent,
apr_pool_t *  pool 
)

Return a deep copy of dirent, allocated in pool.

Since
New in 1.4.

◆ svn_lock_create()

svn_lock_t* svn_lock_create ( apr_pool_t *  pool)

Returns an svn_lock_t, allocated in pool with all fields initialized to NULL values.

Note
To allow for extending the svn_lock_t structure in the future releases, this function should always be used to allocate the structure.
Since
New in 1.2.

◆ svn_lock_dup()

svn_lock_t* svn_lock_dup ( const svn_lock_t lock,
apr_pool_t *  pool 
)

Return a deep copy of lock, allocated in pool.

Since
New in 1.2.

◆ svn_log_changed_path2_create()

svn_log_changed_path2_t* svn_log_changed_path2_create ( apr_pool_t *  pool)

Returns an svn_log_changed_path2_t, allocated in pool with all fields initialized to NULL, None or empty values.

Note
To allow for extending the svn_log_changed_path2_t structure in future releases, this function should always be used to allocate the structure.
Since
New in 1.6.

◆ svn_log_changed_path2_dup()

svn_log_changed_path2_t* svn_log_changed_path2_dup ( const svn_log_changed_path2_t changed_path,
apr_pool_t *  pool 
)

Return a deep copy of changed_path, allocated in pool.

Since
New in 1.6.

◆ svn_log_changed_path_dup()

svn_log_changed_path_t* svn_log_changed_path_dup ( const svn_log_changed_path_t changed_path,
apr_pool_t *  pool 
)

Return a deep copy of changed_path, allocated in pool.

Since
New in 1.3.
Deprecated:
Provided for backward compatibility with the 1.5 API.

◆ svn_log_entry_create()

svn_log_entry_t* svn_log_entry_create ( apr_pool_t *  pool)

Returns an svn_log_entry_t, allocated in pool with all fields initialized to NULL values.

Note
To allow for extending the svn_log_entry_t structure in future releases, this function should always be used to allocate the structure.
Since
New in 1.5.

◆ svn_log_entry_dup()

svn_log_entry_t* svn_log_entry_dup ( const svn_log_entry_t log_entry,
apr_pool_t *  pool 
)

Return a deep copy of log_entry, allocated in pool.

The resulting svn_log_entry_t has changed_paths set to the same value as changed_path2. changed_paths will be NULL if changed_paths2 was NULL.

Since
New in 1.6.

◆ svn_merge_range_contains_rev()

svn_boolean_t svn_merge_range_contains_rev ( const svn_merge_range_t range,
svn_revnum_t  rev 
)

Returns true if the changeset committed in revision rev is one of the changesets in the range range.

Since
New in 1.5.

◆ svn_merge_range_dup()

svn_merge_range_t* svn_merge_range_dup ( const svn_merge_range_t range,
apr_pool_t *  pool 
)

Return a copy of range, allocated in pool.

Since
New in 1.5.

◆ svn_mime_type_is_binary()

svn_boolean_t svn_mime_type_is_binary ( const char *  mime_type)

Return FALSE iff mime_type is a textual type.

All mime types that start with "text/" are textual, plus some special cases (for example, "image/x-xbitmap").

◆ svn_mime_type_validate()

svn_error_t* svn_mime_type_validate ( const char *  mime_type,
apr_pool_t *  pool 
)

Validate mime_type.

If mime_type does not contain a "/", or ends with non-alphanumeric data, return SVN_ERR_BAD_MIME_TYPE, else return success.

Use pool only to find error allocation.

Goal: to match both "foo/bar" and "foo/bar; charset=blah", without being too strict about it, but to disallow mime types that have quotes, newlines, or other garbage on the end, such as might be unsafe in an HTTP header.

◆ svn_node_kind_from_word()

svn_node_kind_t svn_node_kind_from_word ( const char *  word)

Return the appropriate node_kind for word.

word is as returned from svn_node_kind_to_word(). If word does not represent a recognized kind or is NULL, return svn_node_unknown.

Since
New in 1.6.

◆ svn_node_kind_to_word()

const char* svn_node_kind_to_word ( svn_node_kind_t  kind)

Return a constant string expressing kind as an English word, e.g., "file", "dir", etc.

The string is not localized, as it may be used for client<->server communications. If the kind is not recognized, return "unknown".

Since
New in 1.6.

◆ svn_revnum_parse()

svn_error_t* svn_revnum_parse ( svn_revnum_t rev,
const char *  str,
const char **  endptr 
)

Parse NULL-terminated C string str as a revision number and store its value in rev.

If endptr is non-NULL, then the address of the first non-numeric character in str is stored in it. If there are no digits in str, then endptr is set (if non-NULL), and the error SVN_ERR_REVNUM_PARSE_FAILURE error is returned. Negative numbers parsed from str are considered invalid, and result in the same error.

Since
New in 1.5.

◆ svn_tristate__from_word()

svn_tristate_t svn_tristate__from_word ( const char *  word)

Return the appropriate tristate for word.

If word is "true", returns svn_tristate_true; if word is "false", returns svn_tristate_false, for all other values (including NULL) returns svn_tristate_unknown.

Since
New in 1.7.

◆ svn_tristate__to_word()

const char* svn_tristate__to_word ( svn_tristate_t  tristate)

Return a constant string "true", "false" or NULL representing the value of tristate.

Since
New in 1.7.

◆ svn_uuid_generate()

const char* svn_uuid_generate ( apr_pool_t *  pool)

Return a formatted Universal Unique IDentifier (UUID) string.

Since
New in 1.4.