• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/subversion/subversion/libsvn_fs_base/

Lines Matching refs:root

30    transaction's root down into directories and files shared with
99 /* The root structure. */
113 /* For revision roots, this is a dag node for the revision's root
114 directory. For transaction roots, we open the root directory
115 afresh every time, since the root may have been cloned, or
124 never more than a single transaction root per Subversion
152 dag_node_cache_get(svn_fs_root_t *root,
156 base_root_data_t *brd = root->fsap_data;
163 if (root->is_txn_root)
180 dag_node_cache_set(svn_fs_root_t *root,
184 base_root_data_t *brd = root->fsap_data;
206 if (root->is_txn_root)
212 root, and that only happens once under that root. So, we'll be a
220 ### callers, use only revision root and don't try to update
264 cache_pool = svn_pool_create(root->pool);
286 /* Creating transaction and revision root nodes. */
305 svn_fs_root_t *root;
322 root = make_txn_root(fs, svn_txn_id, txn->base_rev, flags, trail->pool);
324 *root_p = root;
334 svn_fs_root_t *root;
337 args.root_p = &root;
342 *root_p = root;
360 svn_fs_root_t *root;
364 root = make_revision_root(trail->fs, args->rev, root_dir, trail->pool);
366 *args->root_p = root;
378 svn_fs_root_t *root;
382 args.root_p = &root;
387 *root_p = root;
397 /* Set *NODE_P to a freshly opened dag node referring to the root
401 svn_fs_root_t *root,
405 base_root_data_t *brd = root->fsap_data;
407 if (! root->is_txn_root)
409 /* It's a revision root, so we already have its root directory
416 /* It's a transaction root. Open a fresh copy. */
417 return svn_fs_base__dag_txn_root(node_p, root->fs, root->txn,
423 /* Set *NODE_P to a mutable root directory for ROOT, cloning if
424 necessary, as part of TRAIL. ROOT must be a transaction root. Use
428 svn_fs_root_t *root,
433 if (root->is_txn_root)
434 return svn_fs_base__dag_clone_root(node_p, root->fs, root->txn,
437 /* If it's not a transaction root, we can't change its contents. */
438 return SVN_FS__ERR_NOT_MUTABLE(root->fs, root->rev, error_path);
455 /* A linked list representing the path from a node up to a root
464 parents, or the root. Every parent path ends with an element for
465 the root directory. */
469 root directory, which (obviously) has no name in its parent. */
472 /* The parent of NODE, or zero if NODE is the root directory. */
523 for that path). CHILD must have a parent (it cannot be the root
644 contain at least one element, for the root directory.
666 svn_fs_root_t *root,
673 svn_fs_t *fs = root->fs;
675 parent_path_t *parent_path; /* The path from HERE up to the root. */
680 /* Make a parent_path item for the root node, using its own current
682 SVN_ERR(root_node(&here, root, trail, pool));
723 cached_node = dag_node_cache_get(root, path_so_far, pool);
748 can provide, giving the root and full path name. */
749 return SVN_FS__NOT_FOUND(root, path);
769 dag_node_cache_set(root, path_so_far, child);
791 already, as part of TRAIL. ROOT must be the root from which
796 make_path_mutable(svn_fs_root_t *root,
803 const char *txn_id = root->txn;
804 svn_fs_t *fs = root->fs;
810 /* Are we trying to clone the root, or somebody's child node? */
822 SVN_ERR(make_path_mutable(root, parent_path->parent,
873 /* We're trying to clone the root directory. */
874 SVN_ERR(mutable_root_node(&cloned_node, root, error_path, trail, pool));
884 /* Walk up PARENT_PATH to the root of the tree, adjusting each node's
921 svn_fs_root_t *root,
932 /* If ROOT is a revision root, we'll look for the DAG in our cache. */
933 node = dag_node_cache_get(root, path, pool);
938 SVN_ERR(open_path(&parent_path, root, path, 0, NULL, trail, pool));
986 svn_fs_root_t *root;
997 SVN_ERR(get_dag(&node, args->root, args->path, trail, trail->pool));
1007 svn_fs_root_t *root,
1011 base_root_data_t *brd = root->fsap_data;
1013 if (! root->is_txn_root
1017 The root directory ("" or "/") node is stored in the
1019 root, so we can just reach in and grab it directly. */
1029 args.root = root;
1032 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_node_id, &args,
1066 svn_fs_root_t *root;
1077 SVN_ERR(get_dag(&node, args->root, args->path, trail, trail->pool));
1085 svn_fs_root_t *root,
1092 args.root = root;
1095 (root->fs, txn_body_node_created_rev, &args, TRUE, pool));
1103 svn_fs_root_t *root;
1114 SVN_ERR(get_dag(&node, args->root, args->path, trail, trail->pool));
1122 svn_fs_root_t *root,
1130 args.root = root;
1133 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_node_created_path, &args,
1164 svn_fs_root_t *root,
1172 SVN_ERR(base_node_id(&node_id, root, path, pool));
1176 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_node_kind, &args,
1186 svn_fs_root_t *root,
1190 svn_error_t *err = node_kind(kind_p, root, path, pool);
1207 svn_fs_root_t *root;
1221 SVN_ERR(get_dag(&node, args->root, args->path, trail, trail->pool));
1233 svn_fs_root_t *root,
1243 args.root = root;
1246 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_node_prop, &args,
1256 svn_fs_root_t *root;
1268 SVN_ERR(get_dag(&node, args->root, args->path, trail, trail->pool));
1278 svn_fs_root_t *root,
1286 args.root = root;
1289 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_node_proplist, &args,
1298 svn_fs_root_t *root,
1304 SVN_ERR(base_node_proplist(&props, root, path, scratch_pool));
1313 svn_fs_root_t *root;
1327 const char *txn_id = args->root->txn;
1330 SVN_ERR(open_path(&parent_path, args->root, args->path, 0, txn_id,
1335 if (args->root->txn_flags & SVN_FS_TXN_CHECK_LOCKS)
1339 SVN_ERR(make_path_mutable(args->root, parent_path, args->path,
1385 return add_change(args->root->fs, txn_id,
1393 base_change_node_prop(svn_fs_root_t *root,
1401 if (! root->is_txn_root)
1402 return SVN_FS__NOT_TXN(root);
1404 args.root = root;
1408 return svn_fs_base__retry_txn(root->fs, txn_body_change_node_prop, &args,
1558 svn_fs_root_t *root;
1572 SVN_ERR(get_dag(&node, args->root, args->path, trail, trail->pool));
1585 svn_fs_root_t *root,
1592 svn_fs_t *fs = root->fs;
1596 args.root = root;
1598 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_dir_entries, &args,
1634 svn_fs_root_t *root,
1770 svn_fs_root_t *root,
1784 SVN_ERR(base_node_id(&id, root, path, pool));
1795 SVN_ERR(base_check_path(&kind, root, path, pool));
1799 SVN_ERR(base_dir_entries(&entries, root, path, pool));
1816 SVN_ERR(deltify_mutable(fs, root,
1901 && forward_delta_rev <= root->rev)
2033 svn_fs_root_t *root;
2038 /* Set ARGS->node to the root node of ARGS->root. */
2043 return get_dag(&(args->node), args->root, "", trail, trail->pool);
2500 BATON->source_node, and its root node will have a new ID, a
2529 we just set *both* its base and root to source, making TXN
2656 * Up-to-date means that ARGS->txn's base root is the same as the root
2680 /* If the root of the youngest revision is the same as txn's base,
2707 /* Ensure every txn has a mutable root as then the new revision will
2708 have a distinct root node-revision-id. This is necessary as
2709 future transactions use the root node-revision-id as a proxy for
2743 * attach the txn root as the root of the new revision, because that
2807 root node will become the new base root for the svn txn that
2810 this root in its own bdb txn here). */
2811 get_root_args.root = youngish_root;
2816 /* Try to merge. If the merge succeeds, the base root node of
2819 the root node of the youngest rev is by then. */
2915 get_root_args.root = ancestor_root;
2921 get_root_args.root = source_root;
2926 /* Open a txn for the txn root into which we're merging. */
2967 svn_fs_root_t *root;
2989 SVN_ERR(svn_fs_base__revision_root(&root, fs, revision, pool));
2996 return deltify_mutable(fs, root, "/", NULL, svn_node_dir, txn_id, pool);
3006 svn_fs_root_t *root;
3016 svn_fs_root_t *root = args->root;
3020 const char *txn_id = root->txn;
3022 SVN_ERR(open_path(&parent_path, root, path, open_path_last_optional,
3028 return SVN_FS__ALREADY_EXISTS(root, path);
3033 if (args->root->txn_flags & SVN_FS_TXN_CHECK_LOCKS)
3040 SVN_ERR(make_path_mutable(root, parent_path->parent, path,
3051 return add_change(root->fs, txn_id, path,
3059 base_make_dir(svn_fs_root_t *root,
3065 if (! root->is_txn_root)
3066 return SVN_FS__NOT_TXN(root);
3068 args.root = root;
3070 return svn_fs_base__retry_txn(root->fs, txn_body_make_dir, &args,
3077 svn_fs_root_t *root;
3090 svn_fs_root_t *root = args->root;
3093 const char *txn_id = root->txn;
3096 if (! root->is_txn_root)
3097 return SVN_FS__NOT_TXN(root);
3099 SVN_ERR(open_path(&parent_path, root, path, 0, txn_id,
3102 /* We can't remove the root of the filesystem. */
3105 _("The root directory cannot be deleted"));
3109 if (root->txn_flags & SVN_FS_TXN_CHECK_LOCKS)
3116 SVN_ERR(make_path_mutable(root, parent_path->parent, path,
3139 return add_change(root->fs, txn_id, path,
3147 base_delete_node(svn_fs_root_t *root,
3153 args.root = root;
3155 return svn_fs_base__retry_txn(root->fs, txn_body_delete, &args,
3363 svn_fs_root_t *root; /* Root for the node whose ancestry we seek. */
3379 svn_fs_t *fs = args->root->fs;
3386 SVN_ERR(get_dag(&node, args->root, args->path, trail, trail->pool));
3423 svn_fs_root_t *root,
3429 args.root = root;
3433 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_copied_from, &args,
3451 svn_fs_root_t *root;
3461 svn_fs_root_t *root = args->root;
3465 const char *txn_id = root->txn;
3467 SVN_ERR(open_path(&parent_path, root, path, open_path_last_optional,
3473 return SVN_FS__ALREADY_EXISTS(root, path);
3478 if (args->root->txn_flags & SVN_FS_TXN_CHECK_LOCKS)
3485 SVN_ERR(make_path_mutable(root, parent_path->parent, path,
3496 return add_change(root->fs, txn_id, path,
3504 base_make_file(svn_fs_root_t *root,
3510 args.root = root;
3512 return svn_fs_base__retry_txn(root->fs, txn_body_make_file, &args,
3520 svn_fs_root_t *root;
3532 /* First create a dag_node_t from the root/path pair. */
3533 SVN_ERR(get_dag(&file, args->root, args->path, trail, trail->pool));
3542 svn_fs_root_t *root,
3548 args.root = root;
3550 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_file_length, &args,
3560 svn_fs_root_t *root;
3573 SVN_ERR(get_dag(&file, args->root, args->path, trail, trail->pool));
3582 svn_fs_root_t *root,
3589 args.root = root;
3593 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_file_checksum, &args,
3608 svn_fs_root_t *root;
3624 /* Main body of svn_fs_file_contents; converts a root/path pair into
3631 /* First create a dag_node_t from the root/path pair. */
3632 SVN_ERR(get_dag(&(fb->node), fb->root, fb->path, trail, trail->pool));
3643 svn_fs_root_t *root,
3648 fb->root = root;
3653 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_get_file_contents, fb,
3678 svn_fs_root_t *root;
3716 tb->root->txn,
3720 return add_change(tb->root->fs, tb->root->txn, tb->path,
3792 SVN_ERR(svn_fs_base__retry_txn(tb->root->fs,
3806 const char *txn_id = tb->root->txn;
3810 SVN_ERR(open_path(&parent_path, tb->root, tb->path, 0, txn_id,
3814 if (tb->root->txn_flags & SVN_FS_TXN_CHECK_LOCKS)
3819 SVN_ERR(make_path_mutable(tb->root, parent_path, tb->path,
3875 svn_fs_root_t *root,
3883 tb->root = root;
3889 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_apply_textdelta, tb,
3905 svn_fs_root_t *root;
3941 tb->root->txn,
3945 return add_change(tb->root->fs, tb->root->txn, tb->path,
3975 return svn_fs_base__retry_txn(tb->root->fs,
3986 const char *txn_id = tb->root->txn;
3990 SVN_ERR(open_path(&parent_path, tb->root, tb->path, 0, txn_id,
3994 if (tb->root->txn_flags & SVN_FS_TXN_CHECK_LOCKS)
3999 SVN_ERR(make_path_mutable(tb->root, parent_path, tb->path,
4018 svn_fs_root_t *root,
4025 tb->root = root;
4030 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_apply_text, tb,
4186 svn_fs_root_t *root;
4199 svn_fs_t *fs = args->root->fs;
4202 if (! args->root->is_txn_root)
4203 SVN_ERR(svn_fs_base__rev_get_txn_id(&txn_id, fs, args->root->rev,
4206 txn_id = args->root->txn;
4215 svn_fs_root_t *root,
4219 args.root = root;
4221 SVN_ERR(svn_fs_base__retry(root->fs, txn_body_paths_changed, &args,
4259 svn_fs_root_t *root,
4266 /* We require a revision root. */
4267 if (root->is_txn_root)
4270 /* And we require that the path exist in the root. */
4271 SVN_ERR(base_check_path(&kind, root, path, scratch_pool));
4273 return SVN_FS__NOT_FOUND(root, path);
4276 *history_p = assemble_history(root->fs,
4279 root->rev, FALSE, NULL,
4303 /* If we have no parent (we are looking at the root node), or if
4354 svn_fs_root_t *root;
4380 rr_args.root_p = &root;
4388 SVN_ERR(open_path(&parent_path, root, path, 0, txn_id,
4537 /* Special case: the root directory changes in every single
4538 revision, no exceptions. And, the root can't be the target (or
4605 svn_fs_root_t *root;
4615 svn_fs_root_t *root = args->root;
4617 svn_fs_t *fs = root->fs;
4631 /* Get the transaction ID associated with our root. */
4632 if (root->is_txn_root)
4633 txn_id = root->txn;
4635 SVN_ERR(svn_fs_base__rev_get_txn_id(&txn_id, fs, root->rev,
4639 SVN_ERR(open_path(&parent_path, root, path, 0, txn_id,
4664 /* Turn that revision into a revision root. */
4729 svn_fs_root_t *root,
4734 svn_fs_t *fs = root->fs;
4740 args.root = root;
4786 svn_fs_root_t *root;
4796 root = make_revision_root(trail->fs, head_rev, root_dir, pool);
4799 err = get_dag(&path_node, root, path, trail, pool);
4821 svn_fs_root_t *root;
4831 root = make_revision_root(trail->fs, head_rev, root_dir, pool);
4834 err = get_dag(&path_node, root, path, trail, pool);
4871 svn_fs_root_t *root,
4881 SVN_ERR(base_closest_copy(&copy_root, &copy_path, root, path, pool));
4955 svn_fs_root_t *root,
4959 svn_fs_t *fs = root->fs;
4969 /* Special-case the root node (for performance reasons) */
4983 SVN_ERR(base_node_id(&id, root, path, pool));
4985 err = svn_fs_base__retry_txn(root->fs, txn_body_get_node_origin, &args,
5007 svn_fs_root_t *curroot = root;
5025 /* Get a root pointing to LASTREV. (The first time around,
5069 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_set_node_origin,
5080 SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_id_created_rev, &icr_args,
5278 svn_fs_root_t *root;
5297 SVN_ERR(open_path(&parent_path, args->root, args->path, 0,
5403 svn_fs_root_t *root;
5412 SVN_ERR(get_dag(&(args->node), args->root, args->path,
5427 get_mergeinfos_for_paths(svn_fs_root_t *root,
5451 gmfp_args.root = root;
5456 SVN_ERR(svn_fs_base__retry_txn(root->fs,
5469 gnms_args.root = root;
5471 SVN_ERR(svn_fs_base__retry_txn(root->fs,
5485 SVN_ERR(crawl_directory_for_mergeinfo(root->fs, gnms_args.node,
5498 base_get_mergeinfo(svn_fs_root_t *root,
5509 (root->fs, "mergeinfo", SVN_FS_BASE__MIN_MERGEINFO_FORMAT));
5511 /* We require a revision root. */
5512 if (root->is_txn_root)
5516 return get_mergeinfos_for_paths(root, paths,
5526 /* Creating root objects. */
5566 /* Construct a new root object in FS, allocated from POOL. */
5571 svn_fs_root_t *root = apr_pcalloc(pool, sizeof(*root));
5574 root->fs = fs;
5575 root->pool = pool;
5580 root->vtable = &root_vtable;
5581 root->fsap_data = brd;
5583 return root;
5587 /* Construct a root object referring to the root of REVISION in FS,
5588 whose root directory is ROOT_DIR. Create the new root in POOL. */
5595 svn_fs_root_t *root = make_root(fs, pool);
5596 base_root_data_t *brd = root->fsap_data;
5598 root->is_txn_root = FALSE;
5599 root->rev = rev;
5602 return root;
5606 /* Construct a root object referring to the root of the transaction
5608 the behavior of the transaction. Create the new root in POOL. */
5616 svn_fs_root_t *root = make_root(fs, pool);
5617 root->is_txn_root = TRUE;
5618 root->txn = apr_pstrdup(root->pool, txn);
5619 root->txn_flags = flags;
5620 root->rev = base_rev;
5622 return root;