diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-08-05 16:22:51 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-08-05 16:22:51 +0000 |
commit | cf46733632c7279a9fd0fe6ce26f9185a4ae82a9 (patch) | |
tree | da27775a2161723ef342e91af41a8b51fedef405 /subversion/include/svn_wc.h | |
parent | bb0ef45f7c46b0ae221b26265ef98a768c33f820 (diff) | |
download | subversion-tarball-master.tar.gz |
subversion-1.9.7HEADsubversion-1.9.7master
Diffstat (limited to 'subversion/include/svn_wc.h')
-rw-r--r-- | subversion/include/svn_wc.h | 287 |
1 files changed, 254 insertions, 33 deletions
diff --git a/subversion/include/svn_wc.h b/subversion/include/svn_wc.h index 37210ff..010597b 100644 --- a/subversion/include/svn_wc.h +++ b/subversion/include/svn_wc.h @@ -907,13 +907,15 @@ svn_wc_external_item_dup(const svn_wc_external_item_t *item, * * Allocate the table, keys, and values in @a pool. * - * Use @a parent_directory only in constructing error strings. + * @a defining_directory is the path or URL of the directory on which + * the svn:externals property corresponding to @a desc is set. + * @a defining_directory is only used when constructing error strings. * * @since New in 1.5. */ svn_error_t * svn_wc_parse_externals_description3(apr_array_header_t **externals_p, - const char *parent_directory, + const char *defining_directory, const char *desc, svn_boolean_t canonicalize_url, apr_pool_t *pool); @@ -1255,8 +1257,24 @@ typedef enum svn_wc_notify_action_t * copy + delete. The notified path is the move source (the deleted path). * ### TODO: Provide path to move destination as well? * @since New in 1.8. */ - svn_wc_notify_move_broken + svn_wc_notify_move_broken, + + /** Running cleanup on an external module. + * @since New in 1.9. */ + svn_wc_notify_cleanup_external, + + /** The operation failed because the operation (E.g. commit) is only valid + * if the operation includes this path. + * @since New in 1.9. */ + svn_wc_notify_failed_requires_target, + /** Running info on an external module. + * @since New in 1.9. */ + svn_wc_notify_info_external, + + /** Finalizing commit. + * @since New in 1.9. */ + svn_wc_notify_commit_finalizing } svn_wc_notify_action_t; @@ -1732,6 +1750,7 @@ svn_wc_conflict_version_t * svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version, apr_pool_t *pool); + /** A struct that describes a conflict that has occurred in the * working copy. * @@ -1756,8 +1775,10 @@ typedef struct svn_wc_conflict_description2_t /** The path that is in conflict (for a tree conflict, it is the victim) */ const char *local_abspath; - /** The node type of the path being operated on (for a tree conflict, - * ### which version?) */ + /** The node type of the local node involved in this conflict. + * For a tree conflict, this is the node kind of the tree conflict victim. + * For the left/right node kinds of the incoming conflicting change see + * src_left_version->node_kind and src_right_version->node_kind. */ svn_node_kind_t node_kind; /** What sort of conflict are we describing? */ @@ -1776,13 +1797,19 @@ typedef struct svn_wc_conflict_description2_t * (Only if @c kind is 'text', else undefined.) */ const char *mime_type; - /** The action being attempted on the conflicted node or property. - * (When @c kind is 'text', this action must be 'edit'.) */ + /** The incoming action being attempted on the conflicted node or property. + * When @c kind is 'text', this action must be 'edit', but generally it can + * be any kind of possible change. */ svn_wc_conflict_action_t action; - /** The state of the target node or property, relative to its merge-left - * source, that is the reason for the conflict. - * (When @c kind is 'text', this reason must be 'edited'.) */ + /** The local change or state of the target node or property, relative + * to its merge-left source, that conflicts with the incoming action. + * When @c kind is 'text', this must be 'edited', but generally it can + * be any kind of possible change. + * Note that 'local' does not always refer to a working copy. A change + * can be local to the target branch of a merge operation, for example, + * and is not necessarily visible in a working copy of the target branch + * at any given revision. */ svn_wc_conflict_reason_t reason; /** If this is text-conflict and involves the merging of two files @@ -1817,7 +1844,8 @@ typedef struct svn_wc_conflict_description2_t /** my locally-edited version of the file */ const char *my_abspath; - /** merged version; may contain conflict markers */ + /** merged version; may contain conflict markers + * ### For property conflicts, this contains 'their_abspath'. */ const char *merged_file; /** The operation that exposed the conflict. @@ -1831,8 +1859,44 @@ typedef struct svn_wc_conflict_description2_t /** Info on the "merge-right source" or "their" version of incoming change. */ const svn_wc_conflict_version_t *src_right_version; - /* Remember to adjust svn_wc__conflict_description2_dup() - * if you add new fields to this struct. */ + /** For property conflicts, the absolute path to the .prej file. + * @since New in 1.9. */ + const char *prop_reject_abspath; + + /** For property conflicts, the local base value of the property, i.e. the + * value of the property as of the BASE revision of the working copy. + * For conflicts created during update/switch this contains the + * post-update/switch property value. The pre-update/switch value can + * be found in prop_value_incoming_old. + * Only set if available, so might be @c NULL. + * @since New in 1.9. */ + const svn_string_t *prop_value_base; + + /** For property conflicts, the local working value of the property, + * i.e. the value of the property in the working copy, possibly with + * local modiciations. + * Only set if available, so might be @c NULL. + * @since New in 1.9. */ + const svn_string_t *prop_value_working; + + /** For property conflicts, the incoming old value of the property, + * i.e. the value the property had at @c src_left_version. + * Only set if available, so might be @c NULL. + * @since New in 1.9 */ + const svn_string_t *prop_value_incoming_old; + + /** For property conflicts, the incoming new value of the property, + * i.e. the value the property had at @c src_right_version. + * Only set if available, so might be @c NULL. + * @since New in 1.9 */ + const svn_string_t *prop_value_incoming_new; + +/* NOTE: Add new fields at the end to preserve binary compatibility. + Also, if you add fields here, you have to update + svn_wc_conflict_description2_dup and perhaps + svn_wc_conflict_description_create_text2, + svn_wc_conflict_description_create_prop2, and + svn_wc_conflict_description_create_tree2. */ } svn_wc_conflict_description2_t; @@ -1928,7 +1992,7 @@ typedef struct svn_wc_conflict_description_t } svn_wc_conflict_description_t; /** - * Allocate an #svn_wc_conflict_description_t structure in @a result_pool, + * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool, * initialize to represent a text conflict, and return it. * * Set the @c local_abspath field of the created struct to @a local_abspath @@ -1960,7 +2024,7 @@ svn_wc_conflict_description_create_text(const char *path, apr_pool_t *pool); /** - * Allocate an #svn_wc_conflict_description_t structure in @a result_pool, + * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool, * initialize to represent a property conflict, and return it. * * Set the @c local_abspath field of the created struct to @a local_abspath @@ -1994,13 +2058,13 @@ svn_wc_conflict_description_create_prop(const char *path, apr_pool_t *pool); /** - * Allocate an #svn_wc_conflict_description_t structure in @a pool, + * Allocate an #svn_wc_conflict_description2_t structure in @a pool, * initialize to represent a tree conflict, and return it. * * Set the @c local_abspath field of the created struct to @a local_abspath * (which must be an absolute path), the @c kind field to - * #svn_wc_conflict_kind_tree, the @c node_kind to @a node_kind, the @c - * operation to @a operation, the @c src_left_version field to + * #svn_wc_conflict_kind_tree, the @c local_node_kind to @a local_node_kind, + * the @c operation to @a operation, the @c src_left_version field to * @a src_left_version, and the @c src_right_version field to * @a src_right_version. * @@ -2040,8 +2104,21 @@ svn_wc_conflict_description_create_tree( /** Return a duplicate of @a conflict, allocated in @a result_pool. * A deep copy of all members will be made. * + * @since New in 1.9. + */ +svn_wc_conflict_description2_t * +svn_wc_conflict_description2_dup( + const svn_wc_conflict_description2_t *conflict, + apr_pool_t *result_pool); + + +/** Like svn_wc_conflict_description2_dup(), but is improperly named + * as a private function when it is intended to be a public API. + * * @since New in 1.7. + * @deprecated Provided for backward compatibility with the 1.8 API. */ +SVN_DEPRECATED svn_wc_conflict_description2_t * svn_wc__conflict_description2_dup( const svn_wc_conflict_description2_t *conflict, @@ -2054,9 +2131,15 @@ svn_wc__conflict_description2_dup( */ typedef enum svn_wc_conflict_choice_t { + /** Undefined; for internal use only. + This value is never returned in svn_wc_conflict_result_t. + * @since New in 1.9 + */ + svn_wc_conflict_choose_undefined = -1, + /** Don't resolve the conflict now. Let libsvn_wc mark the path 'conflicted', so user can run 'svn resolved' later. */ - svn_wc_conflict_choose_postpone, + svn_wc_conflict_choose_postpone = 0, /** If there were files to choose from, select one as a way of resolving the conflict here and now. libsvn_wc will then do the @@ -2069,7 +2152,7 @@ typedef enum svn_wc_conflict_choice_t svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */ svn_wc_conflict_choose_merged, /**< merged version */ - /* @since New in 1.8. */ + /** @since New in 1.8. */ svn_wc_conflict_choose_unspecified /**< undecided */ } svn_wc_conflict_choice_t; @@ -2102,6 +2185,14 @@ typedef struct svn_wc_conflict_result_t NULL) in the user's working copy. */ svn_boolean_t save_merged; + /** If not NULL, this is the new merged property, used when choosing + * #svn_wc_conflict_choose_merged. This value is prefered over using + * merged_file. + * + * @since New in 1.9. + */ + const svn_string_t *merged_value; + } svn_wc_conflict_result_t; @@ -2111,7 +2202,8 @@ typedef struct svn_wc_conflict_result_t * * Set the @c choice field of the structure to @a choice, @c merged_file * to @a merged_file, and @c save_merged to false. Make only a shallow - * copy of the pointer argument @a merged_file. + * copy of the pointer argument @a merged_file. @a merged_file may be + * NULL if setting merged_file is not needed. * * @since New in 1.5. */ @@ -3743,6 +3835,13 @@ typedef struct svn_wc_status3_t * @since New in 1.8. */ svn_boolean_t file_external; + + /** The actual kind of the node in the working copy. May differ from + * @a kind on obstructions, deletes, etc. #svn_node_unknown if unavailable. + * + * @since New in 1.9 */ + svn_node_kind_t actual_kind; + /* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */ } svn_wc_status3_t; @@ -4544,10 +4643,9 @@ svn_wc_delete(const char *path, * addition to the working copy. The added node will have the properties * provided in @a props, or none if that is NULL. * - * Check and canonicalize the properties in the same way as - * svn_wc_prop_set4(). Return an error and don't add the node if the - * properties are not valid on this node. Unlike svn_wc_prop_set4() - * there is no option to skip some of the checks and canonicalizations. + * Unless @a skip_checks is TRUE, check and canonicalize the properties in the + * same way as svn_wc_prop_set4(). Return an error and don't add the node if + * the properties are not valid on this node. * * ### The error code on validity check failure should be specified, and * preferably should be a single code. @@ -4559,10 +4657,30 @@ svn_wc_delete(const char *path, * If @a local_abspath does not exist as file, directory or symlink, return * #SVN_ERR_WC_PATH_NOT_FOUND. * + * If @a notify_func is non-NULL, invoke it with @a notify_baton to report + * the item being added. + * * ### TODO: Split into add_dir, add_file, add_symlink? * + * @since New in 1.9. + */ +svn_error_t * +svn_wc_add_from_disk3(svn_wc_context_t *wc_ctx, + const char *local_abspath, + const apr_hash_t *props, + svn_boolean_t skip_checks, + svn_wc_notify_func2_t notify_func, + void *notify_baton, + apr_pool_t *scratch_pool); + +/** + * Similar to svn_wc_add_from_disk3(), but always passes FALSE for + * @a skip_checks + * * @since New in 1.8. + * @deprecated Provided for backward compatibility with the 1.8 API. */ +SVN_DEPRECATED svn_error_t * svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx, const char *local_abspath, @@ -5070,6 +5188,12 @@ svn_wc_committed_queue_create(apr_pool_t *pool); * ### seems to be not a set of changes but rather the new complete set of * ### props. And it's renamed to 'new_dav_cache' inside; why? * + * If @a is_committed is @c TRUE, the node will be processed as committed. This + * turns the node and its implied descendants as the new unmodified state at + * the new specified revision. Unless @a recurse is TRUE, changes on + * descendants are not committed as changes directly. In this case they should + * be queueud as their own changes. + * * If @a remove_lock is @c TRUE, any entryprops related to a repository * lock will be removed. * @@ -5107,7 +5231,25 @@ svn_wc_committed_queue_create(apr_pool_t *pool); * Temporary allocations will be performed in @a scratch_pool, and persistent * allocations will use the same pool as @a queue used when it was created. * + * @since New in 1.9. + */ +svn_error_t * +svn_wc_queue_committed4(svn_wc_committed_queue_t *queue, + svn_wc_context_t *wc_ctx, + const char *local_abspath, + svn_boolean_t recurse, + svn_boolean_t is_committed, + const apr_array_header_t *wcprop_changes, + svn_boolean_t remove_lock, + svn_boolean_t remove_changelist, + const svn_checksum_t *sha1_checksum, + apr_pool_t *scratch_pool); + +/** Similar to svn_wc_queue_committed4, but with is_committed always + * TRUE. + * * @since New in 1.7. + * @deprecated Provided for backwards compatibility with the 1.8 API. */ svn_error_t * svn_wc_queue_committed3(svn_wc_committed_queue_t *queue, @@ -7093,7 +7235,7 @@ svn_wc_merge_prop_diffs(svn_wc_notify_state_t *state, * the copy/move source (even if the copy-/move-here replaces a locally * deleted file). * - * If @a local_abspath refers to an unversioned or non-existing path, return + * If @a local_abspath refers to an unversioned or non-existent path, return * @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a wc_ctx to access the working copy. * @a contents may not be @c NULL (unlike @a *contents). * @@ -7142,19 +7284,59 @@ svn_wc_get_pristine_copy_path(const char *path, /** - * Recurse from @a local_abspath, cleaning up unfinished log business. Perform - * any temporary allocations in @a scratch_pool. Any working copy locks under - * @a local_abspath will be taken over and then cleared by this function. + * Recurse from @a local_abspath, cleaning up unfinished tasks. Perform + * any temporary allocations in @a scratch_pool. If @a break_locks is TRUE + * Any working copy locks under @a local_abspath will be taken over and then + * cleared by this function. + * WARNING: If @a break_locks is TRUE there is no mechanism that will protect + * locks that are still being used. * - * WARNING: there is no mechanism that will protect locks that are still being - * used. + * If @a fix_recorded_timestamps is TRUE the recorded timestamps of unmodified + * files will be updated, which will improve performance of future is-modified + * checks. + * + * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older + * mod_dav served repositories is cleared. This clearing invalidates some + * cached information used for pre-HTTPv2 repositories. + * + * If @a vacuum_pristines is TRUE, try to remove unreferenced pristines from + * the working copy. (Will not remove anything unless the obtained lock applies + * to the entire working copy) * * If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various * points during the operation. If it returns an error (typically * #SVN_ERR_CANCELLED), return that error immediately. * + * If @a notify_func is non-NULL, invoke it with @a notify_baton to report + * the progress of the operation. + * + * @note In 1.9, @a notify_func does not get called at all. This may change + * in later releases. + * + * @since New in 1.9. + */ +svn_error_t * +svn_wc_cleanup4(svn_wc_context_t *wc_ctx, + const char *local_abspath, + svn_boolean_t break_locks, + svn_boolean_t fix_recorded_timestamps, + svn_boolean_t clear_dav_cache, + svn_boolean_t vacuum_pristines, + svn_cancel_func_t cancel_func, + void *cancel_baton, + svn_wc_notify_func2_t notify_func, + void *notify_baton, + apr_pool_t *scratch_pool); + +/** + * Similar to svn_wc_cleanup4() but will always break locks, fix recorded + * timestamps, clear the dav cache and vacuum pristines. This function also + * doesn't support notifications. + * * @since New in 1.7. + * @deprecated Provided for backward compatibility with the 1.8 API. */ +SVN_DEPRECATED svn_error_t * svn_wc_cleanup3(svn_wc_context_t *wc_ctx, const char *local_abspath, @@ -7379,6 +7561,13 @@ svn_wc_relocate(const char *path, * changelists. If @a changelist_filter is empty (or altogether @c NULL), * no changelist filtering occurs. * + * If @a clear_changelists is TRUE, then changelist information for the + * paths is cleared. + * + * If @a metadata_only is TRUE, the working copy files are untouched, but + * if there are conflict marker files attached to these files these + * markers are removed. + * * If @a cancel_func is non-NULL, call it with @a cancel_baton at * various points during the reversion process. If it returns an * error (typically #SVN_ERR_CANCELLED), return that error @@ -7395,8 +7584,29 @@ svn_wc_relocate(const char *path, * If @a path is not under version control, return the error * #SVN_ERR_UNVERSIONED_RESOURCE. * + * @since New in 1.9. + */ +svn_error_t * +svn_wc_revert5(svn_wc_context_t *wc_ctx, + const char *local_abspath, + svn_depth_t depth, + svn_boolean_t use_commit_times, + const apr_array_header_t *changelist_filter, + svn_boolean_t clear_changelists, + svn_boolean_t metadata_only, + svn_cancel_func_t cancel_func, + void *cancel_baton, + svn_wc_notify_func2_t notify_func, + void *notify_baton, + apr_pool_t *scratch_pool); + +/** Similar to svn_wc_revert5() but with @a clear_changelists always set to + * FALSE and @a metadata_only set to FALSE. + * * @since New in 1.7. + * @deprecated Provided for backward compatibility with the 1.8 API. */ +SVN_DEPRECATED svn_error_t * svn_wc_revert4(svn_wc_context_t *wc_ctx, const char *local_abspath, @@ -7875,7 +8085,8 @@ typedef struct svn_wc_revision_status_t svn_boolean_t switched; /**< Is anything switched? */ svn_boolean_t modified; /**< Is anything modified? */ - /** Whether any WC paths are at a depth other than #svn_depth_infinity. + /** Whether any WC paths are at a depth other than #svn_depth_infinity or + * are user excluded. * @since New in 1.5. */ svn_boolean_t sparse_checkout; @@ -8020,7 +8231,17 @@ typedef svn_error_t *(*svn_changelist_receiver_t) (void *baton, /** - * ### TODO: Doc string, please. + * Beginning at @a local_abspath, crawl to @a depth to discover every path in + * or under @a local_abspath which belongs to one of the changelists in @a + * changelist_filter (an array of <tt>const char *</tt> changelist names). + * If @a changelist_filter is @c NULL, discover paths with any changelist. + * Call @a callback_func (with @a callback_baton) each time a + * changelist-having path is discovered. + * + * @a local_abspath is a local WC path. + * + * If @a cancel_func is not @c NULL, invoke it passing @a cancel_baton + * during the recursive walk. * * @since New in 1.7. */ |