Import files into the repository.
Client working copy management

## Typedefs

typedef svn_error_t *(* | svn_client_import_filter_func_t) (void *baton, svn_boolean_t *filtered, const char *local_abspath, const svn_io_dirent2_t *dirent, apr_pool_t *scratch_pool)
| The callback invoked by svn_client_import5() before adding a node to the list of nodes to be imported. More...

## Functions

svn_error_t * | svn_client_import5 (const char *path, const char *url, svn_depth_t depth, svn_boolean_t no_ignore, svn_boolean_t no_autoprops, svn_boolean_t ignore_unknown_node_types, const apr_hash_t *revprop_table, svn_client_import_filter_func_t filter_callback, void *filter_baton, svn_commit_callback2_t commit_callback, void *commit_baton, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
| Import file or directory path into repository directory url at head, authenticating with the authentication baton cached in ctx, and using ctx->log_msg_func3/ctx->log_msg_baton3 to get a log message for the (implied) commit. More...
svn_error_t * | svn_client_import4 (const char *path, const char *url, svn_depth_t depth, svn_boolean_t no_ignore, svn_boolean_t ignore_unknown_node_types, const apr_hash_t *revprop_table, svn_commit_callback2_t commit_callback, void *commit_baton, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_import5(), but without support for an optional filter_callback and no_autoprops always set to FALSE. More...
svn_error_t * | svn_client_import3 (svn_commit_info_t **commit_info_p, const char *path, const char *url, svn_depth_t depth, svn_boolean_t no_ignore, svn_boolean_t ignore_unknown_node_types, const apr_hash_t *revprop_table, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_import4(), but returns the commit info in *commit_info_p rather than through a callback function. More...
svn_error_t * | svn_client_import2 (svn_commit_info_t **commit_info_p, const char *path, const char *url, svn_boolean_t nonrecursive, svn_boolean_t no_ignore, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_import3(), but with ignore_unknown_node_types always set to `FALSE`, revprop_table passed as NULL, and depth set according to nonrecursive: if TRUE, then depth is svn_depth_files, else svn_depth_infinity. More...
svn_error_t * | svn_client_import (svn_client_commit_info_t **commit_info_p, const char *path, const char *url, svn_boolean_t nonrecursive, svn_client_ctx_t *ctx, apr_pool_t *pool)
| Similar to svn_client_import2(), but with no_ignore always set to FALSE and using the svn_client_commit_info_t type for commit_info_p. More...

## Detailed Description

## Typedef Documentation

## svn_client_import_filter_func_t

typedef svn_error_t*(* svn_client_import_filter_func_t) (void *baton, svn_boolean_t *filtered, const char *local_abspath, const svn_io_dirent2_t *dirent, apr_pool_t *scratch_pool)

The callback invoked by svn_client_import5() before adding a node to the list of nodes to be imported.

baton is the value passed to svn_client_import5 as filter_baton.

The callback receives the local_abspath for each node and the dirent for it when walking the directory tree. Only the kind of node, including special status is available in dirent.

Implementations can set *filtered to TRUE, to make the import process omit the node and (if the node is a directory) all its descendants.

scratch_pool can be used for temporary allocations.

Since
  New in 1.8.

Definition at line 1982 of file svn_client.h.

## Function Documentation

## svn_client_import()

svn_error_t* svn_client_import | ( | svn_client_commit_info_t ** | commit_info_p,
|  | const char * | path,
|  | const char * | url,
|  | svn_boolean_t | nonrecursive,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_client_import2(), but with no_ignore always set to FALSE and using the svn_client_commit_info_t type for commit_info_p.

Deprecated:
  Provided for backward compatibility with the 1.2 API.

## svn_client_import2()

svn_error_t* svn_client_import2 | ( | svn_commit_info_t ** | commit_info_p,
|  | const char * | path,
|  | const char * | url,
|  | svn_boolean_t | nonrecursive,
|  | svn_boolean_t | no_ignore,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_client_import3(), but with ignore_unknown_node_types always set to `FALSE`, revprop_table passed as NULL, and depth set according to nonrecursive: if TRUE, then depth is svn_depth_files, else svn_depth_infinity.

Since
  New in 1.3.

Deprecated:
  Provided for backward compatibility with the 1.4 API

## svn_client_import3()

svn_error_t* svn_client_import3 | ( | svn_commit_info_t ** | commit_info_p,
|  | const char * | path,
|  | const char * | url,
|  | svn_depth_t | depth,
|  | svn_boolean_t | no_ignore,
|  | svn_boolean_t | ignore_unknown_node_types,
|  | const apr_hash_t * | revprop_table,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_client_import4(), but returns the commit info in *commit_info_p rather than through a callback function.

Since
  New in 1.5.

Deprecated:
  Provided for backward compatibility with the 1.6 API.

## svn_client_import4()

svn_error_t* svn_client_import4 | ( | const char * | path,
|  | const char * | url,
|  | svn_depth_t | depth,
|  | svn_boolean_t | no_ignore,
|  | svn_boolean_t | ignore_unknown_node_types,
|  | const apr_hash_t * | revprop_table,
|  | svn_commit_callback2_t | commit_callback,
|  | void * | commit_baton,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | pool
| ) |  |

Similar to svn_client_import5(), but without support for an optional filter_callback and no_autoprops always set to FALSE.

Since
  New in 1.7.

Deprecated:
  Provided for backward compatibility with the 1.7 API.

## svn_client_import5()

svn_error_t* svn_client_import5 | ( | const char * | path,
|  | const char * | url,
|  | svn_depth_t | depth,
|  | svn_boolean_t | no_ignore,
|  | svn_boolean_t | no_autoprops,
|  | svn_boolean_t | ignore_unknown_node_types,
|  | const apr_hash_t * | revprop_table,
|  | svn_client_import_filter_func_t | filter_callback,
|  | void * | filter_baton,
|  | svn_commit_callback2_t | commit_callback,
|  | void * | commit_baton,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | scratch_pool
| ) |  |

Import file or directory path into repository directory url at head, authenticating with the authentication baton cached in ctx, and using ctx->log_msg_func3/ctx->log_msg_baton3 to get a log message for the (implied) commit.

If some components of url do not exist then create parent directories as necessary.

This function reads an unversioned tree from disk and skips any ".svn" directories. Even if a file or directory being imported is part of an existing WC, this function sees it as unversioned and does not notice any existing Subversion properties in it.

If path is a directory, the contents of that directory are imported directly into the directory identified by url. Note that the directory path itself is not imported – that is, the basename of path is not part of the import.

If path is a file, then the dirname of url is the directory receiving the import. The basename of url is the filename in the repository. In this case if url already exists, return error.

If ctx->notify_func2 is non-NULL, then call ctx->notify_func2 with ctx->notify_baton2 as the import progresses, with any of the following actions: svn_wc_notify_commit_added, svn_wc_notify_commit_postfix_txdelta.

Use scratch_pool for any temporary allocation.

If non-NULL, revprop_table is a hash table holding additional, custom revision properties (`const char *` names mapped to `svn_string_t *` values) to be set on the new revision. This table cannot contain any standard Subversion properties.

ctx->log_msg_func3/ctx->log_msg_baton3 are a callback/baton combo that this function can use to query for a commit log message when one is needed.

If depth is svn_depth_empty, import just path and nothing below it. If svn_depth_files, import path and any file children of path. If svn_depth_immediates, import path, any file children, and any immediate subdirectories (but nothing underneath those subdirectories). If svn_depth_infinity, import path and everything under it fully recursively.

If no_ignore is `FALSE`, don't import any file or directory (or recurse into any directory) that is found by recursion (as opposed to being the explicit target path) and whose name matches the global-ignores list in ctx->config. If no_ignore is `TRUE`, do include such files and directories. (Note that svn:ignore properties are not involved, as auto-props cannot set properties on directories and even if the target is part of a WC the import ignores any existing properties.)

If no_autoprops is TRUE, don't set any autoprops on imported files. If no_autoprops is FALSE then all imported files have autprops set as per the auto-props list in ctx->config and the value of any `SVN_PROP_INHERITABLE_AUTO_PROPS` properties inherited by and explicitly set on url if url is already under versioned control, or the nearest parents of path which are already under version control if not.

If ignore_unknown_node_types is `TRUE`, ignore files of which the node type is unknown, such as device files and pipes.

If filter_callback is non-NULL, call it for each node that isn't ignored for other reasons with filter_baton, to allow third party to ignore specific nodes during importing.

If commit_callback is non-NULL, then for each successful commit, call commit_callback with commit_baton and a svn_commit_info_t for the commit.

Since
  New in 1.8.