#include <apr.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_hash.h>
#include "svn_types.h"
#include "svn_string.h"
#include "svn_delta.h"
#include "svn_error.h"
#include "svn_opt.h"
#include "svn_ra.h"
Go to the source code of this file.
Data Structures | |
struct | svn_wc_diff_callbacks_t |
A callback vtable invoked by our diff-editors, as they receive diffs from the server. More... | |
struct | svn_wc_entry_callbacks_t |
A callback vtable invoked by the generic entry-walker function. More... | |
struct | svn_wc_entry_t |
A working copy entry -- that is, revision control information about one versioned entity. More... | |
struct | svn_wc_external_item_t |
One external item. More... | |
struct | svn_wc_status_t |
Structure for holding the "status" of a working copy item. More... | |
Defines | |
#define | SVN_WC_ADM_DIR_NAME ".svn" |
Administrative subdir. | |
#define | SVN_WC_ENTRY_THIS_DIR "" |
How an entries file's owner dir is named in the entries file. | |
Typedefs | |
typedef svn_wc_adm_access_t | svn_wc_adm_access_t |
Baton for access to a working copy administrative area. | |
typedef svn_wc_traversal_info_t | svn_wc_traversal_info_t |
Traversal information is information gathered by a working copy crawl or update. | |
typedef svn_wc_external_item_t | svn_wc_external_item_t |
One external item. | |
typedef enum svn_wc_notify_action_t | svn_wc_notify_action_t |
The type of action occurring. | |
typedef enum svn_wc_notify_state_t | svn_wc_notify_state_t |
The type of notification that is occurring. | |
typedef void(* | svn_wc_notify_func_t )(void *baton, const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision) |
Notify the world that action has happened to path. | |
typedef svn_wc_diff_callbacks_t | svn_wc_diff_callbacks_t |
A callback vtable invoked by our diff-editors, as they receive diffs from the server. | |
typedef enum svn_wc_schedule_t | svn_wc_schedule_t |
The schedule states an entry can be in. | |
typedef svn_wc_entry_t | svn_wc_entry_t |
A working copy entry -- that is, revision control information about one versioned entity. | |
typedef svn_wc_entry_callbacks_t | svn_wc_entry_callbacks_t |
A callback vtable invoked by the generic entry-walker function. | |
typedef svn_wc_status_t | svn_wc_status_t |
Structure for holding the "status" of a working copy item. | |
typedef void(* | svn_wc_status_func_t )(void *baton, const char *path, svn_wc_status_t *status) |
A callback for reporting an svn_wc_status_t * item status for path. | |
typedef enum svn_wc_merge_outcome_t | svn_wc_merge_outcome_t |
The outcome of a merge carried out (or tried as a dry-run) by svn_wc_merge . | |
typedef svn_error_t *(* | svn_wc_relocation_validator_t )(void *baton, const char *uuid, const char *url) |
Relocation validation callback typedef. | |
Enumerations | |
enum | svn_wc_notify_action_t { svn_wc_notify_add = 0, svn_wc_notify_copy, svn_wc_notify_delete, svn_wc_notify_restore, svn_wc_notify_revert, svn_wc_notify_failed_revert, svn_wc_notify_resolved, svn_wc_notify_skip, svn_wc_notify_update_delete, svn_wc_notify_update_add, svn_wc_notify_update_update, svn_wc_notify_update_completed, svn_wc_notify_update_external, svn_wc_notify_status_completed, svn_wc_notify_status_external, svn_wc_notify_commit_modified, svn_wc_notify_commit_added, svn_wc_notify_commit_deleted, svn_wc_notify_commit_replaced, svn_wc_notify_commit_postfix_txdelta, svn_wc_notify_blame_revision } |
The type of action occurring. More... | |
enum | svn_wc_notify_state_t { svn_wc_notify_state_inapplicable = 0, svn_wc_notify_state_unknown, svn_wc_notify_state_unchanged, svn_wc_notify_state_missing, svn_wc_notify_state_obstructed, svn_wc_notify_state_changed, svn_wc_notify_state_merged, svn_wc_notify_state_conflicted } |
The type of notification that is occurring. More... | |
enum | svn_wc_schedule_t { svn_wc_schedule_normal, svn_wc_schedule_add, svn_wc_schedule_delete, svn_wc_schedule_replace } |
The schedule states an entry can be in. More... | |
enum | svn_wc_status_kind { svn_wc_status_none = 1, svn_wc_status_unversioned, svn_wc_status_normal, svn_wc_status_added, svn_wc_status_missing, svn_wc_status_deleted, svn_wc_status_replaced, svn_wc_status_modified, svn_wc_status_merged, svn_wc_status_conflicted, svn_wc_status_ignored, svn_wc_status_obstructed, svn_wc_status_external, svn_wc_status_incomplete } |
enum | svn_wc_merge_outcome_t { svn_wc_merge_unchanged, svn_wc_merge_merged, svn_wc_merge_conflict, svn_wc_merge_no_merge } |
The outcome of a merge carried out (or tried as a dry-run) by svn_wc_merge . More... | |
Functions | |
svn_error_t * | svn_wc_adm_open (svn_wc_adm_access_t **adm_access, svn_wc_adm_access_t *associated, const char *path, svn_boolean_t write_lock, svn_boolean_t tree_lock, apr_pool_t *pool) |
Return, in *adm_access, a pointer to a new access baton for the working copy administrative area associated with the directory path. | |
svn_error_t * | svn_wc_adm_probe_open (svn_wc_adm_access_t **adm_access, svn_wc_adm_access_t *associated, const char *path, svn_boolean_t write_lock, svn_boolean_t tree_lock, apr_pool_t *pool) |
Checks the working copy to determine the node type of path. | |
svn_error_t * | svn_wc_adm_retrieve (svn_wc_adm_access_t **adm_access, svn_wc_adm_access_t *associated, const char *path, apr_pool_t *pool) |
Return, in *adm_access, a pointer to an existing access baton associated with path. | |
svn_error_t * | svn_wc_adm_probe_retrieve (svn_wc_adm_access_t **adm_access, svn_wc_adm_access_t *associated, const char *path, apr_pool_t *pool) |
Checks the working copy to determine the node type of path. | |
svn_error_t * | svn_wc_adm_probe_try (svn_wc_adm_access_t **adm_access, svn_wc_adm_access_t *associated, const char *path, svn_boolean_t write_lock, svn_boolean_t tree_lock, apr_pool_t *pool) |
Try various ways to obtain an access baton for path. | |
svn_error_t * | svn_wc_adm_close (svn_wc_adm_access_t *adm_access) |
Give up the access baton adm_access, and its lock if any. | |
const char * | svn_wc_adm_access_path (svn_wc_adm_access_t *adm_access) |
Return the path used to open the access baton adm_access. | |
apr_pool_t * | svn_wc_adm_access_pool (svn_wc_adm_access_t *adm_access) |
Return the pool used by access baton adm_access. | |
svn_boolean_t | svn_wc_adm_locked (svn_wc_adm_access_t *adm_access) |
Return TRUE is the access baton adm_access has a write lock, FALSE otherwise. | |
svn_error_t * | svn_wc_locked (svn_boolean_t *locked, const char *path, apr_pool_t *pool) |
Set *locked to non-zero if path is locked, else set it to zero. | |
svn_wc_traversal_info_t * | svn_wc_init_traversal_info (apr_pool_t *pool) |
Return a new, empty traversal info object, allocated in pool. | |
void | svn_wc_edited_externals (apr_hash_t **externals_old, apr_hash_t **externals_new, svn_wc_traversal_info_t *traversal_info) |
Set *externals_old and *externals_new to hash tables representing changes to values of the svn:externals property on directories traversed by traversal_info. | |
svn_error_t * | svn_wc_parse_externals_description (apr_hash_t **externals_p, const char *parent_directory, const char *desc, apr_pool_t *pool) |
If externals_p is non-null, set *externals_p to a hash table whose keys are subdirectory names and values are svn_wc_external_item_t * objects, based on desc. | |
svn_error_t * | svn_wc_check_wc (const char *path, int *wc_format, apr_pool_t *pool) |
Set *wc_format to path's working copy format version number if path is a valid working copy directory, else set it to 0. | |
svn_error_t * | svn_wc_has_binary_prop (svn_boolean_t *has_binary_prop, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set *has_binary_prop to TRUE iff path has been marked with a property indicating that it is non-text (in other words, binary). | |
svn_error_t * | svn_wc_text_modified_p (svn_boolean_t *modified_p, const char *filename, svn_boolean_t force_comparison, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set *modified_p to non-zero if filename's text is modified with regard to the base revision, else set *modified_p to zero. | |
svn_error_t * | svn_wc_props_modified_p (svn_boolean_t *modified_p, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set *modified_p to non-zero if path's properties are modified with regard to the base revision, else set modified_p to zero. | |
svn_error_t * | svn_wc_entry (const svn_wc_entry_t **entry, const char *path, svn_wc_adm_access_t *adm_access, svn_boolean_t show_hidden, apr_pool_t *pool) |
Set *entry to an entry for path, allocated in the access baton pool. | |
svn_error_t * | svn_wc_entries_read (apr_hash_t **entries, svn_wc_adm_access_t *adm_access, svn_boolean_t show_hidden, apr_pool_t *pool) |
Parse the `entries' file for adm_access and return a hash entries, whose keys are (const char * ) entry names and values are (svn_wc_entry_t * ). | |
svn_wc_entry_t * | svn_wc_entry_dup (const svn_wc_entry_t *entry, apr_pool_t *pool) |
Return a duplicate of entry, allocated in pool. | |
svn_error_t * | svn_wc_conflicted_p (svn_boolean_t *text_conflicted_p, svn_boolean_t *prop_conflicted_p, const char *dir_path, const svn_wc_entry_t *entry, apr_pool_t *pool) |
Given a dir_path under version control, decide if one of its entries (entry) is in state of conflict; return the answers in text_conflicted_p and prop_conflicted_p. | |
svn_error_t * | svn_wc_get_ancestry (char **url, svn_revnum_t *rev, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set *url and *rev to the ancestor URL and revision for path, allocating in pool. | |
svn_error_t * | svn_wc_walk_entries (const char *path, svn_wc_adm_access_t *adm_access, const svn_wc_entry_callbacks_t *walk_callbacks, void *walk_baton, svn_boolean_t show_hidden, apr_pool_t *pool) |
A generic entry-walker. | |
svn_error_t * | svn_wc_mark_missing_deleted (const char *path, svn_wc_adm_access_t *parent, apr_pool_t *pool) |
Mark missing path as 'deleted' in its parent's list of entries. | |
svn_error_t * | svn_wc_ensure_adm (const char *path, const char *uuid, const char *url, svn_revnum_t revision, apr_pool_t *pool) |
Ensure that an administrative area exists for path, so that path is a working copy subdir based on url at revision, and with repository UUID uuid. | |
svn_wc_status_t * | svn_wc_dup_status (svn_wc_status_t *orig_stat, apr_pool_t *pool) |
Return a deep copy of the orig_stat status structure, allocated in pool. | |
svn_error_t * | svn_wc_status (svn_wc_status_t **status, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Fill *status for path, allocating in pool, with the exception of the repos_rev field, which is normally filled in by the caller. | |
svn_error_t * | svn_wc_get_status_editor (const svn_delta_editor_t **editor, void **edit_baton, svn_revnum_t *edit_revision, svn_wc_adm_access_t *anchor, const char *target, apr_hash_t *config, svn_boolean_t descend, svn_boolean_t get_all, svn_boolean_t no_ignore, svn_wc_status_func_t status_func, void *status_baton, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_traversal_info_t *traversal_info, apr_pool_t *pool) |
Set *editor and *edit_baton to an editor that generates svn_wc_status_t structures and sends them through status_func / status_baton. | |
svn_error_t * | svn_wc_copy (const char *src, svn_wc_adm_access_t *dst_parent, const char *dst_basename, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool) |
Copy src to dst_basename in dst_parent, and schedule dst_basename for addition to the repository, remembering the copy history. | |
svn_error_t * | svn_wc_delete (const char *path, svn_wc_adm_access_t *adm_access, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool) |
Schedule path for deletion, it will be deleted from the repository on the next commit. | |
svn_error_t * | svn_wc_add (const char *path, svn_wc_adm_access_t *parent_access, const char *copyfrom_url, svn_revnum_t copyfrom_rev, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool) |
Put path under version control by adding an entry in its parent, and, if path is a directory, adding an administrative area. | |
svn_error_t * | svn_wc_add_repos_file (const char *dst_path, svn_wc_adm_access_t *adm_access, const char *new_text_path, apr_hash_t *new_props, const char *copyfrom_url, svn_revnum_t copyfrom_rev, apr_pool_t *pool) |
Add a file to a working copy at dst_path, obtaining the file's contents from new_text_path and its properties from new_props, which normally come from the repository file represented by the copyfrom args, see below. | |
svn_error_t * | svn_wc_remove_from_revision_control (svn_wc_adm_access_t *adm_access, const char *name, svn_boolean_t destroy_wf, svn_boolean_t instant_error, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool) |
Remove entry name in adm_access from revision control. | |
svn_error_t * | svn_wc_resolved_conflict (const char *path, svn_wc_adm_access_t *adm_access, svn_boolean_t resolve_text, svn_boolean_t resolve_props, svn_boolean_t recursive, svn_wc_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool) |
Assuming path is under version control and in a state of conflict, then take path *out* of this state. | |
svn_error_t * | svn_wc_process_committed (const char *path, svn_wc_adm_access_t *adm_access, svn_boolean_t recurse, svn_revnum_t new_revnum, const char *rev_date, const char *rev_author, apr_array_header_t *wcprop_changes, apr_pool_t *pool) |
Bump a successfully committed absolute path to new_revnum after a commit succeeds. | |
svn_error_t * | svn_wc_crawl_revisions (const char *path, svn_wc_adm_access_t *adm_access, const svn_ra_reporter_t *reporter, void *report_baton, svn_boolean_t restore_files, svn_boolean_t recurse, svn_boolean_t use_commit_times, svn_wc_notify_func_t notify_func, void *notify_baton, svn_wc_traversal_info_t *traversal_info, apr_pool_t *pool) |
Do a depth-first crawl in a working copy, beginning at path. | |
svn_error_t * | svn_wc_is_wc_root (svn_boolean_t *wc_root, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set *wc_root to TRUE if path represents a "working copy root", FALSE otherwise. | |
svn_error_t * | svn_wc_get_actual_target (const char *path, const char **anchor, const char **target, apr_pool_t *pool) |
Conditionally split path into an anchor and target for the purpose of updating and committing. | |
svn_error_t * | svn_wc_get_update_editor (svn_revnum_t *target_revision, svn_wc_adm_access_t *anchor, const char *target, svn_boolean_t use_commit_times, svn_boolean_t recurse, svn_wc_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, const char *diff3_cmd, const svn_delta_editor_t **editor, void **edit_baton, svn_wc_traversal_info_t *ti, apr_pool_t *pool) |
Set *editor and *edit_baton to an editor and baton for updating a working copy. | |
svn_error_t * | svn_wc_get_switch_editor (svn_revnum_t *target_revision, svn_wc_adm_access_t *anchor, const char *target, const char *switch_url, svn_boolean_t use_commit_times, svn_boolean_t recurse, svn_wc_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, const char *diff3_cmd, const svn_delta_editor_t **editor, void **edit_baton, svn_wc_traversal_info_t *ti, apr_pool_t *pool) |
A variant of svn_wc_get_update_editor() . | |
svn_error_t * | svn_wc_prop_list (apr_hash_t **props, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set *props to a hash table mapping char * names onto svn_string_t * values for all the regular properties of path. | |
svn_error_t * | svn_wc_prop_get (const svn_string_t **value, const char *name, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set *value to the value of property name for path, allocating *value in pool. | |
svn_error_t * | svn_wc_prop_set (const char *name, const svn_string_t *value, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Set property name to value for path. | |
svn_boolean_t | svn_wc_is_normal_prop (const char *name) |
Return true iff name is a 'normal' property name. | |
svn_boolean_t | svn_wc_is_wc_prop (const char *name) |
Return true iff name is a 'wc' property name. | |
svn_boolean_t | svn_wc_is_entry_prop (const char *name) |
Return true iff name is a 'entry' property name. | |
svn_error_t * | svn_wc_get_diff_editor (svn_wc_adm_access_t *anchor, const char *target, const svn_wc_diff_callbacks_t *callbacks, void *callback_baton, svn_boolean_t recurse, svn_boolean_t use_text_base, svn_boolean_t reverse_order, svn_cancel_func_t cancel_func, void *cancel_baton, const svn_delta_editor_t **editor, void **edit_baton, apr_pool_t *pool) |
Return an editor/edit_baton for diffing a working copy against the repository. | |
svn_error_t * | svn_wc_diff (svn_wc_adm_access_t *anchor, const char *target, const svn_wc_diff_callbacks_t *callbacks, void *callback_baton, svn_boolean_t recurse, apr_pool_t *pool) |
Compare working copy against the text-base. | |
svn_error_t * | svn_wc_get_prop_diffs (apr_array_header_t **propchanges, apr_hash_t **original_props, const char *path, svn_wc_adm_access_t *adm_access, apr_pool_t *pool) |
Given a path to a file or directory under version control, discover any local changes made to properties and/or the set of 'pristine' properties. | |
svn_error_t * | svn_wc_merge (const char *left, const char *right, const char *merge_target, svn_wc_adm_access_t *adm_access, const char *left_label, const char *right_label, const char *target_label, svn_boolean_t dry_run, enum svn_wc_merge_outcome_t *merge_outcome, const char *diff3_cmd, apr_pool_t *pool) |
Given paths to three fulltexts, merge the differences between left and right into merge_target. | |
svn_error_t * | svn_wc_merge_prop_diffs (svn_wc_notify_state_t *state, const char *path, svn_wc_adm_access_t *adm_access, const apr_array_header_t *propchanges, svn_boolean_t base_merge, svn_boolean_t dry_run, apr_pool_t *pool) |
Given a path under version control, merge an array of propchanges into the path's existing properties. | |
svn_error_t * | svn_wc_get_pristine_copy_path (const char *path, const char **pristine_path, apr_pool_t *pool) |
Given a path to a wc file, return a pristine_path which points to a pristine version of the file. | |
svn_error_t * | svn_wc_cleanup (const char *path, svn_wc_adm_access_t *optional_adm_access, const char *diff3_cmd, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool) |
Recurse from path, cleaning up unfinished log business. | |
svn_error_t * | svn_wc_relocate (const char *path, svn_wc_adm_access_t *adm_access, const char *from, const char *to, svn_boolean_t recurse, svn_wc_relocation_validator_t validator, void *validator_baton, apr_pool_t *pool) |
Change repository references at path that begin with from to begin with to instead. | |
svn_error_t * | svn_wc_revert (const char *path, svn_wc_adm_access_t *parent_access, svn_boolean_t recursive, svn_boolean_t use_commit_times, svn_cancel_func_t cancel_func, void *cancel_baton, svn_wc_notify_func_t notify_func, void *notify_baton, apr_pool_t *pool) |
Revert changes to path (perhaps in a recursive fashion). | |
svn_error_t * | svn_wc_create_tmp_file (apr_file_t **fp, const char *path, svn_boolean_t delete_on_close, apr_pool_t *pool) |
Create a unique temporary file in administrative tmp/ area of directory path. | |
svn_error_t * | svn_wc_translated_file (const char **xlated_p, const char *vfile, svn_wc_adm_access_t *adm_access, svn_boolean_t force_repair, apr_pool_t *pool) |
Set *xlated_p to a path to a possibly translated copy of versioned file vfile, or to vfile itself if no translation is necessary. | |
svn_error_t * | svn_wc_transmit_text_deltas (const char *path, svn_wc_adm_access_t *adm_access, svn_boolean_t fulltext, const svn_delta_editor_t *editor, void *file_baton, const char **tempfile, apr_pool_t *pool) |
Send the local modifications for versioned file path (with matching file_baton) through editor, then close file_baton afterwards. | |
svn_error_t * | svn_wc_transmit_prop_deltas (const char *path, svn_wc_adm_access_t *adm_access, const svn_wc_entry_t *entry, const svn_delta_editor_t *editor, void *baton, const char **tempfile, apr_pool_t *pool) |
Given a path with its accompanying entry, transmit all local property modifications using the appropriate editor method (in conjunction with baton). | |
svn_error_t * | svn_wc_get_default_ignores (apr_array_header_t **patterns, apr_hash_t *config, apr_pool_t *pool) |
Get the run-time configured list of ignore patterns from the svn_config_t's in the config hash, and store them in *patterns. |
Requires:
Provides:
Used By:
Definition in file svn_wc.h.
|
Administrative subdir.
Ideally, this would be completely private to wc internals (in fact, it used to be that |
|
Baton for access to a working copy administrative area. One day all such access will require a baton, we're not there yet. Access batons can be grouped into sets, by passing an existing open baton when opening a new baton. Given one baton in a set, other batons may be retrieved. This allows an entire hierarchy to be locked, and then the set of batons can be passed around by passing a single baton. |
|
A callback vtable invoked by our diff-editors, as they receive diffs from the server. 'svn diff' and 'svn merge' both implement their own versions of this table. |
|
One external item. This usually represents one line from an svn:externals description but with the path and URL canonicalized. |
|
Relocation validation callback typedef. Called for each relocated file/directory. uuid contains the expected repository UUID, url contains the tentative URL. |
|
Traversal information is information gathered by a working copy crawl or update. For example, the before and after values of the svn:externals property are important after an update, and since we're traversing the working tree anyway (a complete traversal during the initial crawl, and a traversal of changed paths during the checkout/update/switch), it makes sense to gather the property's values then instead of making a second pass. |
|
|
The schedule states an entry can be in.
|
|
Put path under version control by adding an entry in its parent, and, if path is a directory, adding an administrative area. The new entry and anything under it is scheduled for addition to the repository. parent_access should hold a write lock for the parent directory of path. If path is a directory then an access baton for path will be added to the set containing parent_access.
If path does not exist, return If copyfrom_url is non-null, it and copyfrom_rev are used as `copyfrom' args. This is for copy operations, where one wants to schedule path for addition with a particular history.
If cancel_func is non-null, call it with cancel_baton at various points during the operation. If it returns an error (typically
When the path has been added, then notify_func will be called (if it is not
Return
|
|
Add a file to a working copy at dst_path, obtaining the file's contents from new_text_path and its properties from new_props, which normally come from the repository file represented by the copyfrom args, see below. The new file will be scheduled for addition with history. Automatically remove new_text_path upon successful completion. adm_access, or an access baton in its associated set, must contain a write lock for the parent of dst_path. If copyfrom_url is non-null, then copyfrom_rev must be a valid revision number, and together they are the copyfrom history for the new file. Use pool for temporary allocations. ### This function is very redundant with svn_wc_add(). Ideally, we'd merge them, so that svn_wc_add() would just take optional new_props and optional copyfrom information. That way it could be used for both 'svn add somefilesittingonmydisk' and for adding files from repositories, with or without copyfrom history. The problem with this Ideal Plan is that svn_wc_add() also takes care of recursive URL-rewriting. There's a whole comment in its doc string about how that's really weird, outside its core mission, etc, etc. So another part of the Ideal Plan is that that functionality of svn_wc_add() would move into a separate function. |
|
Give up the access baton adm_access, and its lock if any. This will recursively close any batons in the same set that are direct subdirectories of adm_access. Any physical locks will be removed from the working copy. Lock removal is unconditional, there is no check to determine if cleanup is required. |
|
Return
Compared to |
|
Return, in *adm_access, a pointer to a new access baton for the working copy administrative area associated with the directory path.
If write_lock is true the baton will include a write lock, otherwise the baton can only be used for read access. If path refers to a directory that is already write locked then the error
If associated is an open access baton then adm_access will be added to the set containing associated. associated can be
If tree_lock is pool will be used to allocate memory for the baton and any subsequently cached items. If adm_access has not been closed when the pool is cleared, it will be closed automatically at that point, and removed from its set. A baton closed in this way will not remove physical locks from the working copy if cleanup is required.
The first baton in a set, with associated passed as |
|
Checks the working copy to determine the node type of path.
If path is a versioned directory then the behaviour is like that of |
|
Checks the working copy to determine the node type of path.
If path is a versioned directory then the behaviour is like that of |
|
Try various ways to obtain an access baton for path.
First, try to obtain *adm_access via
If Use pool only for local processing, not to allocate *adm_access. |
|
Return, in *adm_access, a pointer to an existing access baton associated with path. path must be a directory that is locked as part of the set containing the associated access baton. If the requested access baton is marked as missing in, or is simply absent from, associated, return SVN_ERR_WC_NOT_LOCKED. pool is used only for local processing, it is not used for the batons. |
|
Set *wc_format to path's working copy format version number if path is a valid working copy directory, else set it to 0.
Return error |
|
Recurse from path, cleaning up unfinished log business. Perform necessary allocations in pool. Any working copy locks under path will be taken over and then cleared by this function. If diff3_cmd is non-null, then use it as the diff3 command for any merging; otherwise, use the built-in merge code. WARNING: there is no mechanism that will protect locks that are still being used.
If cancel_func is non-null, invoke it with cancel_baton at various points during the operation. If it returns an error (typically |
|
Given a dir_path under version control, decide if one of its entries (entry) is in state of conflict; return the answers in text_conflicted_p and prop_conflicted_p. (If the entry mentions that a .rej or .prej exist, but they are both removed, assume the conflict has been resolved by the user.) |
|
Copy src to dst_basename in dst_parent, and schedule dst_basename for addition to the repository, remembering the copy history. src must be a file or directory under version control; dst_parent must be a directory under version control in the same working copy; dst_basename will be the name of the copied item, and it must not exist already.
If cancel_func is non-null, call it with cancel_baton at various points during the operation. If it returns an error (typically
For each file or directory copied, notify_func will be called with its path and the notify_baton. notify_func may be
Important: this is a variant of |
|
Do a depth-first crawl in a working copy, beginning at path. Communicate the `state' of the working copy's revisions to reporter/report_baton. Obviously, if path is a file instead of a directory, this depth-first crawl will be a short one. No locks are or logs are created, nor are any animals harmed in the process. No cleanup is necessary. adm_access must be an access baton for the path hierarchy, it does not require a write lock. After all revisions are reported, reporter->finish_report() is called, which immediately causes the RA layer to update the working copy. Thus the return value may very well reflect the result of the update!
If restore_files is true, then unexpectedly missing working files will be restored from the administrative directory's cache. For each file restored, the notify_func function will be called with the notify_baton and the path of the restored file. notify_func may be
If traversal_info is non-null, then record pre-update traversal state in it. (Caller should obtain traversal_info from |
|
Create a unique temporary file in administrative tmp/ area of directory path. Return a handle in *fp.
The flags will be This means that as soon as fp is closed, the tmp file will vanish. |
|
Schedule path for deletion, it will be deleted from the repository on the next commit. If path refers to a directory, then a recursive deletion will occur. adm_access must hold a write lock for the parent of path. This function immediately deletes all files, modified and unmodified, versioned and unversioned from the working copy. It also immediately deletes unversioned directories and directories that are scheduled to be added. Only versioned directories will remain in the working copy, these get deleted by the update following the commit.
If cancel_func is non-null, call it with cancel_baton at various points during the operation. If it returns an error (typically
For each path marked for deletion, notify_func will be called with the notify_baton and that path. The notify_func callback may be |
|
Compare working copy against the text-base. anchor/target represent the base of the hierarchy to be compared. callbacks/callback_baton is the callback table to use when two files are to be compared.
recurse determines whether to descend into subdirectories when target is a directory. If recurse is |
|
Set *externals_old and *externals_new to hash tables representing changes to values of the svn:externals property on directories traversed by traversal_info.
traversal_info is obtained from
Each hash maps The hashes, keys, and values have the same lifetime as traversal_info. |
|
Ensure that an administrative area exists for path, so that path is a working copy subdir based on url at revision, and with repository UUID uuid. If the administrative area does not exist then it will be created and initialized to an unlocked state. If the administrative area already exists then the given url must match the URL in the administrative area or an error will be returned. The given revision must also match except for the special case of adding a directory that has a name matching one scheduled for deletion, in which case revision must be zero.
uuid may be Do not ensure existence of path itself; if path does not exist, return error. |
|
Parse the `entries' file for adm_access and return a hash entries, whose keys are ( Allocate entries, and its keys and values, in pool. Entries that are in a 'deleted' or 'absent' state (and not scheduled for re-addition) are not returned in the hash, unless show_hidden is true.
Important note: the entries hash is the entries cache in adm_access and so usually the hash itself, the keys and the values should be treated as read-only. If any of these are modified then it is the caller's responsibility to ensure that the entries file on disk is updated. Treat the hash values as type (
Important note: only the entry structures representing files and |
|
Set *entry to an entry for path, allocated in the access baton pool.
If show_hidden is true, return the entry even if it's in 'deleted' or 'absent' state. If path is not under revision control, or if entry is hidden, not scheduled for re-addition, and show_hidden is *entry should not be modified, since doing so modifies the entries cache in adm_access without changing the entries file on disk. If path is not a directory then adm_access must be an access baton for the parent directory of path. To avoid needing to know whether path is a directory or not, if path is a directory adm_access can still be an access baton for the parent of path so long as the access baton for path itself is in the same access baton set. Note that it is possible for path to be absent from disk but still under revision control; and conversely, it is possible for path to be present, but not under revision control. Use pool only for local processing. |
|
Return a duplicate of entry, allocated in pool. No part of the new entry will be shared with entry. |
|
Conditionally split path into an anchor and target for the purpose of updating and committing. anchor is the directory at which the update or commit editor should be rooted. target is the actual subject (relative to the anchor) of the update/commit, or "" if the anchor itself is the subject. Allocate anchor and target in pool. |
|
Set *url and *rev to the ancestor URL and revision for path, allocating in pool. adm_access must be an access baton for path. If url or rev is null, then ignore it (just don't return the corresponding information). |
|
Get the run-time configured list of ignore patterns from the Allocate *patterns and its contents in pool. |
|
Return an editor/edit_baton for diffing a working copy against the repository. anchor/target represent the base of the hierarchy to be compared. callbacks/callback_baton is the callback table to use when two files are to be compared.
recurse determines whether to descend into subdirectories when target is a directory. If recurse is If use_text_base is true, then compare the repository against the working copy's text-base files, rather than the working files. Normally, the difference from repository->working_copy is shown. If @ reverse_order is true, then show working_copy->repository diffs. If cancel_func is non-null, it will be used along with cancel_baton to periodically check if the client has canceled the operation. |
|
Given a path to a wc file, return a pristine_path which points to a pristine version of the file.
This is needed so clients can do diffs. If the WC has no text-base, return a |
|
Given a path to a file or directory under version control, discover any local changes made to properties and/or the set of 'pristine' properties. adm_access is an access baton set for path.
If propchanges is non-
If original_props is non- |
|
A variant of
Set *editor and *edit_baton to an editor and baton for "switching" a working copy to a new switch_url. (Right now, this URL must be within the same repository that the working copy already comes from.) switch_url must not be
If ti is non-null, record traversal info in ti, for use by post-traversal accessors such as
anchor is an access baton, with a write lock, for the local path to the working copy which will be used as the root of our editor. Further locks will be acquired if the switch creates new directories. All locks, both those in anchor and newly acquired ones, will be released when the editor driver calls target is the entry in anchor that will actually be updated, or empty if all of anchor should be updated. The editor invokes notify_func with notify_baton as the switch progresses, if notify_func is non-null. If cancel_func is non-null, it will be called with cancel_baton as the switch progresses to determine if it should continue. If diff3_cmd is non-null, then use it as the diff3 command for any merging; otherwise, use the built-in merge code. target_revision is a pointer to a revision location which, after successful completion of the drive of this editor, will be populated with the revision to which the working copy was updated. If use_commit_times is TRUE, then all edited/added files will have their working timestamp set to the last-committed-time. If FALSE, the working files will be touched with the 'now' time. |
|
Set *editor and *edit_baton to an editor and baton for updating a working copy.
If ti is non-null, record traversal info in ti, for use by post-traversal accessors such as
anchor is an access baton, with a write lock, for the local path to the working copy which will be used as the root of our editor. Further locks will be acquired if the update creates new directories. All locks, both those in anchor and newly acquired ones, will be released when the editor driver calls target is the entry in anchor that will actually be updated, or empty if all of anchor should be updated. The editor invokes notify_func with notify_baton as the update progresses, if notify_func is non-null. If cancel_func is non-null, the editor will invoke cancel_func with cancel_baton as the update progresses to see if it should continue. If diff3_cmd is non-null, then use it as the diff3 command for any merging; otherwise, use the built-in merge code. target_revision is a pointer to a revision location which, after successful completion of the drive of this editor, will be populated with the revision to which the working copy was updated. If use_commit_times is TRUE, then all edited/added files will have their working timestamp set to the last-committed-time. If FALSE, the working files will be touched with the 'now' time. |
|
Set *has_binary_prop to adm_access is an access baton set that contains . |
|
Return true iff name is a 'normal' property name. 'Normal' is defined as a user-visible and user-tweakable property that shows up when you fetch a proplist. The function currently parses the namespace like so:
If these patterns aren't found, then the property is assumed to be Normal. |
|
Set *wc_root to Use pool for any intermediate allocations.
If path is not found, return the error
NOTE: Due to the way in which "WC-root-ness" is calculated, passing a path of `.' to this function will always return |
|
Mark missing path as 'deleted' in its parent's list of entries.
Return |
|
Given paths to three fulltexts, merge the differences between left and right into merge_target. (It may help to know that left, right, and merge_target correspond to "OLDER", "YOURS", and "MINE", respectively, in the diff3 documentation.) Use pool for any temporary allocation. adm_access is an access baton with a write lock for the directory containing merge_target. This function assumes that left and right are in repository-normal form (linefeeds, with keywords contracted); if necessary, merge_target is temporarily converted to this form to receive the changes, then translated back again. If merge_target is absent, or present but not under version control, then set *merge_outcome to svn_wc_merge_no_merge and return success without merging anything. (The reasoning is that if the file is not versioned, then it is probably unrelated to the changes being considered, so they should not be merged into it.)
dry_run determines whether the working copy is modified. When it is If diff3_cmd is non-null, then use it as the diff3 command for any merging; otherwise, use the built-in merge code.
The outcome of the merge is returned in *merge_outcome. If there is a conflict and dry_run is
* Put conflict markers around the conflicting regions in merge_target, labeled with left_label, right_label, and target_label. (If any of these labels are * Copy left, right, and the original merge_target to unique names in the same directory as merge_target, ending with the suffixes ".LEFT_LABEL", ".RIGHT_LABEL", and ".TARGET_LABEL" respectively. * Mark the entry for merge_target as "conflicted", and track the above mentioned backup files in the entry as well. Binary case:
If merge_target is a binary file, then no merging is attempted, the merge is deemed to be a conflict. If dry_run is |
|
Given a path under version control, merge an array of propchanges into the path's existing properties.
propchanges is an array of
If base_merge is If state is non-null, set *state to the state of the properties after the merge.
If conflicts are found when merging working properties, they are described in a temporary .prej file (or appended to an already-existing .prej file), and the entry is marked "conflicted". Base properties are changed unconditionally, if base_merge is |
|
If externals_p is non-null, set *externals_p to a hash table whose keys are subdirectory names and values are svn_wc_external_item_t * objects, based on desc.
If the format of desc is invalid, don't touch *externals_p and return
The format of desc is the same as for values of the directory property Allocate the table, keys, and values in pool. Use parent_directory only in constructing error strings. |
|
Bump a successfully committed absolute path to new_revnum after a commit succeeds.
rev_date and rev_author are the (server-side) date and author of the new revision; one or both may be
If non-null, wcprops is an array of If recurse is true and path is a directory, then bump every versioned object at or under path. This is usually done for copied trees. |
|
Set *value to the value of property name for path, allocating *value in pool.
If no such prop, set *value to |
|
Set *props to a hash table mapping Allocate the table, names, and values in pool. If the node has no properties, an empty hash is returned. adm_access is an access baton set that contains path. |
|
Set property name to value for path.
Do any temporary allocation in pool. If name is not a valid property for path, return
name may be a wc property or a regular property; but if it is an entry property, return the error |
|
Set *modified_p to non-zero if path's properties are modified with regard to the base revision, else set modified_p to zero. adm_access must be an access baton for path. |
|
Change repository references at path that begin with from to begin with to instead. Perform necessary allocations in pool. If recurse is true, do so. validator (and its baton, validator_baton), will be called for each newly generated URL. adm_access is an access baton for the directory containing path, and must not be NULL. |
|
Remove entry name in adm_access from revision control.
name must be either a file or
If name is a file, all its info will be removed from adm_access's administrative directory. If name is
Normally, only administrative data is removed. However, if destroy_wf is true, then all working file(s) and dirs are deleted from disk as well. When called with destroy_wf, any locally modified files will *not* be deleted, and the special error
If instant_error is TRUE, then return
If cancel_func is non-null, call it with cancel_baton at various points during the removal. If it returns an error (typically WARNING: This routine is exported for careful, measured use by libsvn_client. Do *not* call this routine unless you really understand what the heck you're doing. |
|
Assuming path is under version control and in a state of conflict, then take path *out* of this state. If resolve_text is true then any text conflict is resolved, if resolve_props is true then any property conflicts are resolved. If recursive is true, then search recursively for conflicts to resolve. adm_access is an access baton, with a write lock, for path. Needless to say, this function doesn't touch conflict markers or anything of that sort -- only a human can semantically resolve a conflict. Instead, this function simply marks a file as "having been resolved", clearing the way for a commit. The implementation details are opaque, as our "conflicted" criteria might change over time. (At the moment, this routine removes the three fulltext 'backup' files and any .prej file created in a conflict, and modifies path's entry.)
If path is not under version control, return
If |
|
Revert changes to path (perhaps in a recursive fashion). Perform necessary allocations in pool. parent_access is an access baton for the directory containing path, unless path is a wc root, in which case parent_access refers to path itself.
If is non-null, call it with cancel_baton at various points during the reversion process. If it returns an error (typically If use_commit_times is TRUE, then all reverted working-files will have their timestamp set to the last-committed-time. If FALSE, the reverted working-files will be touched with the 'now' time.
For each item reverted, notify_func will be called with notify_baton and the path of the reverted item. notify_func may be |
|
Set *modified_p to non-zero if filename's text is modified with regard to the base revision, else set *modified_p to zero. filename is a path to the file, not just a basename. adm_access must be an access baton for filename.
If force_comparison is
If filename does not exist, consider it unmodified. If it exists but is not under revision control (not even scheduled for addition), return the error |
|
Set *xlated_p to a path to a possibly translated copy of versioned file vfile, or to vfile itself if no translation is necessary. That is, if vfile's properties indicate newline conversion or keyword expansion, point *xlated_p to a copy of vfile whose newlines are unconverted and keywords contracted, in whatever manner is indicated by vfile's properties; otherwise, set *xlated_p to vfile. If force_repair is set, the translated file will have any inconsistent line endings repaired. This should only be used when the resultant file is being created for comparison against vfile's text base. Caller is responsible for detecting if they are different (pointer comparison is sufficient), and for removing *xlated_p if necessary. This function is generally used to get a file that can be compared meaningfully against vfile's text base.
If *xlated_p is different from vfile, then choose *xlated_p's name using If an error is returned, the effect on *xlated_p is undefined. |
|
Given a path with its accompanying entry, transmit all local property modifications using the appropriate editor method (in conjunction with baton). adm_access is an access baton set that contains path. Use pool for all allocations. If a temporary file remains after this function is finished, the path to that file is returned in *tempfile (so the caller can clean this up if it wishes to do so). |
|
Send the local modifications for versioned file path (with matching file_baton) through editor, then close file_baton afterwards. Use pool for any temporary allocation and adm_access as an access baton for path. This process creates a copy of path with keywords and eol untranslated. If tempfile is non-null, set *tempfile to the path to this copy. Do not clean up the copy; caller can do that. (The purpose of handing back the tmp copy is that it is usually about to become the new text base anyway, but the installation of the new text base is outside the scope of this function.) If fulltext, send the untranslated copy of path through editor as full-text; else send it as svndiff against the current text base.
If sending a diff, and the recorded checksum for path's text-base does not match the current actual checksum, then remove the tmp copy (and set *tempfile to null if appropriate), and return the error Note: this is intended for use with both infix and postfix text-delta styled editor drivers. |
|
A generic entry-walker. Do a recursive depth-first entry-walk beginning on path, which can be a file or dir. Call callbacks in walk_callbacks, passing walk_baton to each. Use pool for looping, recursion, and to allocate all entries returned. adm_access must be an access baton for path. Like our other entries interfaces, entries that are in a 'deleted' or 'absent' state (and not scheduled for re-addition) are not discovered, unless show_hidden is true.
When a new directory is entered,
Note: callers should be aware that each directory will be returned *twice*: first as an entry within its parent, and subsequently as the '.' entry within itself. The two calls can be distinguished by looking for |