You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/06/27 17:13:42 UTC
svn commit: r1354571 [24/37] - in /subversion/branches/master-passphrase: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ contrib/client-side/emacs/ contrib/server-side/ notes/
notes/api-errata/1.8/ notes/directory-i...
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.c?rev=1354571&r1=1354570&r2=1354571&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/wc_db.c Wed Jun 27 15:12:37 2012
@@ -105,18 +105,13 @@
/* Check if the column contains actual properties. The empty set of properties
is stored as "()", so we have properties if the size of the column is
- larger then 2. */
+ larger than 2. */
#define SQLITE_PROPERTIES_AVAILABLE(stmt, i) \
(svn_sqlite__column_bytes(stmt, i) > 2)
-/* This is a character used to escape itself and the globbing character in
- globbing sql expressions below. See escape_sqlite_like().
-
- NOTE: this should match the character used within wc-metadata.sql */
-#define LIKE_ESCAPE_CHAR "#"
-
/* Calculates the depth of the relpath below "" */
-APR_INLINE static apr_int64_t relpath_depth(const char *relpath)
+APR_INLINE static int
+relpath_depth(const char *relpath)
{
int n = 1;
if (*relpath == '\0')
@@ -133,7 +128,8 @@ APR_INLINE static apr_int64_t relpath_de
}
-apr_int64_t svn_wc__db_op_depth_for_upgrade(const char *local_relpath)
+int
+svn_wc__db_op_depth_for_upgrade(const char *local_relpath)
{
return relpath_depth(local_relpath);
}
@@ -193,7 +189,7 @@ typedef struct insert_working_baton_t {
/* common to all insertions into WORKING (including NODE_DATA) */
svn_wc__db_status_t presence;
svn_kind_t kind;
- apr_int64_t op_depth;
+ int op_depth;
/* common to all "normal" presence insertions */
const apr_hash_t *props;
@@ -220,7 +216,7 @@ typedef struct insert_working_baton_t {
/* If the value is > 0 and < op_depth, also insert a not-present
at op-depth NOT_PRESENT_OP_DEPTH, based on this same information */
- apr_int64_t not_present_op_depth;
+ int not_present_op_depth;
} insert_working_baton_t;
@@ -317,7 +313,7 @@ insert_incomplete_children(svn_sqlite__d
const char *repos_relpath,
svn_revnum_t revision,
const apr_array_header_t *children,
- apr_int64_t op_depth,
+ int op_depth,
apr_pool_t *scratch_pool);
static svn_error_t *
@@ -368,7 +364,7 @@ scan_addition(svn_wc__db_status_t *statu
svn_revnum_t *original_revision,
const char **moved_from_relpath,
const char **moved_from_op_root_relpath,
- apr_int64_t *moved_from_op_depth,
+ int *moved_from_op_depth,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
apr_pool_t *result_pool,
@@ -396,7 +392,7 @@ wclock_owns_lock(svn_boolean_t *own_lock
apr_pool_t *scratch_pool);
-
+
/* Return the absolute path, in local path style, of LOCAL_RELPATH
in WCROOT. */
static const char *
@@ -450,64 +446,6 @@ lock_from_columns(svn_sqlite__stmt_t *st
}
-/* */
-static const char *
-escape_sqlite_like(const char * const str, apr_pool_t *result_pool)
-{
- char *result;
- const char *old_ptr;
- char *new_ptr;
- int len = 0;
-
- /* Count the number of extra characters we'll need in the escaped string.
- We could just use the worst case (double) value, but we'd still need to
- iterate over the string to get it's length. So why not do something
- useful why iterating over it, and save some memory at the same time? */
- for (old_ptr = str; *old_ptr; ++old_ptr)
- {
- len++;
- if (*old_ptr == '%'
- || *old_ptr == '_'
- || *old_ptr == LIKE_ESCAPE_CHAR[0])
- len++;
- }
-
- result = apr_palloc(result_pool, len + 1);
-
- /* Now do the escaping. */
- for (old_ptr = str, new_ptr = result; *old_ptr; ++old_ptr, ++new_ptr)
- {
- if (*old_ptr == '%'
- || *old_ptr == '_'
- || *old_ptr == LIKE_ESCAPE_CHAR[0])
- *(new_ptr++) = LIKE_ESCAPE_CHAR[0];
- *new_ptr = *old_ptr;
- }
- *new_ptr = '\0';
-
- return result;
-}
-
-
-/* Return a string that can be used as the argument to a SQLite 'LIKE'
- operator, in order to match any path that is a child of LOCAL_RELPATH
- (at any depth below LOCAL_RELPATH), *excluding* LOCAL_RELPATH itself.
- LOCAL_RELPATH may be the empty string, in which case the result will
- match any path except the empty path.
-
- Allocate the result either statically or in RESULT_POOL. */
-static const char *construct_like_arg(const char *local_relpath,
- apr_pool_t *result_pool)
-{
- if (local_relpath[0] == '\0')
- return "_%";
-
- return apr_pstrcat(result_pool,
- escape_sqlite_like(local_relpath, result_pool),
- "/%", (char *)NULL);
-}
-
-
/* Look up REPOS_ID in SDB and set *REPOS_ROOT_URL and/or *REPOS_UUID to
its root URL and UUID respectively. If REPOS_ID is INVALID_REPOS_ID,
use NULL for both URL and UUID. Either or both output parameters may be
@@ -710,7 +648,7 @@ extend_parent_delete(svn_wc__db_wcroot_t
{
svn_boolean_t have_row;
svn_sqlite__stmt_t *stmt;
- apr_int64_t parent_op_depth;
+ int parent_op_depth;
const char *parent_relpath = svn_relpath_dirname(local_relpath, scratch_pool);
SVN_ERR_ASSERT(local_relpath[0]);
@@ -720,22 +658,22 @@ extend_parent_delete(svn_wc__db_wcroot_t
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, parent_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
- parent_op_depth = svn_sqlite__column_int64(stmt, 0);
+ parent_op_depth = svn_sqlite__column_int(stmt, 0);
SVN_ERR(svn_sqlite__reset(stmt));
if (have_row)
{
- apr_int64_t op_depth;
+ int op_depth;
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
SVN_ERR(svn_sqlite__reset(stmt));
if (!have_row || parent_op_depth < op_depth)
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_INSTALL_WORKING_NODE_FOR_DELETE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isit", wcroot->wc_id,
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdt", wcroot->wc_id,
local_relpath, parent_op_depth,
presence_map,
svn_wc__db_status_base_deleted));
@@ -782,7 +720,6 @@ insert_base_node(void *baton,
svn_sqlite__stmt_t *stmt;
svn_filesize_t recorded_size = SVN_INVALID_FILESIZE;
apr_int64_t recorded_mod_time;
- svn_boolean_t have_row;
/* The directory at the WCROOT has a NULL parent_relpath. Otherwise,
bind the appropriate parent_relpath. */
@@ -800,29 +737,29 @@ insert_base_node(void *baton,
/* ### we can't handle this right now */
SVN_ERR_ASSERT(pibb->conflict == NULL);
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_BASE_NODE));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (have_row)
+ if (pibb->keep_recorded_info)
{
- /* A BASE node already exists. */
- if (pibb->keep_recorded_info)
+ svn_boolean_t have_row;
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_BASE_NODE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ if (have_row)
{
/* Preserve size and modification time if caller asked us to. */
recorded_size = get_recorded_size(stmt, 6);
recorded_mod_time = svn_sqlite__column_int64(stmt, 12);
}
+ SVN_ERR(svn_sqlite__reset(stmt));
}
- SVN_ERR(svn_sqlite__reset(stmt));
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, STMT_INSERT_NODE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isisisr"
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdsisr"
"tstr" /* 8 - 11 */
"isnnnnns", /* 12 - 19 */
wcroot->wc_id, /* 1 */
local_relpath, /* 2 */
- (apr_int64_t)0, /* op_depth is 0 for base */
+ 0, /* op_depth is 0 for base */
parent_relpath, /* 4 */
repos_id,
pibb->repos_relpath,
@@ -923,7 +860,7 @@ insert_base_node(void *baton,
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_INSERT_DELETE_FROM_BASE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd",
wcroot->wc_id, local_relpath,
relpath_depth(local_relpath)));
SVN_ERR(svn_sqlite__step_done(stmt));
@@ -962,7 +899,7 @@ insert_incomplete_children(svn_sqlite__d
const char *repos_path,
svn_revnum_t revision,
const apr_array_header_t *children,
- apr_int64_t op_depth,
+ int op_depth,
apr_pool_t *scratch_pool)
{
svn_sqlite__stmt_t *stmt;
@@ -1008,7 +945,7 @@ insert_incomplete_children(svn_sqlite__d
svn_pool_clear(iterpool);
- SVN_ERR(svn_sqlite__bindf(stmt, "isisnnrsnsnnnnnnnnnnsn",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdsnnrsnsnnnnnnnnnnsn",
wc_id,
svn_relpath_join(local_relpath, name,
iterpool),
@@ -1055,9 +992,9 @@ insert_working_node(void *baton,
parent_relpath = svn_relpath_dirname(local_relpath, scratch_pool);
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, STMT_INSERT_NODE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isisnnntstrisn"
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdsnnntstrisn"
"nnnn" /* properties translated_size last_mod_time dav_cache */
- "snni", /* symlink_target, file_external, moved_to, moved_here */
+ "snnd", /* symlink_target, file_external, moved_to, moved_here */
wcroot->wc_id, local_relpath,
piwb->op_depth,
parent_relpath,
@@ -1071,7 +1008,7 @@ insert_working_node(void *baton,
/* Note: incomplete nodes may have a NULL target. */
(piwb->kind == svn_kind_symlink)
? piwb->target : NULL,
- (apr_int64_t)piwb->moved_here));
+ piwb->moved_here));
if (piwb->kind == svn_kind_file)
{
@@ -1083,7 +1020,7 @@ insert_working_node(void *baton,
{
SVN_ERR(svn_sqlite__bind_int64(stmt, 5, piwb->original_repos_id));
SVN_ERR(svn_sqlite__bind_text(stmt, 6, piwb->original_repos_relpath));
- SVN_ERR(svn_sqlite__bind_int64(stmt, 7, piwb->original_revnum));
+ SVN_ERR(svn_sqlite__bind_revnum(stmt, 7, piwb->original_revnum));
}
SVN_ERR(svn_sqlite__bind_properties(stmt, 15, piwb->props, scratch_pool));
@@ -1127,7 +1064,7 @@ insert_working_node(void *baton,
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_INSERT_NODE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isisisrtnt",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdsisrtnt",
wcroot->wc_id, local_relpath,
piwb->not_present_op_depth, parent_relpath,
piwb->original_repos_id,
@@ -1231,7 +1168,7 @@ static svn_error_t *
gather_repo_children(const apr_array_header_t **children,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- apr_int64_t op_depth,
+ int op_depth,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -1242,7 +1179,7 @@ gather_repo_children(const apr_array_hea
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_OP_DEPTH_CHILDREN));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id, local_relpath,
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
op_depth));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
while (have_row)
@@ -1362,7 +1299,7 @@ add_single_work_item(svn_sqlite__db_t *s
}
-/* Add work item(s) to the given SDB. Also see add_one_work_item(). This
+/* Add work item(s) to the given SDB. Also see add_single_work_item(). This
SKEL is usually passed to the various wc_db operation functions. It may
be NULL, indicating no additional work items are needed, it may be a
single work item, or it may be a list of work items. */
@@ -1414,11 +1351,77 @@ does_node_exist(svn_boolean_t *exists,
return svn_error_trace(svn_sqlite__reset(stmt));
}
+/* baton for init_db */
+struct init_db_baton
+{
+ /* output values */
+ apr_int64_t wc_id;
+ apr_int64_t repos_id;
+ /* input values */
+ const char *repos_root_url;
+ const char *repos_uuid;
+ const char *root_node_repos_relpath;
+ svn_revnum_t root_node_revision;
+ svn_depth_t root_node_depth;
+};
+
+/* Helper for create_db(). Initializes our wc.db schema */
+static svn_error_t *
+init_db( void *baton, svn_sqlite__db_t *db, apr_pool_t *scratch_pool)
+{
+ struct init_db_baton *idb = baton;
+ svn_sqlite__stmt_t *stmt;
+
+ /* Create the database's schema. */
+ SVN_ERR(svn_sqlite__exec_statements(db, STMT_CREATE_SCHEMA));
+ SVN_ERR(svn_sqlite__exec_statements(db, STMT_CREATE_NODES));
+ SVN_ERR(svn_sqlite__exec_statements(db, STMT_CREATE_NODES_TRIGGERS));
+ SVN_ERR(svn_sqlite__exec_statements(db, STMT_CREATE_EXTERNALS));
+
+ /* Insert the repository. */
+ SVN_ERR(create_repos_id(&idb->repos_id, idb->repos_root_url, idb->repos_uuid,
+ db, scratch_pool));
+
+ /* Insert the wcroot. */
+ /* ### Right now, this just assumes wc metadata is being stored locally. */
+ SVN_ERR(svn_sqlite__get_statement(&stmt, db, STMT_INSERT_WCROOT));
+ SVN_ERR(svn_sqlite__insert(&idb->wc_id, stmt));
+
+ if (idb->root_node_repos_relpath)
+ {
+ svn_wc__db_status_t status = svn_wc__db_status_normal;
+
+ if (idb->root_node_revision > 0)
+ status = svn_wc__db_status_incomplete; /* Will be filled by update */
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, db, STMT_INSERT_NODE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdsisrtst",
+ idb->wc_id, /* 1 */
+ "", /* 2 */
+ 0, /* op_depth is 0 for base */
+ NULL, /* 4 */
+ idb->repos_id,
+ idb->root_node_repos_relpath,
+ idb->root_node_revision,
+ presence_map, status, /* 8 */
+ svn_depth_to_word(idb->root_node_depth),
+ kind_map, svn_kind_dir /* 10 */));
+
+ SVN_ERR(svn_sqlite__insert(NULL, stmt));
+ }
+
+ return SVN_NO_ERROR;
+}
/* Create an sqlite database at DIR_ABSPATH/SDB_FNAME and insert
records for REPOS_ID (using REPOS_ROOT_URL and REPOS_UUID) into
REPOSITORY and for WC_ID into WCROOT. Return the DB connection
- in *SDB. */
+ in *SDB.
+
+ If ROOT_NODE_REPOS_RELPATH is not NULL, insert a BASE node at
+ the working copy root with repository relpath ROOT_NODE_REPOS_RELPATH,
+ revision ROOT_NODE_REVISION and depth ROOT_NODE_DEPTH.
+ */
static svn_error_t *
create_db(svn_sqlite__db_t **sdb,
apr_int64_t *repos_id,
@@ -1427,30 +1430,29 @@ create_db(svn_sqlite__db_t **sdb,
const char *repos_root_url,
const char *repos_uuid,
const char *sdb_fname,
+ const char *root_node_repos_relpath,
+ svn_revnum_t root_node_revision,
+ svn_depth_t root_node_depth,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- svn_sqlite__stmt_t *stmt;
+ struct init_db_baton idb;
SVN_ERR(svn_wc__db_util_open_db(sdb, dir_abspath, sdb_fname,
svn_sqlite__mode_rwcreate,
NULL /* my_statements */,
result_pool, scratch_pool));
- /* Create the database's schema. */
- SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_SCHEMA));
- SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_NODES));
- SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_NODES_TRIGGERS));
- SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_EXTERNALS));
+ idb.repos_root_url = repos_root_url;
+ idb.repos_uuid = repos_uuid;
+ idb.root_node_repos_relpath = root_node_repos_relpath;
+ idb.root_node_revision = root_node_revision;
+ idb.root_node_depth = root_node_depth;
- /* Insert the repository. */
- SVN_ERR(create_repos_id(repos_id, repos_root_url, repos_uuid, *sdb,
- scratch_pool));
+ SVN_ERR(svn_sqlite__with_lock(*sdb, init_db, &idb, scratch_pool));
- /* Insert the wcroot. */
- /* ### Right now, this just assumes wc metadata is being stored locally. */
- SVN_ERR(svn_sqlite__get_statement(&stmt, *sdb, STMT_INSERT_WCROOT));
- SVN_ERR(svn_sqlite__insert(wc_id, stmt));
+ *repos_id = idb.repos_id;
+ *wc_id = idb.wc_id;
return SVN_NO_ERROR;
}
@@ -1470,7 +1472,6 @@ svn_wc__db_init(svn_wc__db_t *db,
apr_int64_t repos_id;
apr_int64_t wc_id;
svn_wc__db_wcroot_t *wcroot;
- insert_base_baton_t ibb;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
SVN_ERR_ASSERT(repos_relpath != NULL);
@@ -1483,7 +1484,9 @@ svn_wc__db_init(svn_wc__db_t *db,
/* Create the SDB and insert the basic rows. */
SVN_ERR(create_db(&sdb, &repos_id, &wc_id, local_abspath, repos_root_url,
- repos_uuid, SDB_FILE, db->state_pool, scratch_pool));
+ repos_uuid, SDB_FILE,
+ repos_relpath, initial_rev, depth,
+ db->state_pool, scratch_pool));
/* Create the WCROOT for this directory. */
SVN_ERR(svn_wc__db_pdh_create_wcroot(&wcroot,
@@ -1496,24 +1499,7 @@ svn_wc__db_init(svn_wc__db_t *db,
/* The WCROOT is complete. Stash it into DB. */
apr_hash_set(db->dir_data, wcroot->abspath, APR_HASH_KEY_STRING, wcroot);
- blank_ibb(&ibb);
-
- if (initial_rev > 0)
- ibb.status = svn_wc__db_status_incomplete;
- else
- ibb.status = svn_wc__db_status_normal;
- ibb.kind = svn_kind_dir;
- ibb.repos_id = repos_id;
- ibb.repos_relpath = repos_relpath;
- ibb.revision = initial_rev;
-
- /* ### what about the children? */
- ibb.children = NULL;
- ibb.depth = depth;
-
- /* ### no children, conflicts, or work items to install in a txn... */
-
- return svn_error_trace(insert_base_node(&ibb, wcroot, "", scratch_pool));
+ return SVN_NO_ERROR;
}
@@ -2414,7 +2400,7 @@ depth_get_info(svn_wc__db_status_t *stat
svn_boolean_t *had_props,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- apr_int64_t op_depth,
+ int op_depth,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -2424,7 +2410,7 @@ depth_get_info(svn_wc__db_status_t *stat
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_DEPTH_NODE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd",
wcroot->wc_id, local_relpath, op_depth));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
@@ -3122,8 +3108,8 @@ svn_wc__db_committable_externals_below(a
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id, local_relpath,
- (apr_int64_t)(immediates_only ? 1 : 0)));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
+ (immediates_only ? 1 : 0)));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
@@ -3143,8 +3129,8 @@ svn_wc__db_committable_externals_below(a
SVN_ERR_ASSERT(db_kind == svn_kind_file || db_kind == svn_kind_dir);
info->kind = db_kind;
- info->repos_relpath = svn_sqlite__column_text(stmt, 3, result_pool);
- info->repos_root_url = svn_sqlite__column_text(stmt, 4, result_pool);
+ info->repos_relpath = svn_sqlite__column_text(stmt, 2, result_pool);
+ info->repos_root_url = svn_sqlite__column_text(stmt, 3, result_pool);
APR_ARRAY_PUSH(result, svn_wc__committable_external_info_t *) = info;
@@ -3335,8 +3321,8 @@ cross_db_copy(svn_wc__db_wcroot_t *src_w
svn_wc__db_wcroot_t *dst_wcroot,
const char *dst_relpath,
svn_wc__db_status_t dst_status,
- apr_int64_t dst_op_depth,
- apr_int64_t dst_np_op_depth,
+ int dst_op_depth,
+ int dst_np_op_depth,
svn_kind_t kind,
const apr_array_header_t *children,
apr_int64_t copyfrom_id,
@@ -3406,7 +3392,6 @@ get_info_for_copy(apr_int64_t *copyfrom_
svn_wc__db_status_t *status,
svn_kind_t *kind,
svn_boolean_t *op_root,
- svn_boolean_t *have_work,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
apr_pool_t *result_pool,
@@ -3421,7 +3406,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
NULL, NULL, NULL, NULL, NULL, op_root, NULL, NULL,
NULL /* have_base */,
NULL /* have_more_work */,
- have_work,
+ NULL /* have_work */,
wcroot, local_relpath, result_pool, scratch_pool));
if (node_status == svn_wc__db_status_excluded)
@@ -3433,7 +3418,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
svn_dirent_split(&parent_relpath, &base_name, local_relpath,
scratch_pool);
SVN_ERR(get_info_for_copy(copyfrom_id, copyfrom_relpath, copyfrom_rev,
- NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL,
wcroot, parent_relpath,
scratch_pool, scratch_pool));
if (*copyfrom_relpath)
@@ -3514,13 +3499,13 @@ get_info_for_copy(apr_int64_t *copyfrom_
### these are just to avoid churn. a future commit should shuffle the
### functions around. */
static svn_error_t *
-op_depth_of(apr_int64_t *op_depth,
+op_depth_of(int *op_depth,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath);
static svn_error_t *
-op_depth_for_copy(apr_int64_t *op_depth,
- apr_int64_t *np_op_depth,
+op_depth_for_copy(int *op_depth,
+ int *np_op_depth,
apr_int64_t copyfrom_repos_id,
const char *copyfrom_relpath,
svn_revnum_t copyfrom_revision,
@@ -3545,15 +3530,14 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
svn_wc__db_status_t status;
svn_wc__db_status_t dst_presence;
svn_boolean_t op_root;
- svn_boolean_t have_work;
apr_int64_t copyfrom_id;
- apr_int64_t dst_op_depth;
- apr_int64_t dst_np_op_depth;
+ int dst_op_depth;
+ int dst_np_op_depth;
svn_kind_t kind;
const apr_array_header_t *children;
SVN_ERR(get_info_for_copy(©from_id, ©from_relpath, ©from_rev,
- &status, &kind, &op_root, &have_work, src_wcroot,
+ &status, &kind, &op_root, src_wcroot,
src_relpath, scratch_pool, scratch_pool));
SVN_ERR(op_depth_for_copy(&dst_op_depth, &dst_np_op_depth, copyfrom_id,
@@ -3633,7 +3617,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
if (kind == svn_kind_dir)
{
- apr_int64_t src_op_depth;
+ int src_op_depth;
SVN_ERR(op_depth_of(&src_op_depth, src_wcroot, src_relpath));
SVN_ERR(gather_repo_children(&children, src_wcroot, src_relpath,
@@ -3648,14 +3632,10 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
const char *dst_parent_relpath = svn_relpath_dirname(dst_relpath,
scratch_pool);
- if (have_work)
- SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
- STMT_INSERT_WORKING_NODE_COPY_FROM_WORKING));
- else
- SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
- STMT_INSERT_WORKING_NODE_COPY_FROM_BASE));
+ SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
+ STMT_INSERT_WORKING_NODE_COPY_FROM));
- SVN_ERR(svn_sqlite__bindf(stmt, "issist",
+ SVN_ERR(svn_sqlite__bindf(stmt, "issdst",
src_wcroot->wc_id, src_relpath,
dst_relpath,
dst_op_depth,
@@ -3674,7 +3654,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
* Perform a normal copy operation in these cases. */
if (!(status == svn_wc__db_status_added ||
(status == svn_wc__db_status_copied && op_root)))
- SVN_ERR(svn_sqlite__bind_int64(stmt, 7, 1));
+ SVN_ERR(svn_sqlite__bind_int(stmt, 7, 1));
}
else
{
@@ -3694,7 +3674,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
SVN_ERR(svn_sqlite__step(&have_row, info_stmt));
SVN_ERR_ASSERT(have_row);
if (svn_sqlite__column_boolean(info_stmt, 15))
- SVN_ERR(svn_sqlite__bind_int64(stmt, 7, 1));
+ SVN_ERR(svn_sqlite__bind_int(stmt, 7, 1));
SVN_ERR(svn_sqlite__reset(info_stmt));
}
}
@@ -3714,7 +3694,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
SVN_ERR(svn_sqlite__get_statement(&stmt, dst_wcroot->sdb,
STMT_INSERT_NODE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isisisrtnt",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdsisrtnt",
src_wcroot->wc_id, dst_relpath,
dst_np_op_depth, dst_parent_relpath,
copyfrom_id, copyfrom_relpath,
@@ -3838,11 +3818,11 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
static svn_error_t *
db_op_copy_shadowed_layer(svn_wc__db_wcroot_t *src_wcroot,
const char *src_relpath,
- apr_int64_t src_op_depth,
+ int src_op_depth,
svn_wc__db_wcroot_t *dst_wcroot,
const char *dst_relpath,
- apr_int64_t dst_op_depth,
- apr_int64_t del_op_depth,
+ int dst_op_depth,
+ int del_op_depth,
apr_int64_t repos_id,
const char *repos_relpath,
svn_revnum_t revision,
@@ -3957,25 +3937,19 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
if (dst_presence == svn_wc__db_status_normal
&& src_wcroot == dst_wcroot) /* ### Remove limitation */
{
- if (src_op_depth > 0)
- SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
+ SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH));
- else
- SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
- STMT_INSERT_WORKING_NODE_COPY_FROM_BASE));
/* Perhaps we should avoid setting moved_here to 0 and leave it
null instead? */
- SVN_ERR(svn_sqlite__bindf(stmt, "issisti",
+ SVN_ERR(svn_sqlite__bindf(stmt, "issdstdd",
src_wcroot->wc_id, src_relpath,
dst_relpath,
dst_op_depth,
svn_relpath_dirname(dst_relpath, iterpool),
presence_map, dst_presence,
- (apr_int64_t)(is_move ? 1 : 0)));
-
- if (src_op_depth > 0)
- SVN_ERR(svn_sqlite__bind_int64(stmt, 8, src_op_depth));
+ (is_move ? 1 : 0),
+ src_op_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
@@ -4051,9 +4025,9 @@ op_copy_shadowed_layer_txn(void * baton,
struct op_copy_baton *ocb = baton;
const char *src_parent_relpath;
const char *dst_parent_relpath;
- apr_int64_t src_op_depth;
- apr_int64_t dst_op_depth;
- apr_int64_t del_op_depth;
+ int src_op_depth;
+ int dst_op_depth;
+ int del_op_depth;
const char *repos_relpath = NULL;
apr_int64_t repos_id = INVALID_REPOS_ID;
svn_revnum_t revision = SVN_INVALID_REVNUM;
@@ -4153,7 +4127,7 @@ svn_wc__db_op_copy_shadowed_layer(svn_wc
/* Set *OP_DEPTH to the highest op depth of WCROOT:LOCAL_RELPATH. */
static svn_error_t *
-op_depth_of(apr_int64_t *op_depth,
+op_depth_of(int *op_depth,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath)
{
@@ -4165,7 +4139,7 @@ op_depth_of(apr_int64_t *op_depth,
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
SVN_ERR_ASSERT(have_row);
- *op_depth = svn_sqlite__column_int64(stmt, 0);
+ *op_depth = svn_sqlite__column_int(stmt, 0);
SVN_ERR(svn_sqlite__reset(stmt));
return SVN_NO_ERROR;
@@ -4185,7 +4159,7 @@ catch_copy_of_server_excluded(svn_wc__db
const char *server_excluded_relpath;
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_HAS_SERVER_EXCLUDED_NODES));
+ STMT_HAS_SERVER_EXCLUDED_DESCENDANTS));
SVN_ERR(svn_sqlite__bindf(stmt, "is",
wcroot->wc_id,
local_relpath));
@@ -4219,8 +4193,8 @@ catch_copy_of_server_excluded(svn_wc__db
*OP_DEPTH will be set to the proper op_depth for a new operation root.
*/
static svn_error_t *
-op_depth_for_copy(apr_int64_t *op_depth,
- apr_int64_t *np_op_depth,
+op_depth_for_copy(int *op_depth,
+ int *np_op_depth,
apr_int64_t copyfrom_repos_id,
const char *copyfrom_relpath,
svn_revnum_t copyfrom_revision,
@@ -4231,8 +4205,8 @@ op_depth_for_copy(apr_int64_t *op_depth,
const char *parent_relpath, *name;
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
- apr_int64_t incomplete_op_depth = -1;
- apr_int64_t min_op_depth = 1; /* Never touch BASE */
+ int incomplete_op_depth = -1;
+ int min_op_depth = 1; /* Never touch BASE */
*op_depth = relpath_depth(local_relpath);
*np_op_depth = -1;
@@ -4249,7 +4223,7 @@ op_depth_for_copy(apr_int64_t *op_depth,
svn_wc__db_status_t status = svn_sqlite__column_token(stmt, 1,
presence_map);
- min_op_depth = svn_sqlite__column_int64(stmt, 0);
+ min_op_depth = svn_sqlite__column_int(stmt, 0);
if (status == svn_wc__db_status_incomplete)
incomplete_op_depth = min_op_depth;
}
@@ -4262,7 +4236,7 @@ op_depth_for_copy(apr_int64_t *op_depth,
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
{
- apr_int64_t parent_op_depth = svn_sqlite__column_int64(stmt, 0);
+ int parent_op_depth = svn_sqlite__column_int(stmt, 0);
svn_wc__db_status_t presence = svn_sqlite__column_token(stmt, 1,
presence_map);
@@ -4674,8 +4648,7 @@ svn_wc__db_global_record_fileinfo(svn_wc
rb.translated_size = translated_size;
rb.last_mod_time = last_mod_time;
- SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, db_record_fileinfo, &rb,
- scratch_pool));
+ SVN_ERR(db_record_fileinfo(&rb, wcroot, local_relpath, scratch_pool));
/* We *totally* monkeyed the entries. Toss 'em. */
SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
@@ -4929,17 +4902,29 @@ populate_targets_tree(svn_wc__db_wcroot_
const char *changelist = APR_ARRAY_IDX(changelist_filter, i,
const char *);
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_INSERT_TARGET_WITH_CHANGELIST));
SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
local_relpath, changelist));
SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
+ /* If the root is matched by the changelist, we don't have to match
+ the children. As that tells us the root is a file */
+ if (!sub_affected && depth > svn_depth_empty)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
+ SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
+ local_relpath, changelist));
+ SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
+ }
+
affected_rows += sub_affected;
}
}
else /* No changelist filtering */
{
int stmt_idx;
+ int sub_affected;
switch (depth)
{
@@ -4965,9 +4950,19 @@ populate_targets_tree(svn_wc__db_wcroot_
break;
}
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_INSERT_TARGET));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
- SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
+ SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
+ affected_rows += sub_affected;
+
+ if (depth > svn_depth_empty)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
+ affected_rows += sub_affected;
+ }
}
/* Does the target exist? */
@@ -5035,17 +5030,24 @@ set_changelist_txn(void *baton,
scb->changelist_filter, scratch_pool));
/* Ensure we have actual nodes for our targets. */
- SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
- STMT_INSERT_ACTUAL_EMPTIES));
+ if (scb->new_changelist)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_INSERT_ACTUAL_EMPTIES));
+ SVN_ERR(svn_sqlite__step_done(stmt));
+ }
/* Now create our notification table. */
SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
STMT_CREATE_CHANGELIST_LIST));
+ SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
+ STMT_CREATE_CHANGELIST_TRIGGER));
/* Update our changelists. */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_UPDATE_ACTUAL_CHANGELISTS));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, scb->new_changelist));
+ SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id, local_relpath,
+ scb->new_changelist));
SVN_ERR(svn_sqlite__step_done(stmt));
if (scb->new_changelist)
@@ -5053,7 +5055,8 @@ set_changelist_txn(void *baton,
/* We have to notify that we skipped directories, so do that now. */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_MARK_SKIPPED_CHANGELIST_DIRS));
- SVN_ERR(svn_sqlite__bind_text(stmt, 1, scb->new_changelist));
+ SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id, local_relpath,
+ scb->new_changelist));
SVN_ERR(svn_sqlite__step_done(stmt));
}
@@ -5063,7 +5066,7 @@ set_changelist_txn(void *baton,
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_DELETE_ACTUAL_EMPTIES));
- SVN_ERR(svn_sqlite__bind_int64(stmt, 1, wcroot->wc_id));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
SVN_ERR(svn_sqlite__step_done(stmt));
}
@@ -5101,7 +5104,14 @@ do_changelist_notify(void *baton,
svn_pool_clear(iterpool);
if (cancel_func)
- SVN_ERR(cancel_func(cancel_baton));
+ {
+ svn_error_t *err = cancel_func(cancel_baton);
+
+ if (err)
+ return svn_error_trace(svn_error_compose_create(
+ err,
+ svn_sqlite__reset(stmt)));
+ }
notify_abspath = svn_dirent_join(wcroot->abspath, notify_relpath,
iterpool);
@@ -5131,8 +5141,11 @@ svn_wc__db_op_set_changelist(svn_wc__db_
{
svn_wc__db_wcroot_t *wcroot;
const char *local_relpath;
- struct set_changelist_baton_t scb = { new_changelist, changelist_filter,
- depth };
+ struct set_changelist_baton_t scb;
+
+ scb.new_changelist = new_changelist;
+ scb.changelist_filter = changelist_filter;
+ scb.depth = depth;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -5167,6 +5180,66 @@ svn_wc__db_op_mark_conflict(svn_wc__db_t
NOT_IMPLEMENTED();
}
+/* Baton for db_op_mark_resolved */
+struct op_mark_resolved_baton
+{
+ svn_boolean_t resolved_text;
+ svn_boolean_t resolved_props;
+ svn_boolean_t resolved_tree;
+ const svn_skel_t *work_items;
+};
+
+/* Helper for svn_wc__db_op_mark_resolved */
+static svn_error_t *
+db_op_mark_resolved(void *baton,
+ svn_wc__db_wcroot_t *wcroot,
+ const char *local_relpath,
+ apr_pool_t *scratch_pool)
+{
+ struct op_mark_resolved_baton *rb = baton;
+ svn_sqlite__stmt_t *stmt;
+ int affected_rows;
+ int total_affected_rows = 0;
+
+ if (rb->resolved_text)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_CLEAR_TEXT_CONFLICT));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
+ total_affected_rows += affected_rows;
+ }
+ if (rb->resolved_props)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_CLEAR_PROPS_CONFLICT));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
+ total_affected_rows += affected_rows;
+ }
+ if (rb->resolved_tree)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_UPDATE_ACTUAL_TREE_CONFLICTS));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
+ total_affected_rows += affected_rows;
+ }
+
+ /* Now, remove the actual node if it doesn't have any more useful
+ information. We only need to do this if we've remove data ourselves. */
+ if (total_affected_rows > 0)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_DELETE_ACTUAL_EMPTY));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__step_done(stmt));
+ }
+
+ SVN_ERR(add_work_items(wcroot->sdb, rb->work_items, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
svn_error_t *
svn_wc__db_op_mark_resolved(svn_wc__db_t *db,
@@ -5174,48 +5247,31 @@ svn_wc__db_op_mark_resolved(svn_wc__db_t
svn_boolean_t resolved_text,
svn_boolean_t resolved_props,
svn_boolean_t resolved_tree,
+ const svn_skel_t *work_items,
apr_pool_t *scratch_pool)
{
svn_wc__db_wcroot_t *wcroot;
const char *local_relpath;
- svn_sqlite__stmt_t *stmt;
+ struct op_mark_resolved_baton rb;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- /* ### we're not ready to handy RESOLVED_TREE just yet. */
- SVN_ERR_ASSERT(!resolved_tree);
-
SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
local_abspath, scratch_pool, scratch_pool));
VERIFY_USABLE_WCROOT(wcroot);
- /* ### these two statements are not transacted together. is this a
- ### problem? I suspect a failure simply leaves the other in a
- ### continued, unresolved state. However, that still retains
- ### "integrity", so another re-run by the user will fix it. */
+ rb.resolved_props = resolved_props;
+ rb.resolved_text = resolved_text;
+ rb.resolved_tree = resolved_tree;
+ rb.work_items = work_items;
- if (resolved_text)
- {
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_CLEAR_TEXT_CONFLICT));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
- SVN_ERR(svn_sqlite__step_done(stmt));
- }
- if (resolved_props)
- {
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_CLEAR_PROPS_CONFLICT));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
- SVN_ERR(svn_sqlite__step_done(stmt));
- }
+ SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, db_op_mark_resolved,
+ &rb, scratch_pool));
- /* Some entries have cached the above values. Kapow!! */
SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
-
return SVN_NO_ERROR;
}
-
/* */
static svn_error_t *
set_tc_txn(void *baton,
@@ -5351,7 +5407,7 @@ op_revert_txn(void *baton,
{
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
- apr_int64_t op_depth;
+ int op_depth;
svn_boolean_t moved_here;
int affected_rows;
@@ -5397,7 +5453,7 @@ op_revert_txn(void *baton,
scratch_pool));
}
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
moved_here = svn_sqlite__column_boolean(stmt, 15);
SVN_ERR(svn_sqlite__reset(stmt));
@@ -5406,7 +5462,7 @@ op_revert_txn(void *baton,
/* Can't do non-recursive revert if children exist */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_GE_OP_DEPTH_CHILDREN));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
local_relpath, op_depth));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
SVN_ERR(svn_sqlite__reset(stmt));
@@ -5422,7 +5478,7 @@ op_revert_txn(void *baton,
direct children into roots of deletes. */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_UPDATE_OP_DEPTH_INCREASE_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
local_relpath,
op_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
@@ -5468,8 +5524,8 @@ op_revert_recursive_txn(void *baton,
{
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
- apr_int64_t op_depth;
- apr_int64_t select_op_depth;
+ int op_depth;
+ int select_op_depth;
svn_boolean_t moved_here;
int affected_rows;
apr_pool_t *iterpool;
@@ -5486,10 +5542,10 @@ op_revert_recursive_txn(void *baton,
SVN_ERR(svn_sqlite__reset(stmt));
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_ACTUAL_NODE_RECURSIVE));
+ STMT_DELETE_ACTUAL_NODE));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
local_relpath));
- SVN_ERR(svn_sqlite__step(&affected_rows, stmt));
+ SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
if (affected_rows)
return SVN_NO_ERROR; /* actual-only revert */
@@ -5501,7 +5557,7 @@ op_revert_recursive_txn(void *baton,
scratch_pool));
}
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
moved_here = svn_sqlite__column_boolean(stmt, 15);
SVN_ERR(svn_sqlite__reset(stmt));
@@ -5516,22 +5572,24 @@ op_revert_recursive_txn(void *baton,
/* Don't delete BASE nodes */
select_op_depth = op_depth ? op_depth : 1;
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_NODES_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,
+ /* Reverting any non wc-root node */
+ SVN_ERR(svn_sqlite__get_statement(
+ &stmt, wcroot->sdb,
+ STMT_DELETE_NODES_ABOVE_DEPTH_RECURSIVE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
local_relpath, select_op_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
- local_relpath));
+ SVN_ERR(svn_sqlite__get_statement(
+ &stmt, wcroot->sdb,
+ STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
SVN_ERR(svn_sqlite__step_done(stmt));
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
- local_relpath));
+ SVN_ERR(svn_sqlite__get_statement(
+ &stmt, wcroot->sdb,
+ STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
SVN_ERR(svn_sqlite__step_done(stmt));
/* ### This removes the locks, but what about the access batons? */
@@ -5650,7 +5708,7 @@ revert_list_read(void *baton,
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
{
- svn_boolean_t is_actual = (svn_sqlite__column_int64(stmt, 5) != 0);
+ svn_boolean_t is_actual = svn_sqlite__column_boolean(stmt, 5);
svn_boolean_t another_row = FALSE;
if (is_actual)
@@ -5690,7 +5748,7 @@ revert_list_read(void *baton,
*(b->reverted) = TRUE;
if (!svn_sqlite__column_is_null(stmt, 7))
{
- apr_int64_t op_depth = svn_sqlite__column_int64(stmt, 6);
+ int op_depth = svn_sqlite__column_int(stmt, 6);
*(b->copied_here) = (op_depth == relpath_depth(local_relpath));
}
*(b->kind) = svn_sqlite__column_token(stmt, 8, kind_map);
@@ -5725,9 +5783,16 @@ svn_wc__db_revert_list_read(svn_boolean_
{
svn_wc__db_wcroot_t *wcroot;
const char *local_relpath;
- struct revert_list_read_baton b = {reverted, conflict_old, conflict_new,
- conflict_working, prop_reject,
- copied_here, kind, result_pool};
+ struct revert_list_read_baton b;
+
+ b.reverted = reverted;
+ b.conflict_old = conflict_old;
+ b.conflict_new = conflict_new;
+ b.conflict_working = conflict_working;
+ b.prop_reject = prop_reject;
+ b.copied_here = copied_here;
+ b.kind = kind;
+ b.result_pool = result_pool;
SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
db, local_abspath, scratch_pool, scratch_pool));
@@ -5761,9 +5826,8 @@ revert_list_read_copied_children(void *b
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_REVERT_LIST_COPIED_CHILDREN));
- SVN_ERR(svn_sqlite__bindf(stmt, "si",
- construct_like_arg(local_relpath, scratch_pool),
- relpath_depth(local_relpath)));
+ SVN_ERR(svn_sqlite__bindf(stmt, "sd",
+ local_relpath, relpath_depth(local_relpath)));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
while (have_row)
{
@@ -5799,7 +5863,10 @@ svn_wc__db_revert_list_read_copied_child
{
svn_wc__db_wcroot_t *wcroot;
const char *local_relpath;
- struct revert_list_read_copied_children_baton b = {children, result_pool};
+ struct revert_list_read_copied_children_baton b;
+
+ b.children = children;
+ b.result_pool = result_pool;
SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
db, local_abspath, scratch_pool, scratch_pool));
@@ -5820,7 +5887,7 @@ svn_wc__db_revert_list_notify(svn_wc_not
apr_pool_t *scratch_pool)
{
svn_wc__db_wcroot_t *wcroot;
- const char *local_relpath, *like_arg;
+ const char *local_relpath;
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
@@ -5829,11 +5896,9 @@ svn_wc__db_revert_list_notify(svn_wc_not
db, local_abspath, scratch_pool, iterpool));
VERIFY_USABLE_WCROOT(wcroot);
- like_arg = construct_like_arg(local_relpath, scratch_pool);
-
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_REVERT_LIST_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "ss", local_relpath, like_arg));
+ SVN_ERR(svn_sqlite__bindf(stmt, "s", local_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (!have_row)
return svn_error_trace(svn_sqlite__reset(stmt)); /* optimise for no row */
@@ -5857,7 +5922,7 @@ svn_wc__db_revert_list_notify(svn_wc_not
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_DELETE_REVERT_LIST_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "ss", local_relpath, like_arg));
+ SVN_ERR(svn_sqlite__bindf(stmt, "s", local_relpath));
SVN_ERR(svn_sqlite__step_done(stmt));
svn_pool_destroy(iterpool);
@@ -6058,11 +6123,11 @@ remove_node_txn(void *baton,
scratch_pool, scratch_pool));
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_NODES_RECURSIVE));
+ STMT_DELETE_NODES_ABOVE_DEPTH_RECURSIVE));
/* Remove all nodes at or below local_relpath where op_depth >= 0 */
- SVN_ERR(svn_sqlite__bindf(stmt, "isi",
- wcroot->wc_id, local_relpath, (apr_int64_t)0));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd",
+ wcroot->wc_id, local_relpath, 0));
SVN_ERR(svn_sqlite__step_done(stmt));
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
@@ -6219,7 +6284,7 @@ info_below_working(svn_boolean_t *have_b
svn_wc__db_status_t *status,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- apr_int64_t below_op_depth, /* < 0 is ignored */
+ int below_op_depth, /* < 0 is ignored */
apr_pool_t *scratch_pool);
@@ -6276,7 +6341,7 @@ info_below_working(svn_boolean_t *have_b
svn_wc__db_status_t *status,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- apr_int64_t below_op_depth,
+ int below_op_depth,
apr_pool_t *scratch_pool)
{
svn_sqlite__stmt_t *stmt;
@@ -6293,7 +6358,7 @@ info_below_working(svn_boolean_t *have_b
if (below_op_depth >= 0)
{
while (have_row &&
- (svn_sqlite__column_int64(stmt, 0) > below_op_depth))
+ (svn_sqlite__column_int(stmt, 0) > below_op_depth))
{
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -6306,7 +6371,7 @@ info_below_working(svn_boolean_t *have_b
while (have_row)
{
- apr_int64_t op_depth = svn_sqlite__column_int64(stmt, 0);
+ int op_depth = svn_sqlite__column_int(stmt, 0);
if (op_depth > 0)
*have_work = TRUE;
@@ -6328,7 +6393,7 @@ info_below_working(svn_boolean_t *have_b
static svn_error_t *
delete_update_movedto(svn_wc__db_wcroot_t *wcroot,
const char *child_moved_from_relpath,
- apr_int64_t op_depth,
+ int op_depth,
const char *new_moved_to_relpath,
apr_pool_t *scratch_pool)
{
@@ -6337,7 +6402,7 @@ delete_update_movedto(svn_wc__db_wcroot_
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_UPDATE_MOVED_TO_RELPATH));
- SVN_ERR(svn_sqlite__bindf(stmt, "isis",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isds",
wcroot->wc_id,
child_moved_from_relpath,
op_depth,
@@ -6349,12 +6414,12 @@ delete_update_movedto(svn_wc__db_wcroot_
struct op_delete_baton_t {
- apr_int64_t delete_depth; /* op-depth for root of delete */
+ int delete_depth; /* op-depth for root of delete */
const char *moved_to_relpath; /* NULL if delete is not part of a move */
};
/* This structure is used while rewriting move information for nodes.
- *
+ *
* The most simple case of rewriting move information happens when
* a moved-away subtree is moved again: mv A B; mv B C
* The second move requires rewriting moved-to info at or within A.
@@ -6381,7 +6446,7 @@ struct moved_node_t {
const char *moved_to_relpath;
/* The op-depth of the deleted node at the source of the move. */
- apr_int64_t op_depth;
+ int op_depth;
};
static svn_error_t *
@@ -6395,7 +6460,7 @@ delete_node(void *baton,
svn_boolean_t have_row, op_root;
svn_boolean_t add_work = FALSE;
svn_sqlite__stmt_t *stmt;
- apr_int64_t select_depth; /* Depth of what is to be deleted */
+ int select_depth; /* Depth of what is to be deleted */
svn_boolean_t refetch_depth = FALSE;
svn_kind_t kind;
apr_array_header_t *moved_nodes = NULL;
@@ -6412,24 +6477,44 @@ delete_node(void *baton,
|| status == svn_wc__db_status_not_present)
return SVN_NO_ERROR;
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_HAS_SERVER_EXCLUDED_NODES));
- SVN_ERR(svn_sqlite__bindf(stmt, "is",
- wcroot->wc_id, local_relpath));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (have_row)
+ /* Don't copy BASE directories with server excluded nodes */
+ if (status == svn_wc__db_status_normal && kind == svn_kind_dir)
{
- const char *absent_path = svn_sqlite__column_text(stmt, 0, scratch_pool);
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_HAS_SERVER_EXCLUDED_DESCENDANTS));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is",
+ wcroot->wc_id, local_relpath));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ if (have_row)
+ {
+ const char *absent_path = svn_sqlite__column_text(stmt, 0,
+ scratch_pool);
- return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS,
+ return svn_error_createf(
+ SVN_ERR_WC_PATH_UNEXPECTED_STATUS,
svn_sqlite__reset(stmt),
_("Cannot delete '%s' as '%s' is excluded by server"),
path_for_error_message(wcroot, local_relpath,
scratch_pool),
path_for_error_message(wcroot, absent_path,
scratch_pool));
+ }
+ SVN_ERR(svn_sqlite__reset(stmt));
+ }
+ else if (status == svn_wc__db_status_server_excluded)
+ {
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("Cannot delete '%s' as it is excluded by server"),
+ path_for_error_message(wcroot, local_relpath,
+ scratch_pool));
+ }
+ else if (status == svn_wc__db_status_excluded)
+ {
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("Cannot delete '%s' as it is excluded"),
+ path_for_error_message(wcroot, local_relpath,
+ scratch_pool));
}
- SVN_ERR(svn_sqlite__reset(stmt));
if (b->moved_to_relpath)
{
@@ -6483,7 +6568,7 @@ delete_node(void *baton,
= svn_sqlite__column_text(stmt, 1, NULL);
const char *child_moved_to_subtree_relpath
= svn_relpath_skip_ancestor(local_relpath, child_moved_to);
- apr_int64_t child_op_depth = svn_sqlite__column_int64(stmt, 2);
+ int child_op_depth = svn_sqlite__column_int(stmt, 2);
moved_node = apr_palloc(scratch_pool,
sizeof(struct moved_node_t));
@@ -6606,19 +6691,22 @@ delete_node(void *baton,
else
{
add_work = TRUE;
- SVN_ERR(op_depth_of(&select_depth, wcroot, local_relpath));
+ if (status != svn_wc__db_status_normal)
+ SVN_ERR(op_depth_of(&select_depth, wcroot, local_relpath));
+ else
+ select_depth = 0; /* Deleting BASE node */
}
/* ### Put actual-only nodes into the list? */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_INSERT_DELETE_LIST));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd",
wcroot->wc_id, local_relpath, select_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_NODES_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isi",
+ STMT_DELETE_NODES_ABOVE_DEPTH_RECURSIVE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd",
wcroot->wc_id, local_relpath, b->delete_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
@@ -6652,7 +6740,7 @@ delete_node(void *baton,
/* Delete the node and possible descendants. */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_INSERT_DELETE_FROM_NODE_RECURSIVE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isii",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdd",
wcroot->wc_id, local_relpath,
select_depth, b->delete_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
@@ -6961,10 +7049,10 @@ read_info(svn_wc__db_status_t *status,
if (have_info)
{
- apr_int64_t op_depth;
+ int op_depth;
svn_kind_t node_kind;
- op_depth = svn_sqlite__column_int64(stmt_info, 0);
+ op_depth = svn_sqlite__column_int(stmt_info, 0);
node_kind = svn_sqlite__column_token(stmt_info, 4, kind_map);
if (status)
@@ -7138,7 +7226,7 @@ read_info(svn_wc__db_status_t *status,
if (err || !have_info)
break;
- op_depth = svn_sqlite__column_int64(stmt_info, 0);
+ op_depth = svn_sqlite__column_int(stmt_info, 0);
if (have_more_work)
{
@@ -7364,7 +7452,7 @@ struct read_children_info_baton_t
struct read_children_info_item_t
{
struct svn_wc__db_info_t info;
- apr_int64_t op_depth;
+ int op_depth;
int nr_layers;
};
@@ -7397,7 +7485,7 @@ read_children_info(void *baton,
const char *child_relpath = svn_sqlite__column_text(stmt, 19, NULL);
const char *name = svn_relpath_basename(child_relpath, NULL);
svn_error_t *err;
- apr_int64_t op_depth;
+ int op_depth;
svn_boolean_t new_child;
child_item = apr_hash_get(nodes, name, APR_HASH_KEY_STRING);
@@ -7552,7 +7640,7 @@ read_children_info(void *baton,
child_item->info.have_more_work = (child_item->nr_layers > 1);
/* Moved-to can only exist at op_depth > 0. */
- moved_to_relpath = svn_sqlite__column_text(stmt, 21, NULL);
+ moved_to_relpath = svn_sqlite__column_text(stmt, 21, NULL);
if (moved_to_relpath)
child_item->info.moved_to_abspath =
svn_dirent_join(wcroot->abspath, moved_to_relpath, result_pool);
@@ -7674,7 +7762,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
svn_error_t *err = NULL;
- apr_int64_t op_depth;
+ int op_depth;
svn_wc__db_status_t raw_status;
svn_kind_t node_kind;
@@ -7702,14 +7790,14 @@ svn_wc__db_read_pristine_info(svn_wc__db
scratch_pool));
}
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
raw_status = svn_sqlite__column_token(stmt, 3, presence_map);
if (op_depth > 0 && raw_status == svn_wc__db_status_base_deleted)
{
SVN_ERR(svn_sqlite__step_row(stmt));
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
raw_status = svn_sqlite__column_token(stmt, 3, presence_map);
}
@@ -7835,7 +7923,7 @@ svn_wc__db_read_children_walker_info(apr
struct svn_wc__db_walker_info_t *child;
const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
const char *name = svn_relpath_basename(child_relpath, NULL);
- apr_int64_t op_depth = svn_sqlite__column_int(stmt, 1);
+ int op_depth = svn_sqlite__column_int(stmt, 1);
svn_error_t *err;
child = apr_palloc(result_pool, sizeof(*child));
@@ -8056,7 +8144,10 @@ read_url(const char **url,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- struct read_url_baton_t rub = { url, result_pool };
+ struct read_url_baton_t rub;
+
+ rub.url = url;
+ rub.result_pool = result_pool;
SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, read_url_txn, &rub,
scratch_pool));
@@ -8096,7 +8187,6 @@ svn_wc__db_read_url(const char **url,
typedef struct cache_props_baton_t
{
svn_depth_t depth;
- svn_boolean_t base_props;
svn_boolean_t pristine;
const apr_array_header_t *changelists;
svn_cancel_func_t cancel_func;
@@ -8118,31 +8208,17 @@ cache_props_recursive(void *cb_baton,
baton->changelists, scratch_pool));
SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
- STMT_CREATE_NODE_PROPS_CACHE));
+ STMT_CREATE_TARGET_PROP_CACHE));
- if (baton->base_props)
- stmt_idx = STMT_CACHE_NODE_BASE_PROPS;
- else if (baton->pristine)
- stmt_idx = STMT_CACHE_NODE_PRISTINE_PROPS;
+ if (baton->pristine)
+ stmt_idx = STMT_CACHE_TARGET_PRISTINE_PROPS;
else
- stmt_idx = STMT_CACHE_NODE_PROPS;
+ stmt_idx = STMT_CACHE_TARGET_PROPS;
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
SVN_ERR(svn_sqlite__bind_int64(stmt, 1, wcroot->wc_id));
SVN_ERR(svn_sqlite__step_done(stmt));
- /* ACTUAL props aren't relevant in the pristine case. */
- if (baton->base_props || baton->pristine)
- return SVN_NO_ERROR;
-
- if (baton->cancel_func)
- SVN_ERR(baton->cancel_func(baton->cancel_baton));
-
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_CACHE_ACTUAL_PROPS));
- SVN_ERR(svn_sqlite__bind_int64(stmt, 1, wcroot->wc_id));
- SVN_ERR(svn_sqlite__step_done(stmt));
-
return SVN_NO_ERROR;
}
@@ -8151,7 +8227,6 @@ svn_error_t *
svn_wc__db_read_props_streamily(svn_wc__db_t *db,
const char *local_abspath,
svn_depth_t depth,
- svn_boolean_t base_props,
svn_boolean_t pristine,
const apr_array_header_t *changelists,
svn_wc__proplist_receiver_t receiver_func,
@@ -8166,6 +8241,7 @@ svn_wc__db_read_props_streamily(svn_wc__
cache_props_baton_t baton;
svn_boolean_t have_row;
apr_pool_t *iterpool;
+ svn_error_t *err = NULL;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
SVN_ERR_ASSERT(receiver_func);
@@ -8179,7 +8255,6 @@ svn_wc__db_read_props_streamily(svn_wc__
VERIFY_USABLE_WCROOT(wcroot);
baton.depth = depth;
- baton.base_props = base_props;
baton.pristine = pristine;
baton.changelists = changelists;
baton.cancel_func = cancel_func;
@@ -8196,21 +8271,22 @@ svn_wc__db_read_props_streamily(svn_wc__
iterpool = svn_pool_create(scratch_pool);
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_RELEVANT_PROPS_FROM_CACHE));
+ STMT_SELECT_ALL_TARGET_PROP_CACHE));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
- while (have_row)
+ while (!err && have_row)
{
apr_hash_t *props;
svn_pool_clear(iterpool);
+ SVN_ERR(svn_sqlite__column_properties(&props, stmt, 1, iterpool,
+ iterpool));
+
/* see if someone wants to cancel this operation. */
if (cancel_func)
- SVN_ERR(cancel_func(cancel_baton));
+ err = cancel_func(cancel_baton);
- SVN_ERR(svn_sqlite__column_properties(&props, stmt, 1, iterpool,
- iterpool));
- if (props && apr_hash_count(props) != 0)
+ if (!err && props && apr_hash_count(props) != 0)
{
const char *child_relpath;
const char *child_abspath;
@@ -8219,19 +8295,20 @@ svn_wc__db_read_props_streamily(svn_wc__
child_abspath = svn_dirent_join(wcroot->abspath,
child_relpath, iterpool);
- SVN_ERR(receiver_func(receiver_baton, child_abspath, props,
- iterpool));
+ err = receiver_func(receiver_baton, child_abspath, props, iterpool);
}
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ err = svn_error_compose_create(err, svn_sqlite__step(&have_row, stmt));
}
- SVN_ERR(svn_sqlite__reset(stmt));
+ err = svn_error_compose_create(err, svn_sqlite__reset(stmt));
svn_pool_destroy(iterpool);
- SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
- STMT_DROP_NODE_PROPS_CACHE));
+ SVN_ERR(svn_error_compose_create(
+ err,
+ svn_sqlite__exec_statements(wcroot->sdb,
+ STMT_DROP_TARGET_PROP_CACHE)));
return SVN_NO_ERROR;
}
@@ -8404,6 +8481,66 @@ svn_wc__db_read_pristine_props(apr_hash_
return SVN_NO_ERROR;
}
+svn_error_t *
+svn_wc__db_prop_retrieve_recursive(apr_hash_t **values,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *propname,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_wc__db_wcroot_t *wcroot;
+ const char *local_relpath;
+ svn_sqlite__stmt_t *stmt;
+ svn_boolean_t have_row;
+ apr_pool_t *iterpool;
+
+ SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
+ SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
+ local_abspath, scratch_pool, scratch_pool));
+ VERIFY_USABLE_WCROOT(wcroot);
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_CURRENT_PROPS_RECURSIVE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+
+ *values = apr_hash_make(result_pool);
+
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ iterpool = svn_pool_create(scratch_pool);
+ while (have_row)
+ {
+ apr_hash_t *node_props;
+ svn_string_t *value;
+
+ svn_pool_clear(iterpool);
+
+ SVN_ERR(svn_sqlite__column_properties(&node_props, stmt, 0,
+ iterpool, iterpool));
+
+ value = (node_props
+ ? apr_hash_get(node_props, propname, APR_HASH_KEY_STRING)
+ : NULL);
+
+ if (value)
+ {
+ apr_hash_set(*values,
+ svn_dirent_join(wcroot->abspath,
+ svn_sqlite__column_text(stmt, 1, NULL),
+ result_pool),
+ APR_HASH_KEY_STRING,
+ svn_string_dup(value, result_pool));
+ }
+
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ }
+
+ svn_pool_destroy(iterpool);
+
+ return svn_error_trace(svn_sqlite__reset(stmt));
+}
+
svn_error_t *
svn_wc__db_read_children_of_working_node(const apr_array_header_t **children,
@@ -8445,7 +8582,7 @@ check_replace_txn(void *baton,
struct check_replace_baton *crb = baton;
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
- apr_int64_t replaced_op_depth;
+ int replaced_op_depth;
svn_wc__db_status_t replaced_status;
/* Our caller initialized the output values in crb to FALSE */
@@ -8489,18 +8626,18 @@ check_replace_txn(void *baton,
&& replaced_status != svn_wc__db_status_base_deleted)
crb->is_replace = TRUE;
- replaced_op_depth = svn_sqlite__column_int64(stmt, 0);
+ replaced_op_depth = svn_sqlite__column_int(stmt, 0);
if (crb->base_replace)
{
- apr_int64_t op_depth = svn_sqlite__column_int64(stmt, 0);
+ int op_depth = svn_sqlite__column_int(stmt, 0);
while (op_depth != 0 && have_row)
{
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
}
if (have_row && op_depth == 0)
@@ -8520,7 +8657,7 @@ check_replace_txn(void *baton,
if (replaced_status != svn_wc__db_status_base_deleted)
{
- apr_int64_t parent_op_depth;
+ int parent_op_depth;
/* Check the current op-depth of the parent to see if we are a replacement
root */
@@ -8530,7 +8667,7 @@ check_replace_txn(void *baton,
SVN_ERR(svn_sqlite__step_row(stmt)); /* Parent must exist as 'normal' */
- parent_op_depth = svn_sqlite__column_int64(stmt, 0);
+ parent_op_depth = svn_sqlite__column_int(stmt, 0);
if (parent_op_depth >= replaced_op_depth)
{
@@ -8544,7 +8681,7 @@ check_replace_txn(void *baton,
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
- parent_op_depth = svn_sqlite__column_int64(stmt, 0);
+ parent_op_depth = svn_sqlite__column_int(stmt, 0);
SVN_ERR(svn_sqlite__reset(stmt));
@@ -8831,7 +8968,7 @@ determine_repos_info(apr_int64_t *repos_
static svn_error_t *
descendant_commit(svn_wc__db_wcroot_t *wcroot,
const char *parent_local_relpath,
- apr_int64_t op_depth,
+ int op_depth,
apr_int64_t repos_id,
const char *parent_repos_relpath,
svn_revnum_t revision,
@@ -8858,7 +8995,7 @@ descendant_commit(svn_wc__db_wcroot_t *w
local_relpath = svn_relpath_join(parent_local_relpath, name, iterpool);
repos_relpath = svn_relpath_join(parent_repos_relpath, name, iterpool);
- SVN_ERR(svn_sqlite__bindf(stmt, "isiisr",
+ SVN_ERR(svn_sqlite__bindf(stmt, "isdisr",
wcroot->wc_id,
local_relpath,
op_depth,
@@ -8910,7 +9047,7 @@ commit_node(void *baton,
svn_sqlite__stmt_t *stmt;
apr_int64_t repos_id;
const char *repos_relpath;
- apr_int64_t op_depth;
+ int op_depth;
svn_wc__db_status_t old_presence;
/* If we are adding a file or directory, then we need to get
@@ -8937,7 +9074,7 @@ commit_node(void *baton,
/* There should be something to commit! */
- op_depth = svn_sqlite__column_int64(stmt_info, 0);
+ op_depth = svn_sqlite__column_int(stmt_info, 0);
/* Figure out the new node's kind. It will be whatever is in WORKING_NODE,
or there will be a BASE_NODE that has it. */
@@ -9011,7 +9148,7 @@ commit_node(void *baton,
STMT_DELETE_SHADOWED_RECURSIVE));
SVN_ERR(svn_sqlite__bindf(stmt,
- "isi",
+ "isd",
wcroot->wc_id,
local_relpath,
op_depth));
@@ -9680,7 +9817,7 @@ get_moved_from_info(svn_wc__db_status_t
const char **moved_from_relpath,
const char **moved_from_op_root_relpath,
const char *moved_to_op_root_relpath,
- apr_int64_t *op_depth,
+ int *op_depth,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
apr_pool_t *result_pool,
@@ -9717,7 +9854,7 @@ get_moved_from_info(svn_wc__db_status_t
*status = svn_wc__db_status_moved_here;
if (op_depth)
- *op_depth = svn_sqlite__column_int64(stmt, 1);
+ *op_depth = svn_sqlite__column_int(stmt, 1);
if (moved_from_relpath || moved_from_op_root_relpath)
{
@@ -9780,7 +9917,7 @@ struct scan_addition_baton_t
svn_revnum_t *original_revision;
const char **moved_from_relpath;
const char **moved_from_op_root_relpath;
- apr_int64_t *moved_from_op_depth;
+ int *moved_from_op_depth;
apr_pool_t *result_pool;
};
@@ -9817,7 +9954,7 @@ scan_addition_txn(void *baton,
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
svn_wc__db_status_t presence;
- apr_int64_t op_depth;
+ int op_depth;
const char *repos_prefix_path = "";
int i;
@@ -9843,7 +9980,7 @@ scan_addition_txn(void *baton,
presence = svn_sqlite__column_token(stmt, 1, presence_map);
/* The starting node should exist normally. */
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
if (op_depth == 0 || (presence != svn_wc__db_status_normal
&& presence != svn_wc__db_status_incomplete))
/* reset the statement as part of the error generation process */
@@ -9870,7 +10007,7 @@ scan_addition_txn(void *baton,
/* Calculate the op root local path components */
op_root_relpath = local_relpath;
- for (i = (int)relpath_depth(local_relpath); i > op_depth; --i)
+ for (i = relpath_depth(local_relpath); i > op_depth; --i)
{
/* Calculate the path of the operation root */
repos_prefix_path =
@@ -9955,7 +10092,7 @@ scan_addition_txn(void *baton,
/* ### This loop here is to skip up to the first node which is a BASE node,
- because base_get_info() doesn't accomodate the scenario that
+ because base_get_info() doesn't accommodate the scenario that
we're looking at here; we found the true op_root, which may be inside
further changed trees. */
while (TRUE)
@@ -9977,10 +10114,10 @@ scan_addition_txn(void *baton,
if (! have_row)
break;
- op_depth = svn_sqlite__column_int64(stmt, 0);
+ op_depth = svn_sqlite__column_int(stmt, 0);
/* Skip to op_depth */
- for (i = (int)relpath_depth(op_root_relpath); i > op_depth; i--)
+ for (i = relpath_depth(op_root_relpath); i > op_depth; i--)
{
/* Calculate the path of the operation root */
repos_prefix_path =
@@ -10065,7 +10202,7 @@ scan_addition(svn_wc__db_status_t *statu
svn_revnum_t *original_revision,
const char **moved_from_relpath,
const char **moved_from_op_root_relpath,
- apr_int64_t *moved_from_op_depth,
+ int *moved_from_op_depth,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
apr_pool_t *result_pool,
@@ -10168,6 +10305,175 @@ svn_wc__db_scan_addition(svn_wc__db_stat
return SVN_NO_ERROR;
}
+static svn_error_t *
+follow_moved_to(apr_array_header_t **moved_tos,
+ int op_depth,
+ const char *repos_path,
+ svn_revnum_t revision,
+ svn_wc__db_wcroot_t *wcroot,
+ const char *local_relpath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_sqlite__stmt_t *stmt;
+ svn_boolean_t have_row;
+ int working_op_depth;
+ const char *ancestor_relpath, *node_moved_to = NULL;
+ int i;
+
+ SVN_ERR_ASSERT((!op_depth && !repos_path) || (op_depth && repos_path));
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_OP_DEPTH_MOVED_TO));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
+ op_depth));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ if (have_row)
+ {
+ working_op_depth = svn_sqlite__column_int(stmt, 0);
+ node_moved_to = svn_sqlite__column_text(stmt, 1, result_pool);
+ if (!repos_path)
+ {
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ if (!have_row || svn_sqlite__column_revnum(stmt, 0))
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
+ svn_sqlite__reset(stmt),
+ _("The base node '%s' was not found."),
+ path_for_error_message(wcroot,
+ local_relpath,
+ scratch_pool));
+ repos_path = svn_sqlite__column_text(stmt, 2, scratch_pool);
+ revision = svn_sqlite__column_revnum(stmt, 3);
+ }
+ }
+ SVN_ERR(svn_sqlite__reset(stmt));
+
+ if (node_moved_to)
+ {
+ svn_boolean_t have_row2;
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_MOVED_HERE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, node_moved_to,
+ relpath_depth(node_moved_to)));
+ SVN_ERR(svn_sqlite__step(&have_row2, stmt));
+ if (!have_row2 || !svn_sqlite__column_int(stmt, 0)
+ || revision != svn_sqlite__column_revnum(stmt, 3)
+ || strcmp(repos_path, svn_sqlite__column_text(stmt, 2, NULL)))
+ node_moved_to = NULL;
+ SVN_ERR(svn_sqlite__reset(stmt));
+ }
+
+ if (node_moved_to)
+ {
+ struct svn_wc__db_moved_to_t *moved_to;
+
+ moved_to = apr_palloc(result_pool, sizeof(*moved_to));
+ moved_to->op_depth = working_op_depth;
+ moved_to->local_relpath = node_moved_to;
+ APR_ARRAY_PUSH(*moved_tos, struct svn_wc__db_moved_to_t *) = moved_to;
+ }
+
+ /* A working row with moved_to, or no working row, and we are done. */
+ if (node_moved_to || !have_row)
+ return SVN_NO_ERROR;
+
+ /* Need to handle being moved via an ancestor. */
+ ancestor_relpath = local_relpath;
+ for (i = relpath_depth(local_relpath); i > working_op_depth; --i)
+ {
+ const char *ancestor_moved_to;
+
+ ancestor_relpath = svn_relpath_dirname(ancestor_relpath, scratch_pool);
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_MOVED_TO));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, ancestor_relpath,
+ working_op_depth));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ SVN_ERR_ASSERT(have_row);
+ ancestor_moved_to = svn_sqlite__column_text(stmt, 0, scratch_pool);
+ SVN_ERR(svn_sqlite__reset(stmt));
+ if (ancestor_moved_to)
+ {
+ node_moved_to
+ = svn_relpath_join(ancestor_moved_to,
+ svn_relpath_skip_ancestor(ancestor_relpath,
+ local_relpath),
+ result_pool);
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_MOVED_HERE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, node_moved_to,
+ relpath_depth(ancestor_moved_to)));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ if (!have_row)
+ ancestor_moved_to = NULL;
+ else if (!svn_sqlite__column_int(stmt, 0))
+ {
+ svn_wc__db_status_t presence
+ = svn_sqlite__column_token(stmt, 1, presence_map);
+ if (presence != svn_wc__db_status_not_present)
+ ancestor_moved_to = NULL;
+ else
+ {
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ if (!have_row && !svn_sqlite__column_int(stmt, 0))
+ ancestor_moved_to = NULL;
+ }
+ }
+ SVN_ERR(svn_sqlite__reset(stmt));
+ if (!ancestor_moved_to)
+ break;
+ /* verify repos_path points back? */
+ }
+ if (ancestor_moved_to)
+ {
+ struct svn_wc__db_moved_to_t *moved_to;
+
+ moved_to = apr_palloc(result_pool, sizeof(*moved_to));
+ moved_to->op_depth = working_op_depth;
+ moved_to->local_relpath = node_moved_to;
+ APR_ARRAY_PUSH(*moved_tos, struct svn_wc__db_moved_to_t *) = moved_to;
+
+ SVN_ERR(follow_moved_to(moved_tos, relpath_depth(ancestor_moved_to),
+ repos_path, revision, wcroot, node_moved_to,
+ result_pool, scratch_pool));
+ break;
+ }
+ }
+
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__db_follow_moved_to(apr_array_header_t **moved_tos,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_wc__db_wcroot_t *wcroot;
+ const char *local_relpath;
+
+ SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
+ SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
+ local_abspath, scratch_pool, scratch_pool));
+ VERIFY_USABLE_WCROOT(wcroot);
+
+ *moved_tos = apr_array_make(result_pool, 0,
+ sizeof(struct svn_wc__db_moved_to_t *));
+
+ /* ### Wrap in a transaction */
+ SVN_ERR(follow_moved_to(moved_tos, 0, NULL, SVN_INVALID_REVNUM,
+ wcroot, local_relpath,
+ result_pool, scratch_pool));
+
+ /* ### Convert moved_to to abspath */
+
+ return SVN_NO_ERROR;
+}
struct scan_deletion_baton_t
{
@@ -10189,12 +10495,12 @@ get_moved_to(struct scan_deletion_baton_
const char *local_relpath,
apr_pool_t *scratch_pool)
{
- const char *moved_to_relpath = svn_sqlite__column_text(stmt, 2, NULL);
+ const char *moved_to_relpath = svn_sqlite__column_text(stmt, 3, NULL);
if (moved_to_relpath)
{
const char *moved_to_op_root_relpath = moved_to_relpath;
-
+
if (strcmp(current_relpath, local_relpath))
{
/* LOCAL_RELPATH is a child inside the move op-root. */
@@ -10238,7 +10544,7 @@ scan_deletion_txn(void *baton,
svn_sqlite__stmt_t *stmt;
svn_wc__db_status_t work_presence;
svn_boolean_t have_row, scan, have_base;
- apr_int64_t op_depth;
+ int op_depth;
/* Initialize all the OUT parameters. */
if (sd_baton->base_del_relpath != NULL)
@@ -10255,8 +10561,11 @@ scan_deletion_txn(void *baton,
check op-roots and parents of op-roots. */
scan = (sd_baton->moved_to_op_root_relpath || sd_baton->moved_to_relpath);
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_DELETION_INFO));
+ SVN_ERR(svn_sqlite__get_statement(
+ &stmt, wcroot->sdb,
+ scan ? STMT_SELECT_DELETION_INFO_SCAN
+ : STMT_SELECT_DELETION_INFO));
+
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, current_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (!have_row)
@@ -10275,7 +10584,7 @@ scan_deletion_txn(void *baton,
path_for_error_message(wcroot, local_relpath,
scratch_pool));
- op_depth = svn_sqlite__column_int64(stmt, 3);
+ op_depth = svn_sqlite__column_int(stmt, 2);
/* Special case: LOCAL_RELPATH not-present within a WORKING tree, we
treat this as an op-root. At commit time we need to explicitly
@@ -10300,7 +10609,7 @@ scan_deletion_txn(void *baton,
{
svn_error_t *err;
const char *parent_relpath;
- apr_int64_t current_depth = relpath_depth(current_relpath);
+ int current_depth = relpath_depth(current_relpath);
/* Step CURRENT_RELPATH to op-root */
@@ -10329,8 +10638,6 @@ scan_deletion_txn(void *baton,
if (scan || current_depth == op_depth)
{
SVN_ERR(svn_sqlite__reset(stmt));
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_DELETION_INFO));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
current_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
@@ -10341,11 +10648,9 @@ scan_deletion_txn(void *baton,
SVN_ERR(svn_sqlite__reset(stmt));
/* Now CURRENT_RELPATH is an op-root, have a look at the parent. */
-
+
SVN_ERR_ASSERT(current_relpath[0] != '\0'); /* Catch invalid data */
parent_relpath = svn_relpath_dirname(current_relpath, scratch_pool);
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_DELETION_INFO));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, parent_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (!have_row)
@@ -10371,7 +10676,7 @@ scan_deletion_txn(void *baton,
}
current_relpath = parent_relpath;
- op_depth = svn_sqlite__column_int64(stmt, 3);
+ op_depth = svn_sqlite__column_int(stmt, 2);
have_base = !svn_sqlite__column_is_null(stmt, 0);
}
@@ -10480,6 +10785,7 @@ svn_wc__db_upgrade_begin(svn_sqlite__db_
SVN_ERR(create_db(sdb, repos_id, wc_id, dir_abspath,
repos_root_url, repos_uuid,
SDB_FILE,
+ NULL, SVN_INVALID_REVNUM, svn_depth_unknown,
wc_db->state_pool, scratch_pool));
SVN_ERR(svn_wc__db_pdh_create_wcroot(&wcroot,
@@ -10550,8 +10856,8 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
{
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
- apr_int64_t top_op_depth = -1;
- apr_int64_t below_op_depth = -1;
+ int top_op_depth = -1;
+ int below_op_depth = -1;
svn_wc__db_status_t top_presence;
svn_wc__db_status_t below_presence;
int affected_rows;
@@ -10588,12 +10894,12 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
{
- top_op_depth = svn_sqlite__column_int64(stmt, 0);
+ top_op_depth = svn_sqlite__column_int(stmt, 0);
top_presence = svn_sqlite__column_token(stmt, 3, presence_map);
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row)
{
- below_op_depth = svn_sqlite__column_int64(stmt, 0);
+ below_op_depth = svn_sqlite__column_int(stmt, 0);
below_presence = svn_sqlite__column_token(stmt, 3, presence_map);
}
}
@@ -10638,7 +10944,7 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
{
[... 520 lines stripped ...]