diff options
Diffstat (limited to 'subversion/tests/libsvn_wc/utils.h')
-rw-r--r-- | subversion/tests/libsvn_wc/utils.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/subversion/tests/libsvn_wc/utils.h b/subversion/tests/libsvn_wc/utils.h index 83114e2..3004634 100644 --- a/subversion/tests/libsvn_wc/utils.h +++ b/subversion/tests/libsvn_wc/utils.h @@ -74,6 +74,107 @@ svn_test__sandbox_create(svn_test__sandbox_t *sandbox, const svn_test_opts_t *opts, apr_pool_t *pool); +/* ---------------------------------------------------------------------- */ +/* Functions for easy manipulation of a WC. Paths given to these functions + * can be relative to the WC root as stored in the WC baton. */ + +/* Return the abspath of PATH which is absolute or relative to the WC in B. */ +#define sbox_wc_path(b, path) \ + (svn_dirent_join((b)->wc_abspath, (path), (b)->pool)) + +/* Create a file on disk at PATH, with TEXT as its content. */ +void +sbox_file_write(svn_test__sandbox_t *b, const char *path, const char *text); + +/* Schedule for addition the single node that exists on disk at PATH, + * non-recursively. */ +svn_error_t * +sbox_wc_add(svn_test__sandbox_t *b, const char *path); + +/* Create a single directory on disk. */ +svn_error_t * +sbox_disk_mkdir(svn_test__sandbox_t *b, const char *path); + +/* Create a single directory on disk and schedule it for addition. */ +svn_error_t * +sbox_wc_mkdir(svn_test__sandbox_t *b, const char *path); + +/* Copy the WC file or directory tree FROM_PATH to TO_PATH which must not + * exist beforehand. */ +svn_error_t * +sbox_wc_copy(svn_test__sandbox_t *b, const char *from_path, const char *to_path); + +svn_error_t * +sbox_wc_copy_url(svn_test__sandbox_t *b, const char *from_url, + svn_revnum_t revision, const char *to_path); + +svn_error_t * +sbox_wc_relocate(svn_test__sandbox_t *b, + const char *new_repos_url); + +/* Revert a WC file or directory tree at PATH */ +svn_error_t * +sbox_wc_revert(svn_test__sandbox_t *b, const char *path, svn_depth_t depth); + +/* */ +svn_error_t * +sbox_wc_delete(svn_test__sandbox_t *b, const char *path); + +/* */ +svn_error_t * +sbox_wc_exclude(svn_test__sandbox_t *b, const char *path); + +/* */ +svn_error_t * +sbox_wc_commit(svn_test__sandbox_t *b, const char *path); + +/* */ +svn_error_t * +sbox_wc_commit_ex(svn_test__sandbox_t *b, + apr_array_header_t *targets, + svn_depth_t depth); + +/* */ +svn_error_t * +sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum); + +svn_error_t * +sbox_wc_update_depth(svn_test__sandbox_t *b, + const char *path, + svn_revnum_t revnum, + svn_depth_t depth, + svn_boolean_t sticky); + +svn_error_t * +sbox_wc_switch(svn_test__sandbox_t *b, + const char *path, + const char *url, + svn_depth_t depth); + +/* */ +svn_error_t * +sbox_wc_resolved(svn_test__sandbox_t *b, const char *path); + +/* */ +svn_error_t * +sbox_wc_resolve(svn_test__sandbox_t *b, const char *path, svn_depth_t depth, + svn_wc_conflict_choice_t conflict_choice); + +/* */ +svn_error_t * +sbox_wc_move(svn_test__sandbox_t *b, const char *src, const char *dst); + +/* Set property NAME to VALUE on PATH. If VALUE=NULL, delete the property. */ +svn_error_t * +sbox_wc_propset(svn_test__sandbox_t *b, + const char *name, + const char *value, + const char *path); + +/* Create the Greek tree on disk in the WC, and commit it. */ +svn_error_t * +sbox_add_and_commit_greek_tree(svn_test__sandbox_t *b); + /* Create a WC directory at WC_ABSPATH containing a fake WC DB, generated by * executing the SQL statements EXTRA_STATEMENTS in addition to the standard |