Ejemplo n.º 1
0
svn_error_t *
svn_fs_fs__dag_clone_root(dag_node_t **root_p,
                          svn_fs_t *fs,
                          const char *txn_id,
                          apr_pool_t *pool)
{
    const svn_fs_id_t *base_root_id, *root_id;

    /* Get the node ID's of the root directories of the transaction and
       its base revision.  */
    SVN_ERR(svn_fs_fs__get_txn_ids(&root_id, &base_root_id, fs, txn_id, pool));

    /* Oh, give me a clone...
       (If they're the same, we haven't cloned the transaction's root
       directory yet.)  */
    SVN_ERR_ASSERT(!svn_fs_fs__id_eq(root_id, base_root_id));

    /*
     * (Sung to the tune of "Home, Home on the Range", with thanks to
     * Randall Garrett and Isaac Asimov.)
     */

    /* One way or another, root_id now identifies a cloned root node. */
    return svn_fs_fs__dag_get_node(root_p, fs, root_id, pool);
}
Ejemplo n.º 2
0
int
svn_fs_fs__id_compare(const svn_fs_id_t *a,
                      const svn_fs_id_t *b)
{
  if (svn_fs_fs__id_eq(a, b))
    return 0;
  return (svn_fs_fs__id_check_related(a, b) ? 1 : -1);
}
Ejemplo n.º 3
0
svn_fs_node_relation_t
svn_fs_fs__id_compare(const svn_fs_id_t *a,
                      const svn_fs_id_t *b)
{
  if (svn_fs_fs__id_eq(a, b))
    return svn_fs_node_unchanged;
  return (svn_fs_fs__id_check_related(a, b) ? svn_fs_node_common_ancestor
                                            : svn_fs_node_unrelated);
}