Subversion 1.6.16
|
In many cases, the WC library will scan a working copy and make changes. More...
In many cases, the WC library will scan a working copy and make changes.
The caller usually wants to know when each of these changes has been made, so that it can display some kind of notification to the user.
These notifications have a standard callback function type, which takes the path of the file that was affected, and a caller- supplied baton.
Note that the callback is a 'void' return -- this is a simple reporting mechanism, rather than an opportunity for the caller to alter the operation of the WC library.
Note also that some of the actions are used across several different Subversion commands. For example, the update actions are also used for checkouts, switches, and merges.
typedef enum svn_wc_notify_action_t svn_wc_notify_action_t |
The type of action occurring.
typedef void(* svn_wc_notify_func2_t)(void *baton, const svn_wc_notify_t *notify, apr_pool_t *pool) |
Notify the world that notify->action has happened to notify->path.
Recommendation: callers of svn_wc_notify_func2_t
should avoid invoking it multiple times on the same path within a given operation, and implementations should not bother checking for such duplicate calls. For example, in an update, the caller should not invoke the notify func on receiving a prop change and then again on receiving a text change. Instead, wait until all changes have been received, and then invoke the notify func once (from within an svn_delta_editor_t's
close_file(), for example), passing the appropriate notify->content_state and notify->prop_state flags.
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) |
Similar to svn_wc_notify_func2_t
, but takes the information as arguments instead of struct fields.
typedef enum svn_wc_notify_lock_state_t svn_wc_notify_lock_state_t |
What happened to a lock during an operation.
typedef enum svn_wc_notify_state_t svn_wc_notify_state_t |
The type of notification that is occurring.
typedef struct svn_wc_notify_t svn_wc_notify_t |
Structure used in the svn_wc_notify_func2_t
function.
kind
, content_state
, prop_state
and lock_state
are from after action
, not before.
action
is svn_wc_notify_update
, then path
has already been installed, so it is legitimate for an implementation of svn_wc_notify_func2_t
to examine path
in the working copy.kind
, mime_type
, content_state
, and prop_state
fields is to provide "for free" information that an implementation is likely to want, and which it would otherwise be forced to deduce via expensive operations such as reading entries and properties. However, if the caller does not have this information, it will simply pass the corresponding `*_unknown' values, and it is up to the implementation how to handle that (i.e., whether to attempt deduction, or just to punt and give a less informative notification).The type of action occurring.
svn_wc_notify_add |
Adding a path to revision control. |
svn_wc_notify_copy |
Copying a versioned path. |
svn_wc_notify_delete |
Deleting a versioned path. |
svn_wc_notify_restore |
Restoring a missing path from the pristine text-base. |
svn_wc_notify_revert |
Reverting a modified path. |
svn_wc_notify_failed_revert |
A revert operation has failed. |
svn_wc_notify_resolved |
Resolving a conflict. |
svn_wc_notify_skip |
Skipping a path. |
svn_wc_notify_update_delete |
Got a delete in an update. |
svn_wc_notify_update_add |
Got an add in an update. |
svn_wc_notify_update_update |
Got any other action in an update. |
svn_wc_notify_update_completed |
The last notification in an update (including updates of externals). |
svn_wc_notify_update_external |
Updating an external module. |
svn_wc_notify_status_completed |
The last notification in a status (including status on externals). |
svn_wc_notify_status_external |
Running status on an external module. |
svn_wc_notify_commit_modified |
Committing a modification. |
svn_wc_notify_commit_added |
Committing an addition. |
svn_wc_notify_commit_deleted |
Committing a deletion. |
svn_wc_notify_commit_replaced |
Committing a replacement. |
svn_wc_notify_commit_postfix_txdelta |
Transmitting post-fix text-delta data for a file. |
svn_wc_notify_blame_revision |
Processed a single revision's blame. |
svn_wc_notify_locked |
Locking a path.
|
svn_wc_notify_unlocked |
Unlocking a path.
|
svn_wc_notify_failed_lock |
Failed to lock a path.
|
svn_wc_notify_failed_unlock |
Failed to unlock a path.
|
svn_wc_notify_exists |
Tried adding a path that already exists.
|
svn_wc_notify_changelist_set |
Changelist name set.
|
svn_wc_notify_changelist_clear |
Changelist name cleared.
|
svn_wc_notify_changelist_moved |
Warn user that a path has moved from one changelist to another.
|
svn_wc_notify_merge_begin |
A merge operation (to path) has begun. See
|
svn_wc_notify_foreign_merge_begin |
A merge operation (to path) from a foreign repository has begun. See
|
svn_wc_notify_update_replace |
Replace notification.
|
svn_wc_notify_property_added |
Property added.
|
svn_wc_notify_property_modified |
Property updated.
|
svn_wc_notify_property_deleted |
Property deleted.
|
svn_wc_notify_property_deleted_nonexistent |
Nonexistent property deleted.
|
svn_wc_notify_revprop_set |
Revprop set.
|
svn_wc_notify_revprop_deleted |
Revprop deleted.
|
svn_wc_notify_merge_completed |
The last notification in a merge.
|
svn_wc_notify_tree_conflict |
The path is a tree-conflict victim of the intended action (*not* a persistent tree-conflict from an earlier operation, but *this* operation caused the tree-conflict).
|
svn_wc_notify_failed_external |
The path is a subdirectory referenced in an externals definition which is unable to be operated on.
|
The type of notification that is occurring.
svn_wc_notify_t* svn_wc_create_notify | ( | const char * | path, |
svn_wc_notify_action_t | action, | ||
apr_pool_t * | pool | ||
) |
Allocate an svn_wc_notify_t
structure in pool, initialize and return it.
Set the path
field of the created struct to path, and action
to action. Set all other fields to their _unknown
, NULL
or invalid value, respectively. Make only a shallow copy of the pointer path.
svn_wc_notify_t* svn_wc_create_notify_url | ( | const char * | url, |
svn_wc_notify_action_t | action, | ||
apr_pool_t * | pool | ||
) |
Allocate an svn_wc_notify_t
structure in pool, initialize and return it.
Set the url
field of the created struct to url, action
to, path
to "." and action. Set all other fields to their _unknown
, NULL
or invalid value, respectively. Make only a shallow copy of the pointer url.
svn_wc_notify_t* svn_wc_dup_notify | ( | const svn_wc_notify_t * | notify, |
apr_pool_t * | pool | ||
) |
Return a deep copy of notify, allocated in pool.