⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 svn_wc.h

📁 subversion-1.4.3-1.tar.gz 配置svn的源码
💻 H
📖 第 1 页 / 共 5 页
字号:
/** * Structure used in the @c svn_wc_notify_func2_t function. * * @c path is either absolute or relative to the current working directory * (i.e., not relative to an anchor).  @c action describes what happened * to @c path. * * @c kind, @c content_state, @c prop_state and @c lock_state are from * after @c action, not before.  @c lock_state reflects the addition * or removal of a lock token in the working copy. * * If @c mime_type is non-null, it indicates the mime-type of @c path. * It is always @c NULL for directories. * * If @c action is @c svn_wc_notify_update_completed, @c revision is the * target revision of the update, or @c SVN_INVALID_REVNUM if not * available.  If @c action is @c svn_wc_notify_blame_revision, @c * revision is the processed revision.  In all other cases, @c * revision is @c SVN_INVALID_REVNUM. * * For an @c action of svn_wc_notify_locked, @c lock is the lock * structure received from the repository.  For other actions, it is * @c NULL. * * @c err is @c NULL, except when @c action is @c * svn_wc_notify_failed_lock or @c svn_wc_notify_failed_unlock, in * which case it points to an error describing the reason for the failure. * * Note that if @c action is @c svn_wc_notify_update, then @c path has  * already been installed, so it is legitimate for an implementation of * @c svn_wc_notify_func2_t to examine @c path in the working copy. * * @note The purpose of the @c kind, @c mime_type, @c content_state, and * @c 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). * * @note Callers of notification functions should use svn_wc_create_notify() * to create structures of this type to allow for extensibility. * * @since New in 1.2. */typedef struct svn_wc_notify_t {  const char *path;  svn_wc_notify_action_t action;  svn_node_kind_t kind;  const char *mime_type;  const svn_lock_t *lock;  svn_error_t *err;  svn_wc_notify_state_t content_state;  svn_wc_notify_state_t prop_state;  svn_wc_notify_lock_state_t lock_state;  svn_revnum_t revision;  /* NOTE: Add new fields at the end to preserve binary compatibility.     Also, if you add fields here, you have to update svn_wc_create_notify     and svn_wc_dup_notify. */} svn_wc_notify_t;/** * Allocate an @c svn_wc_notify_t structure in @a pool, initialize and return * it. * * Set the @c path field of the created struct to @a path, and @c action to * @a action.  Set all other fields to their @c _unknown, @c NULL or * invalid value, respectively. * * @since New in 1.2. */svn_wc_notify_t *svn_wc_create_notify(const char *path, svn_wc_notify_action_t action,                     apr_pool_t *pool);/** * Return a deep copy of @a notify, allocated in @a pool. * * @since New in 1.2. */svn_wc_notify_t *svn_wc_dup_notify(const svn_wc_notify_t *notify, apr_pool_t *pool);/** * Notify the world that @a notify->action has happened to @a notify->path. * * Recommendation: callers of @c 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 @c svn_delta_editor_t's close_file(), for example), passing  * the appropriate @a notify->content_state and @a notify->prop_state flags. * * @since New in 1.2. */typedef void (*svn_wc_notify_func2_t)(void *baton,                                      const svn_wc_notify_t *notify,                                      apr_pool_t *pool);/** * Similar to @c svn_wc_notify_func2_t, but takes the information as arguments * instead of struct fields. * * @deprecated Provided for backward compatibility with the 1.1 API. */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);/** @} *//** * 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. * * @since New in 1.2. */typedef struct svn_wc_diff_callbacks2_t{  /** A file @a path has changed.  If @a tmpfile2 is non-null, the   * contents have changed and those changes can be seen by comparing   * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of    * the file, respectively.   *   * If known, the @c svn:mime-type value of each file is passed into   * @a mimetype1 and @a mimetype2;  either or both of the values can   * be NULL.  The implementor can use this information to decide if   * (or how) to generate differences.   *   * @a propchanges is an array of (@c svn_prop_t) structures. If it has   * any elements, the original list of properties is provided in   * @a originalprops, which is a hash of @c svn_string_t values, keyed on the   * property name.   *    * @a adm_access will be an access baton for the directory containing    * @a path, or @c NULL if the diff editor is not using access batons.   *   * If @a contentstate is non-null, set @a *contentstate to the state of   * the file contents after the operation has been performed.  The same   * applies for @a propstate regarding the property changes.  (In   * practice, this is only useful with merge, not diff; diff callbacks   * will probably set @a *contentstate and @a *propstate to   * @c svn_wc_notify_state_unknown, since they do not change the state and   * therefore do not bother to know the state after the operation.)   */  svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,                               svn_wc_notify_state_t *contentstate,                               svn_wc_notify_state_t *propstate,                               const char *path,                               const char *tmpfile1,                               const char *tmpfile2,                               svn_revnum_t rev1,                               svn_revnum_t rev2,                               const char *mimetype1,                               const char *mimetype2,                               const apr_array_header_t *propchanges,                               apr_hash_t *originalprops,                               void *diff_baton);  /** A file @a path was added.  The contents can be seen by comparing   * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2   * of the file, respectively.  (If either file is empty, the rev   * will be 0.)   *   * If known, the @c svn:mime-type value of each file is passed into   * @a mimetype1 and @a mimetype2;  either or both of the values can   * be NULL.  The implementor can use this information to decide if   * (or how) to generate differences.   *   * @a propchanges is an array of (@c svn_prop_t) structures.  If it contains   * any elements, the original list of properties is provided in   * @a originalprops, which is a hash of @c svn_string_t values, keyed on the   * property name.   *    * @a adm_access will be an access baton for the directory containing    * @a path, or @c NULL if the diff editor is not using access batons.   *   * If @a contentstate is non-null, set @a *contentstate to the state of the   * file contents after the operation has been performed.  The same   * applies for @a propstate regarding the property changes.  (In practice,   * this is only useful with merge, not diff; diff callbacks will   * probably set @a *contentstate and *propstate to   * @c svn_wc_notify_state_unknown, since they do not change the state   * and therefore do not bother to know the state after the operation.)   *   */  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,                             svn_wc_notify_state_t *contentstate,                             svn_wc_notify_state_t *propstate,                             const char *path,                             const char *tmpfile1,                             const char *tmpfile2,                             svn_revnum_t rev1,                             svn_revnum_t rev2,                             const char *mimetype1,                             const char *mimetype2,                             const apr_array_header_t *propchanges,                             apr_hash_t *originalprops,                             void *diff_baton);    /** A file @a path was deleted.  The [loss of] contents can be seen by   * comparing @a tmpfile1 and @a tmpfile2.  @a originalprops provides   * the properties of the file.   *   * If known, the @c svn:mime-type value of each file is passed into   * @a mimetype1 and @a mimetype2;  either or both of the values can   * be NULL.  The implementor can use this information to decide if   * (or how) to generate differences.   *   * @a adm_access will be an access baton for the directory containing    * @a path, or @c NULL if the diff editor is not using access batons.   *   * If @a state is non-null, set @a *state to the state of the item   * after the delete operation has been performed.  (In practice,   * this is only useful with merge, not diff; diff callbacks will   * probably set @a *state to @c svn_wc_notify_state_unknown, since    * they do not change the state and therefore do not bother to know    * the state after the operation.)   */  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,                               svn_wc_notify_state_t *state,                               const char *path,                               const char *tmpfile1,                               const char *tmpfile2,                               const char *mimetype1,                               const char *mimetype2,                               apr_hash_t *originalprops,                               void *diff_baton);    /** A directory @a path was added.  @a rev is the revision that the   * directory came from.   *   * @a adm_access will be an access baton for the directory containing    * @a path, or @c NULL if the diff editor is not using access batons.   */  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,                            svn_wc_notify_state_t *state,                            const char *path,                            svn_revnum_t rev,                            void *diff_baton);    /** A directory @a path was deleted.   *   * @a adm_access will be an access baton for the directory containing    * @a path, or @c NULL if the diff editor is not using access batons.   *   * If @a state is non-null, set @a *state to the state of the item   * after the delete operation has been performed.  (In practice,   * this is only useful with merge, not diff; diff callbacks will   * probably set @a *state to @c svn_wc_notify_state_unknown, since    * they do not change the state and therefore do not bother to know    * the state after the operation.)   */  svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,                              svn_wc_notify_state_t *state,                              const char *path,                              void *diff_baton);    /** A list of property changes (@a propchanges) was applied to the   * directory @a path.   *   * The array is a list of (@c svn_prop_t) structures.    *   * The original list of properties is provided in @a original_props,   * which is a hash of @c svn_string_t values, keyed on the property   * name.   *   * @a adm_access will be an access baton for the directory containing    * @a path, or @c NULL if the diff editor is not using access batons.   *   * If @a state is non-null, set @a *state to the state of the properties   * after the operation has been performed.  (In practice, this is only    * useful with merge, not diff; diff callbacks will probably set @a *state    * to @c svn_wc_notify_state_unknown, since they do not change the state    * and therefore do not bother to know the state after the operation.)   */  svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access,                                    svn_wc_notify_state_t *state,                                    const char *path,                                    const apr_array_header_t *propchanges,                                    apr_hash_t *original_props,                                    void *diff_baton);} svn_wc_diff_callbacks2_t;/** * Similar to @c svn_wc_diff_callbacks2_t, but with file additions/content * changes and property changes split into different functions. * * @deprecated Provided for backward compatibility with the 1.1 API. */typedef struct svn_wc_diff_callbacks_t{  /** Similar to @c file_changed in @c svn_wc_diff_callbacks2_t, but without   * property change information.  @a tmpfile2 is never NULL. @a state applies   * to the file contents. */  svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,                               svn_wc_notify_state_t *state,                               const char *path,                               const char *tmpfile1,                               const char *tmpfile2,                               svn_revnum_t rev1,                               svn_revnum_t rev2,                               const char *mimetype1,                               const char *mimetype2,                               void *diff_baton);  /** Similar to @c file_added in @c svn_wc_diff_callbacks2_t, but without   * property change information.  @a *state applies to the file contents. */  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,                             svn_wc_notify_state_t *state,                             const char *path,                             const char *tmpfile1,                             const char *tmpfile2,                             svn_revnum_t rev1,                             svn_revnum_t rev2,                             const char *mimetype1,                             const char *mimetype2,                             void *diff_baton);    /** Similar to @c file_deleted in @c svn_wc_diff_callbacks2_t, but without   * the properties. */  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,                               svn_wc_notify_state_t *state,                               const char *path,                               const char *tmpfile1,                               const char *tmpfile2,                               const char *mimetype1,                               const char *mimetype2,                               void *diff_baton);    /** The same as @c dir_added in @c svn_wc_diff_callbacks2_t. */  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,                            svn_wc_notify_state_t *state,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -