svn_fs_copy

Function svn_fs_copy 

Source
pub unsafe extern "C" fn svn_fs_copy(
    from_root: *mut svn_fs_root_t,
    from_path: *const c_char,
    to_root: *mut svn_fs_root_t,
    to_path: *const c_char,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Create a copy of @a from_path in @a from_root named @a to_path in @a to_root. If @a from_path in @a from_root is a directory, copy the tree it refers to recursively.

The copy will remember its source; use svn_fs_copied_from() to access this information.

@a to_root must be the root of a transaction; @a from_root must be the root of a revision. (Requiring @a from_root to be the root of a revision makes the implementation trivial: there is no detectable difference (modulo node revision ID’s) between copying @a from and simply adding a reference to it. So the operation takes place in constant time. However, there’s no reason not to extend this to mutable nodes — it’s just more code.) Further, @a to_root and @a from_root must represent the same filesystem.

@note To do a copy without preserving copy history, use svn_fs_revision_link().

Do any necessary temporary allocation in @a pool.