# Import files into the repository.
[Client working copy management]

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

## Function Documentation

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_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_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_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 |
| ) |  |  |

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 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 ignore_unknown_node_types is `FALSE`, ignore files of which the node type is unknown, such as device files and pipes.

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

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines