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

📄 svn_fs.h

📁 subversion-1.4.3-1.tar.gz 配置svn的源码
💻 H
📖 第 1 页 / 共 5 页
字号:
/** @deprecated Provided for backward compatibility with the 1.0 API. */svn_error_t *svn_fs_delete_berkeley(const char *path, apr_pool_t *pool);/** @deprecated Provided for backward compatibility with the 1.0 API. */svn_error_t *svn_fs_hotcopy_berkeley(const char *src_path,                                      const char *dest_path,                                      svn_boolean_t clean_logs,                                     apr_pool_t *pool);/** @} *//** @} *//** Filesystem Access Contexts. * * @since New in 1.2. * * At certain times, filesystem functions need access to temporary * user data.  For example, which user is changing a file?  If the * file is locked, has an appropriate lock-token been supplied? * * This temporary user data is stored in an "access context" object, * and the access context is then connected to the filesystem object. * Whenever a filesystem function requires information, it can pull * things out of the context as needed. * * @defgroup svn_fs_access_ctx filesystem access contexts * @{ *//** An opaque object representing temporary user data. */typedef struct svn_fs_access_t svn_fs_access_t;/** Set @a *access_ctx to a new @c svn_fs_access_t object representing *  @a username, allocated in @a pool.  @a username is presumed to *  have been authenticated by the caller. */svn_error_t *svn_fs_create_access(svn_fs_access_t **access_ctx,                                  const char *username,                                  apr_pool_t *pool);/** Associate @a access_ctx with an open @a fs. * * This function can be run multiple times on the same open * filesystem, in order to change the filesystem access context for * different filesystem operations.  Pass a NULL value for @a * access_ctx to disassociate the current access context from the * filesystem. */svn_error_t *svn_fs_set_access(svn_fs_t *fs,                               svn_fs_access_t *access_ctx);/** Set @a *access_ctx to the current @a fs access context, or NULL if * there is no current fs access context. */svn_error_t *svn_fs_get_access(svn_fs_access_t **access_ctx,                               svn_fs_t *fs);/** Accessors for the access context: *//** Set @a *username to the name represented by @a access_ctx. */svn_error_t *svn_fs_access_get_username(const char **username,                                        svn_fs_access_t *access_ctx);/** Push a lock-token @a token into the context @a access_ctx.  The * context remembers all tokens it receives, and makes them available * to fs functions.  The token is not duplicated into @a access_ctx's * pool;  make sure the token's lifetime is at least as long as @a * access_ctx. */svn_error_t *svn_fs_access_add_lock_token(svn_fs_access_t *access_ctx,                                          const char *token);/** @} *//** Filesystem Nodes. * * In a Subversion filesystem, a `node' corresponds roughly to an * `inode' in a Unix filesystem: * - A node is either a file or a directory. * - A node's contents change over time. * - When you change a node's contents, it's still the same node; it's *   just been changed.  So a node's identity isn't bound to a specific *   set of contents. * - If you rename a node, it's still the same node, just under a *   different name.  So a node's identity isn't bound to a particular *   filename. * * A `node revision' refers to a node's contents at a specific point in * time.  Changing a node's contents always creates a new revision of that * node.  Once created, a node revision's contents never change. * * When we create a node, its initial contents are the initial revision of * the node.  As users make changes to the node over time, we create new * revisions of that same node.  When a user commits a change that deletes * a file from the filesystem, we don't delete the node, or any revision * of it --- those stick around to allow us to recreate prior revisions of * the filesystem.  Instead, we just remove the reference to the node * from the directory. * * @defgroup svn_fs_nodes filesystem nodes * @{ *//** An object representing a node-id.  */typedef struct svn_fs_id_t svn_fs_id_t;/** Return -1, 0, or 1 if node revisions @a a and @a b are unrelated, * equivalent, or otherwise related (respectively). */int svn_fs_compare_ids(const svn_fs_id_t *a, const svn_fs_id_t *b);/** Return non-zero IFF the nodes associated with @a id1 and @a id2 are * related, else return zero.   */svn_boolean_t svn_fs_check_related(const svn_fs_id_t *id1,                                   const svn_fs_id_t *id2);/** * @note This function is not guaranteed to work with all filesystem * types.  There is currently no un-deprecated equivalent; contact the * Subversion developers if you have a need for it. * * @deprecated Provided for backward compatibility with the 1.0 API. */svn_fs_id_t *svn_fs_parse_id(const char *data,                              apr_size_t len,                             apr_pool_t *pool);/** Return a Subversion string containing the unparsed form of the * node or node revision id @a id.  Allocate the string containing the * unparsed form in @a pool. */svn_string_t *svn_fs_unparse_id(const svn_fs_id_t *id,                                 apr_pool_t *pool);/** @} *//** Filesystem Transactions. * * To make a change to a Subversion filesystem: * - Create a transaction object, using svn_fs_begin_txn(). * - Call svn_fs_txn_root(), to get the transaction's root directory. * - Make whatever changes you like in that tree. * - Commit the transaction, using svn_fs_commit_txn(). * * The filesystem implementation guarantees that your commit will * either: * - succeed completely, so that all of the changes are committed to *   create a new revision of the filesystem, or * - fail completely, leaving the filesystem unchanged. * * Until you commit the transaction, any changes you make are * invisible.  Only when your commit succeeds do they become visible * to the outside world, as a new revision of the filesystem. * * If you begin a transaction, and then decide you don't want to make * the change after all (say, because your net connection with the * client disappeared before the change was complete), you can call * svn_fs_abort_txn(), to cancel the entire transaction; this * leaves the filesystem unchanged. * * The only way to change the contents of files or directories, or * their properties, is by making a transaction and creating a new * revision, as described above.  Once a revision has been committed, it * never changes again; the filesystem interface provides no means to * go back and edit the contents of an old revision.  Once history has * been recorded, it is set in stone.  Clients depend on this property * to do updates and commits reliably; proxies depend on this property * to cache changes accurately; and so on. * * There are two kinds of nodes in the filesystem: mutable, and * immutable.  Revisions in the filesystem consist entirely of * immutable nodes, whose contents never change.  A transaction in * progress, which the user is still constructing, uses mutable nodes * for those nodes which have been changed so far, and refers to * immutable nodes from existing revisions for portions of the tree * which haven't been changed yet in that transaction. * * Immutable nodes, as part of revisions, never refer to mutable * nodes, which are part of uncommitted transactions.  Mutable nodes * may refer to immutable nodes, or other mutable nodes. * * Note that the terms "immutable" and "mutable" describe whether or * not the nodes have been changed as part of a transaction --- not * the permissions on the nodes they refer to.  Even if you aren't * authorized to modify the filesystem's root directory, you might be * authorized to change some descendant of the root; doing so would * create a new mutable copy of the root directory.  Mutability refers * to the role of the node: part of an existing revision, or part of a * new one.  This is independent of your authorization to make changes * to a given node. * * Transactions are actually persistent objects, stored in the * database.  You can open a filesystem, begin a transaction, and * close the filesystem, and then a separate process could open the * filesystem, pick up the same transaction, and continue work on it. * When a transaction is successfully committed, it is removed from * the database. * * Every transaction is assigned a name.  You can open a transaction * by name, and resume work on it, or find out the name of a * transaction you already have open.  You can also list all the * transactions currently present in the database. * * Transaction names are guaranteed to contain only letters (upper- * and lower-case), digits, `-', and `.', from the ASCII character * set. * * @defgroup svn_fs_txns filesystem transactions * @{ *//** The type of a Subversion transaction object.  */typedef struct svn_fs_txn_t svn_fs_txn_t;/** @defgroup svn_fs_begin_txn2_flags Bitmask flags for svn_fs_begin_txn2() * @since New in 1.2. * @{ *//** Do on-the-fly out-of-dateness checks.  That is, an fs routine may * throw error if a caller tries to edit an out-of-date item in the * transaction.   *  * @warning ### Not yet implemented.  */#define SVN_FS_TXN_CHECK_OOD                     0x00001/** Do on-the-fly lock checks.  That is, an fs routine may throw error * if a caller tries to edit a locked item without having rights to the lock. */#define SVN_FS_TXN_CHECK_LOCKS                   0x00002/** @} *//** * Begin a new transaction on the filesystem @a fs, based on existing * revision @a rev.  Set @a *txn_p to a pointer to the new transaction. * When committed, this transaction will create a new revision. * * Allocate the new transaction in @a pool; when @a pool is freed, the new * transaction will be closed (neither committed nor aborted). * * @a flags determines transaction enforcement behaviors, and is composed * from the constants SVN_FS_TXN_* (@c SVN_FS_TXN_CHECK_OOD etc.). * * @note If you're building a txn for committing, you probably * don't want to call this directly.  Instead, call * svn_repos_fs_begin_txn_for_commit(), which honors the * repository's hook configurations. * * @since New in 1.2. */svn_error_t *svn_fs_begin_txn2(svn_fs_txn_t **txn_p,                               svn_fs_t *fs,                               svn_revnum_t rev,                               apr_uint32_t flags,                               apr_pool_t *pool);/** * Same as svn_fs_begin_txn2(), but with @a flags set to 0. * * @deprecated Provided for backward compatibility with the 1.1 API. */svn_error_t *svn_fs_begin_txn(svn_fs_txn_t **txn_p,                              svn_fs_t *fs,                              svn_revnum_t rev,                              apr_pool_t *pool);/** Commit @a txn. * * @note You usually don't want to call this directly. * Instead, call svn_repos_fs_commit_txn(), which honors the * repository's hook configurations. * * If the transaction conflicts with other changes committed to the * repository, return an @c SVN_ERR_FS_CONFLICT error.  Otherwise, create * a new filesystem revision containing the changes made in @a txn, * storing that new revision number in @a *new_rev, and return zero. * * If @a conflict_p is non-zero, use it to provide details on any * conflicts encountered merging @a txn with the most recent committed * revisions.  If a conflict occurs, set @a *conflict_p to the path of * the conflict in @a txn, with the same lifetime as @a txn; * otherwise, set @a *conflict_p to null. * * If the commit succeeds, @a txn is invalid. * * If the commit fails, @a txn is still valid; you can make more * operations to resolve the conflict, or call svn_fs_abort_txn() to * abort the transaction. * * @note Success or failure of the commit of @a txn is determined by * examining the value of @a *new_rev upon this function's return.  If * the value is a valid revision number, the commit was successful, * even though a non-@c NULL function return value may indicate that * something else went wrong. */svn_error_t *svn_fs_commit_txn(const char **conflict_p,                               svn_revnum_t *new_rev,                               svn_fs_txn_t *txn,                               apr_pool_t *pool);/** Abort the transaction @a txn.  Any changes made in @a txn are * discarded, and the filesystem is left unchanged.  Use @a pool for * any necessary allocations. * * @note This function first sets the state of @a txn to "dead", and * then attempts to purge it and any related data from the filesystem. * If some part of the cleanup process fails, @a txn and some portion * of its data may remain in the database after this function returns. * Use svn_fs_purge_txn() to retry the transaction cleanup. */svn_error_t *svn_fs_abort_txn(svn_fs_txn_t *txn,                              apr_pool_t *pool);

⌨️ 快捷键说明

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