You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/01/06 03:33:39 UTC
svn commit: r1429457 [8/21] - in /subversion/branches/tree-read-api: ./
build/ build/ac-macros/ build/generator/templates/ build/win32/
contrib/server-side/svncutter/ doc/ subversion/bindings/cxxhl/include/
subversion/bindings/cxxhl/include/svncxxhl/ s...
Modified: subversion/branches/tree-read-api/subversion/libsvn_subr/skel.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_subr/skel.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_subr/skel.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_subr/skel.c Sun Jan 6 02:33:34 2013
@@ -784,7 +784,7 @@ svn_skel__parse_prop(svn_string_t **prop
svn_error_t *
svn_skel__unparse_proplist(svn_skel_t **skel_p,
- apr_hash_t *proplist,
+ const apr_hash_t *proplist,
apr_pool_t *pool)
{
svn_skel_t *skel = svn_skel__make_empty_list(pool);
@@ -794,7 +794,8 @@ svn_skel__unparse_proplist(svn_skel_t **
if (proplist)
{
/* Loop over hash entries */
- for (hi = apr_hash_first(pool, proplist); hi; hi = apr_hash_next(hi))
+ for (hi = apr_hash_first(pool, (apr_hash_t *)proplist); hi;
+ hi = apr_hash_next(hi))
{
const void *key;
void *val;
@@ -823,7 +824,8 @@ svn_skel__unparse_proplist(svn_skel_t **
svn_error_t *
svn_skel__unparse_iproplist(svn_skel_t **skel_p,
const apr_array_header_t *inherited_props,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
svn_skel_t *skel = svn_skel__make_empty_list(result_pool);
@@ -832,7 +834,6 @@ svn_skel__unparse_iproplist(svn_skel_t *
{
int i;
apr_hash_index_t *hi;
- apr_pool_t *subpool = svn_pool_create(result_pool);
for (i = 0; i < inherited_props->nelts; i++)
{
@@ -842,10 +843,8 @@ svn_skel__unparse_iproplist(svn_skel_t *
svn_skel_t *skel_list = svn_skel__make_empty_list(result_pool);
svn_skel_t *skel_atom;
- svn_pool_clear(subpool);
-
/* Loop over hash entries */
- for (hi = apr_hash_first(subpool, iprop->prop_hash);
+ for (hi = apr_hash_first(scratch_pool, iprop->prop_hash);
hi;
hi = apr_hash_next(hi))
{
@@ -871,7 +870,6 @@ svn_skel__unparse_iproplist(svn_skel_t *
svn_skel__append(skel, skel_atom);
svn_skel__append(skel, skel_list);
}
- svn_pool_destroy(subpool);
}
/* Validate and return the skel. */
Modified: subversion/branches/tree-read-api/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_subr/sqlite.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_subr/sqlite.c Sun Jan 6 02:33:34 2013
@@ -43,14 +43,17 @@
#endif
#ifdef SVN_SQLITE_INLINE
-/* Include sqlite3 inline, making all symbols private. */
- #define SQLITE_API static
- #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
- #pragma GCC diagnostic ignored "-Wunused-function"
- #endif
- #include <sqlite3.c>
+/* Import the sqlite3 API vtable from sqlite3wrapper.c */
+# define SQLITE_OMIT_DEPRECATED
+# include <sqlite3ext.h>
+extern const sqlite3_api_routines *const svn_sqlite3__api_funcs;
+extern int (*const svn_sqlite3__api_initialize)(void);
+extern int (*const svn_sqlite3__api_config)(int, ...);
+# define sqlite3_api svn_sqlite3__api_funcs
+# define sqlite3_initialize svn_sqlite3__api_initialize
+# define sqlite3_config svn_sqlite3__api_config
#else
- #include <sqlite3.h>
+# include <sqlite3.h>
#endif
#if !SQLITE_VERSION_AT_LEAST(3,7,12)
@@ -469,8 +472,7 @@ svn_sqlite__bind_properties(svn_sqlite__
if (props == NULL)
return svn_error_trace(svn_sqlite__bind_blob(stmt, slot, NULL, 0));
- SVN_ERR(svn_skel__unparse_proplist(&skel, (apr_hash_t *)props,
- scratch_pool));
+ SVN_ERR(svn_skel__unparse_proplist(&skel, props, scratch_pool));
properties = svn_skel__unparse(skel, scratch_pool);
return svn_error_trace(svn_sqlite__bind_blob(stmt,
slot,
@@ -491,7 +493,7 @@ svn_sqlite__bind_iprops(svn_sqlite__stmt
return svn_error_trace(svn_sqlite__bind_blob(stmt, slot, NULL, 0));
SVN_ERR(svn_skel__unparse_iproplist(&skel, inherited_props,
- scratch_pool));
+ scratch_pool, scratch_pool));
properties = svn_skel__unparse(skel, scratch_pool);
return svn_error_trace(svn_sqlite__bind_blob(stmt,
slot,
@@ -579,6 +581,21 @@ svn_sqlite__column_token(svn_sqlite__stm
return svn_token__from_word_strict(map, word);
}
+int
+svn_sqlite__column_token_null(svn_sqlite__stmt_t *stmt,
+ int column,
+ const svn_token_map_t *map,
+ int null_val)
+{
+ /* cast from 'unsigned char' to regular 'char' */
+ const char *word = (const char *)sqlite3_column_text(stmt->s3stmt, column);
+
+ if (!word)
+ return null_val;
+
+ return svn_token__from_word_strict(map, word);
+}
+
svn_error_t *
svn_sqlite__column_properties(apr_hash_t **props,
svn_sqlite__stmt_t *stmt,
@@ -975,18 +992,44 @@ reset_all_statements(svn_sqlite__db_t *d
return err;
}
-/* The body of svn_sqlite__with_transaction() and
- svn_sqlite__with_immediate_transaction(), which see. */
-static svn_error_t *
-with_transaction(svn_sqlite__db_t *db,
- svn_sqlite__transaction_callback_t cb_func,
- void *cb_baton,
- apr_pool_t *scratch_pool /* NULL allowed */)
+svn_error_t *
+svn_sqlite__begin_transaction(svn_sqlite__db_t *db)
{
svn_sqlite__stmt_t *stmt;
- svn_error_t *err;
- err = cb_func(cb_baton, db, scratch_pool);
+ SVN_ERR(get_internal_statement(&stmt, db,
+ STMT_INTERNAL_BEGIN_TRANSACTION));
+ SVN_ERR(svn_sqlite__step_done(stmt));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_sqlite__begin_immediate_transaction(svn_sqlite__db_t *db)
+{
+ svn_sqlite__stmt_t *stmt;
+
+ SVN_ERR(get_internal_statement(&stmt, db,
+ STMT_INTERNAL_BEGIN_IMMEDIATE_TRANSACTION));
+ SVN_ERR(svn_sqlite__step_done(stmt));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_sqlite__begin_savepoint(svn_sqlite__db_t *db)
+{
+ svn_sqlite__stmt_t *stmt;
+
+ SVN_ERR(get_internal_statement(&stmt, db,
+ STMT_INTERNAL_SAVEPOINT_SVN));
+ SVN_ERR(svn_sqlite__step_done(stmt));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_sqlite__finish_transaction(svn_sqlite__db_t *db,
+ svn_error_t *err)
+{
+ svn_sqlite__stmt_t *stmt;
/* Commit or rollback the sqlite transaction. */
if (err)
@@ -1034,46 +1077,10 @@ with_transaction(svn_sqlite__db_t *db,
}
svn_error_t *
-svn_sqlite__with_transaction(svn_sqlite__db_t *db,
- svn_sqlite__transaction_callback_t cb_func,
- void *cb_baton,
- apr_pool_t *scratch_pool /* NULL allowed */)
+svn_sqlite__finish_savepoint(svn_sqlite__db_t *db,
+ svn_error_t *err)
{
svn_sqlite__stmt_t *stmt;
- SVN_ERR(get_internal_statement(&stmt, db,
- STMT_INTERNAL_BEGIN_TRANSACTION));
- SVN_ERR(svn_sqlite__step_done(stmt));
- return svn_error_trace(with_transaction(db, cb_func, cb_baton,
- scratch_pool));
-}
-
-svn_error_t *
-svn_sqlite__with_immediate_transaction(
- svn_sqlite__db_t *db,
- svn_sqlite__transaction_callback_t cb_func,
- void *cb_baton,
- apr_pool_t *scratch_pool /* NULL allowed */)
-{
- svn_sqlite__stmt_t *stmt;
- SVN_ERR(get_internal_statement(&stmt, db,
- STMT_INTERNAL_BEGIN_IMMEDIATE_TRANSACTION));
- SVN_ERR(svn_sqlite__step_done(stmt));
- return svn_error_trace(with_transaction(db, cb_func, cb_baton,
- scratch_pool));
-}
-
-svn_error_t *
-svn_sqlite__with_lock(svn_sqlite__db_t *db,
- svn_sqlite__transaction_callback_t cb_func,
- void *cb_baton,
- apr_pool_t *scratch_pool)
-{
- svn_error_t *err;
- svn_sqlite__stmt_t *stmt;
-
- SVN_ERR(get_internal_statement(&stmt, db, STMT_INTERNAL_SAVEPOINT_SVN));
- SVN_ERR(svn_sqlite__step_done(stmt));
- err = cb_func(cb_baton, db, scratch_pool);
if (err)
{
@@ -1114,6 +1121,37 @@ svn_sqlite__with_lock(svn_sqlite__db_t *
}
svn_error_t *
+svn_sqlite__with_transaction(svn_sqlite__db_t *db,
+ svn_sqlite__transaction_callback_t cb_func,
+ void *cb_baton,
+ apr_pool_t *scratch_pool /* NULL allowed */)
+{
+ SVN_SQLITE__WITH_TXN(cb_func(cb_baton, db, scratch_pool), db);
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_sqlite__with_immediate_transaction(
+ svn_sqlite__db_t *db,
+ svn_sqlite__transaction_callback_t cb_func,
+ void *cb_baton,
+ apr_pool_t *scratch_pool /* NULL allowed */)
+{
+ SVN_SQLITE__WITH_IMMEDIATE_TXN(cb_func(cb_baton, db, scratch_pool), db);
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_sqlite__with_lock(svn_sqlite__db_t *db,
+ svn_sqlite__transaction_callback_t cb_func,
+ void *cb_baton,
+ apr_pool_t *scratch_pool /* NULL allowed */)
+{
+ SVN_SQLITE__WITH_LOCK(cb_func(cb_baton, db, scratch_pool), db);
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
svn_sqlite__hotcopy(const char *src_path,
const char *dst_path,
apr_pool_t *scratch_pool)
Modified: subversion/branches/tree-read-api/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_subr/stream.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_subr/stream.c Sun Jan 6 02:33:34 2013
@@ -847,7 +847,7 @@ svn_stream_open_readonly(svn_stream_t **
{
apr_file_t *file;
- SVN_ERR(svn_io_file_open(&file, path, APR_READ | APR_BUFFERED | APR_BINARY,
+ SVN_ERR(svn_io_file_open(&file, path, APR_READ | APR_BUFFERED,
APR_OS_DEFAULT, result_pool));
*stream = svn_stream_from_aprfile2(file, FALSE, result_pool);
@@ -866,7 +866,6 @@ svn_stream_open_writable(svn_stream_t **
SVN_ERR(svn_io_file_open(&file, path,
APR_WRITE
| APR_BUFFERED
- | APR_BINARY
| APR_CREATE
| APR_EXCL,
APR_OS_DEFAULT, result_pool));
Modified: subversion/branches/tree-read-api/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_subr/sysinfo.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_subr/sysinfo.c Sun Jan 6 02:33:34 2013
@@ -133,10 +133,14 @@ svn_sysinfo__linked_libs(apr_pool_t *poo
lib->compiled_version = APR_VERSION_STRING;
lib->runtime_version = apr_pstrdup(pool, apr_version_string());
+/* Don't list APR-Util if it isn't linked in, which it may not be if
+ * we're using APR 2.x+ which combined APR-Util into APR. */
+#ifdef APU_VERSION_STRING
lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
lib->name = "APR-Util";
lib->compiled_version = APU_VERSION_STRING;
lib->runtime_version = apr_pstrdup(pool, apu_version_string());
+#endif
lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
lib->name = "SQLite";
Modified: subversion/branches/tree-read-api/subversion/libsvn_subr/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_subr/version.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_subr/version.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_subr/version.c Sun Jan 6 02:33:34 2013
@@ -129,7 +129,7 @@ svn_version_extended(svn_boolean_t verbo
info->build_time = __TIME__;
info->build_host = SVN_BUILD_HOST;
info->copyright = apr_pstrdup
- (pool, _("Copyright (C) 2012 The Apache Software Foundation.\n"
+ (pool, _("Copyright (C) 2013 The Apache Software Foundation.\n"
"This software consists of contributions made by many people;\n"
"see the NOTICE file for more information.\n"
"Subversion is open source software, see "
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/adm_crawler.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/adm_crawler.c Sun Jan 6 02:33:34 2013
@@ -659,7 +659,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
&repos_relpath, &repos_root_url,
NULL, NULL, NULL, NULL, &target_depth,
NULL, NULL, &target_lock,
- NULL, NULL,
+ NULL, NULL, NULL,
db, local_abspath, scratch_pool,
scratch_pool);
@@ -807,7 +807,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
err = svn_wc__db_base_get_info(&parent_status, NULL, NULL,
&parent_repos_relpath, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL,
+ NULL, NULL, NULL,
db, parent_abspath,
scratch_pool, scratch_pool);
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/adm_files.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/adm_files.c Sun Jan 6 02:33:34 2013
@@ -175,7 +175,7 @@ svn_wc__text_base_path_to_read(const cha
const svn_checksum_t *checksum;
SVN_ERR(svn_wc__db_read_pristine_info(&status, &kind, NULL, NULL, NULL, NULL,
- &checksum, NULL, NULL,
+ &checksum, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool));
@@ -231,7 +231,7 @@ svn_wc__get_pristine_contents(svn_stream
*size = SVN_INVALID_FILESIZE;
SVN_ERR(svn_wc__db_read_pristine_info(&status, &kind, NULL, NULL, NULL, NULL,
- &sha1_checksum, NULL, NULL,
+ &sha1_checksum, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool));
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/adm_ops.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/adm_ops.c Sun Jan 6 02:33:34 2013
@@ -898,22 +898,41 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
/* Schedule the single node at LOCAL_ABSPATH, of kind KIND, for addition in
- * its parent directory in the WC. It will have no properties. */
+ * its parent directory in the WC. It will have the regular properties
+ * provided in PROPS, or none if that is NULL.
+ *
+ * If the node is a file, set its on-disk executable and read-only bits to
+ * match its properties and lock state,
+ * ### only if it has an svn:executable or svn:needs-lock property.
+ * ### This is to match the previous behaviour of setting its props
+ * afterwards by calling svn_wc_prop_set4(), but is not very clean.
+ *
+ * Sync the on-disk executable and read-only bits accordingly.
+ */
static svn_error_t *
add_from_disk(svn_wc__db_t *db,
const char *local_abspath,
svn_node_kind_t kind,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
+ const apr_hash_t *props,
apr_pool_t *scratch_pool)
{
if (kind == svn_node_file)
{
- SVN_ERR(svn_wc__db_op_add_file(db, local_abspath, NULL, scratch_pool));
+ svn_skel_t *work_item = NULL;
+
+ if (props && (svn_prop_get_value(props, SVN_PROP_EXECUTABLE)
+ || svn_prop_get_value(props, SVN_PROP_NEEDS_LOCK)))
+ SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, db, local_abspath,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(svn_wc__db_op_add_file(db, local_abspath, props, work_item,
+ scratch_pool));
+ if (work_item)
+ SVN_ERR(svn_wc__wq_run(db, local_abspath, NULL, NULL, scratch_pool));
}
else
{
- SVN_ERR(svn_wc__db_op_add_directory(db, local_abspath, NULL,
+ SVN_ERR(svn_wc__db_op_add_directory(db, local_abspath, props, NULL,
scratch_pool));
}
@@ -1275,7 +1294,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
if (!copyfrom_url) /* Case 2a: It's a simple add */
{
- SVN_ERR(add_from_disk(db, local_abspath, kind, notify_func, notify_baton,
+ SVN_ERR(add_from_disk(db, local_abspath, kind, NULL,
scratch_pool));
if (kind == svn_node_dir && !db_row_exists)
{
@@ -1348,11 +1367,12 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
svn_error_t *
-svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool)
+svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const apr_hash_t *props,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool)
{
svn_node_kind_t kind;
@@ -1360,8 +1380,21 @@ svn_wc_add_from_disk(svn_wc_context_t *w
NULL, SVN_INVALID_REVNUM, scratch_pool));
SVN_ERR(check_can_add_to_parent(NULL, NULL, wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));
- SVN_ERR(add_from_disk(wc_ctx->db, local_abspath, kind,
- notify_func, notify_baton,
+
+ /* Canonicalize and check the props */
+ if (props)
+ {
+ apr_hash_t *new_props;
+
+ SVN_ERR(svn_wc__canonicalize_props(
+ &new_props,
+ local_abspath, kind, props, FALSE /* skip_some_checks */,
+ scratch_pool, scratch_pool));
+ props = new_props;
+ }
+
+ /* Add to the DB and maybe update on-disk executable read-only bits */
+ SVN_ERR(add_from_disk(wc_ctx->db, local_abspath, kind, props,
scratch_pool));
/* Report the addition to the caller. */
@@ -1371,6 +1404,7 @@ svn_wc_add_from_disk(svn_wc_context_t *w
svn_wc_notify_add,
scratch_pool);
notify->kind = kind;
+ notify->mime_type = svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
(*notify_func)(notify_baton, notify, scratch_pool);
}
@@ -1581,12 +1615,17 @@ revert_restore_handle_copied_dirs(svn_bo
/* Make the working tree under LOCAL_ABSPATH to depth DEPTH match the
versioned tree. This function is called after svn_wc__db_op_revert
has done the database revert and created the revert list. Notifies
- for all paths equal to or below LOCAL_ABSPATH that are reverted. */
+ for all paths equal to or below LOCAL_ABSPATH that are reverted.
+
+ REVERT_ROOT is true for explicit revert targets and FALSE for targets
+ reached via recursion.
+ */
static svn_error_t *
revert_restore(svn_wc__db_t *db,
const char *local_abspath,
svn_depth_t depth,
svn_boolean_t use_commit_times,
+ svn_boolean_t revert_root,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -1600,17 +1639,38 @@ revert_restore(svn_wc__db_t *db,
svn_boolean_t notify_required;
const apr_array_header_t *conflict_files;
svn_filesize_t recorded_size;
- apr_time_t recorded_mod_time;
+ apr_time_t recorded_time;
apr_finfo_t finfo;
#ifdef HAVE_SYMLINK
svn_boolean_t special;
#endif
svn_boolean_t copied_here;
svn_kind_t reverted_kind;
+ svn_boolean_t is_wcroot;
if (cancel_func)
SVN_ERR(cancel_func(cancel_baton));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, scratch_pool));
+ if (is_wcroot && !revert_root)
+ {
+ /* Issue #4162: Obstructing working copy. We can't access the working
+ copy data from the parent working copy for this node by just using
+ local_abspath */
+
+ if (notify_func)
+ {
+ svn_wc_notify_t *notify = svn_wc_create_notify(
+ local_abspath,
+ svn_wc_notify_update_skip_obstruction,
+ scratch_pool);
+
+ notify_func(notify_baton, notify, scratch_pool);
+ }
+
+ return SVN_NO_ERROR; /* We don't revert obstructing working copies */
+ }
+
SVN_ERR(svn_wc__db_revert_list_read(¬ify_required,
&conflict_files,
&copied_here, &reverted_kind,
@@ -1620,7 +1680,7 @@ revert_restore(svn_wc__db_t *db,
err = svn_wc__db_read_info(&status, &kind,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- &recorded_size, &recorded_mod_time, NULL,
+ &recorded_size, &recorded_time, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
db, local_abspath, scratch_pool, scratch_pool);
@@ -1651,7 +1711,7 @@ revert_restore(svn_wc__db_t *db,
status = svn_wc__db_status_normal;
kind = svn_kind_unknown;
recorded_size = SVN_INVALID_FILESIZE;
- recorded_mod_time = 0;
+ recorded_time = 0;
}
}
else if (err)
@@ -1774,9 +1834,9 @@ revert_restore(svn_wc__db_t *db,
ourselves. And we already have everything we need, because
we called stat ourselves. */
if (recorded_size != SVN_INVALID_FILESIZE
- && recorded_mod_time != 0
+ && recorded_time != 0
&& recorded_size == finfo.size
- && recorded_mod_time == finfo.mtime)
+ && recorded_time == finfo.mtime)
{
modified = FALSE;
}
@@ -1923,7 +1983,7 @@ revert_restore(svn_wc__db_t *db,
iterpool);
SVN_ERR(revert_restore(db, child_abspath, depth,
- use_commit_times,
+ use_commit_times, FALSE /* revert root */,
cancel_func, cancel_baton,
notify_func, notify_baton,
iterpool));
@@ -1939,18 +1999,16 @@ revert_restore(svn_wc__db_t *db,
}
-/* Revert tree LOCAL_ABSPATH to depth DEPTH and notify for all
- reverts. */
-static svn_error_t *
-revert_internal(svn_wc__db_t *db,
- const char *local_abspath,
- svn_depth_t depth,
- svn_boolean_t use_commit_times,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool)
+svn_error_t *
+svn_wc__revert_internal(svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_depth_t depth,
+ svn_boolean_t use_commit_times,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool)
{
svn_error_t *err;
@@ -1977,7 +2035,7 @@ revert_internal(svn_wc__db_t *db,
if (!err)
err = revert_restore(db, local_abspath, depth,
- use_commit_times,
+ use_commit_times, TRUE /* revert root */,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool);
@@ -2015,11 +2073,11 @@ revert_changelist(svn_wc__db_t *db,
/* Revert this node (depth=empty) if it matches one of the changelists. */
if (svn_wc__internal_changelist_match(db, local_abspath, changelist_hash,
scratch_pool))
- SVN_ERR(revert_internal(db, local_abspath,
- svn_depth_empty, use_commit_times,
- cancel_func, cancel_baton,
- notify_func, notify_baton,
- scratch_pool));
+ SVN_ERR(svn_wc__revert_internal(db, local_abspath,
+ svn_depth_empty, use_commit_times,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ scratch_pool));
if (depth == svn_depth_empty)
return SVN_NO_ERROR;
@@ -2094,9 +2152,9 @@ revert_partial(svn_wc__db_t *db,
/* Revert the root node itself (depth=empty), then move on to the
children. */
- SVN_ERR(revert_internal(db, local_abspath, svn_depth_empty,
- use_commit_times, cancel_func, cancel_baton,
- notify_func, notify_baton, iterpool));
+ SVN_ERR(svn_wc__revert_internal(db, local_abspath, svn_depth_empty,
+ use_commit_times, cancel_func, cancel_baton,
+ notify_func, notify_baton, iterpool));
SVN_ERR(svn_wc__db_read_children_of_working_node(&children, db,
local_abspath,
@@ -2126,11 +2184,11 @@ revert_partial(svn_wc__db_t *db,
}
/* Revert just this node (depth=empty). */
- SVN_ERR(revert_internal(db, child_abspath,
- svn_depth_empty, use_commit_times,
- cancel_func, cancel_baton,
- notify_func, notify_baton,
- iterpool));
+ SVN_ERR(svn_wc__revert_internal(db, child_abspath,
+ svn_depth_empty, use_commit_times,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ iterpool));
}
svn_pool_destroy(iterpool);
@@ -2166,11 +2224,11 @@ svn_wc_revert4(svn_wc_context_t *wc_ctx,
}
if (depth == svn_depth_empty || depth == svn_depth_infinity)
- return svn_error_trace(revert_internal(wc_ctx->db, local_abspath,
- depth, use_commit_times,
- cancel_func, cancel_baton,
- notify_func, notify_baton,
- scratch_pool));
+ return svn_error_trace(svn_wc__revert_internal(wc_ctx->db, local_abspath,
+ depth, use_commit_times,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ scratch_pool));
/* The user may expect svn_depth_files/svn_depth_immediates to work
on copied dirs with one level of children. It doesn't, the user
@@ -2616,11 +2674,9 @@ svn_wc__internal_changelist_match(svn_wc
return FALSE;
}
- /* The empty changelist name is special-cased. */
return (changelist
- ? apr_hash_get((apr_hash_t *)clhash, changelist, APR_HASH_KEY_STRING)
- : apr_hash_get((apr_hash_t *)clhash, "", APR_HASH_KEY_STRING)
- ) != NULL;
+ && apr_hash_get((apr_hash_t *)clhash, changelist,
+ APR_HASH_KEY_STRING) != NULL);
}
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/ambient_depth_filter_editor.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/ambient_depth_filter_editor.c Sun Jan 6 02:33:34 2013
@@ -132,7 +132,7 @@ ambient_read_info(svn_wc__db_status_t *s
err = svn_wc__db_base_get_info(status, kind, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, depth, NULL, NULL,
- NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool);
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/cleanup.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/cleanup.c Sun Jan 6 02:33:34 2013
@@ -217,6 +217,8 @@ svn_wc_cleanup3(svn_wc_context_t *wc_ctx
SVN_ERR(svn_wc__db_base_clear_dav_cache_recursive(db, local_abspath,
scratch_pool));
+ SVN_ERR(svn_wc__db_vacuum(db, local_abspath, scratch_pool));
+
/* We're done with this DB, so proactively close it. */
SVN_ERR(svn_wc__db_close(db));
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.c Sun Jan 6 02:33:34 2013
@@ -409,10 +409,10 @@ svn_wc__conflict_skel_add_prop_conflict(
svn_wc__db_t *db,
const char *wri_abspath,
const char *marker_abspath,
- apr_hash_t *mine_props,
- apr_hash_t *their_old_props,
- apr_hash_t *their_props,
- apr_hash_t *conflicted_prop_names,
+ const apr_hash_t *mine_props,
+ const apr_hash_t *their_old_props,
+ const apr_hash_t *their_props,
+ const apr_hash_t *conflicted_prop_names,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -464,7 +464,7 @@ svn_wc__conflict_skel_add_prop_conflict(
svn_skel__prepend_str("", prop_conflict, result_pool); /* No old_props */
conflict_names = svn_skel__make_empty_list(result_pool);
- for (hi = apr_hash_first(scratch_pool, conflicted_prop_names);
+ for (hi = apr_hash_first(scratch_pool, (apr_hash_t *)conflicted_prop_names);
hi;
hi = apr_hash_next(hi))
{
@@ -1804,7 +1804,7 @@ setup_tree_conflict_desc(svn_wc_conflict
err = svn_wc__db_base_get_info(&status, &kind, &revision,
&repos_relpath, &repos_root_url,
&repos_uuid, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool);
@@ -2648,7 +2648,8 @@ conflict_status_walker(void *baton,
{
if (my_choice == svn_wc_conflict_choose_mine_conflict)
SVN_ERR(svn_wc__db_update_moved_away_conflict_victim(
- &work_items, local_abspath, cswb->db,
+ &work_items,
+ cswb->db, local_abspath,
cswb->notify_func, cswb->notify_baton,
cswb->cancel_func, cswb->cancel_baton,
scratch_pool, scratch_pool));
@@ -2864,3 +2865,19 @@ svn_wc_resolved_conflict5(svn_wc_context
notify_func, notify_baton,
scratch_pool));
}
+
+/* Constructor for the result-structure returned by conflict callbacks. */
+svn_wc_conflict_result_t *
+svn_wc_create_conflict_result(svn_wc_conflict_choice_t choice,
+ const char *merged_file,
+ apr_pool_t *pool)
+{
+ svn_wc_conflict_result_t *result = apr_pcalloc(pool, sizeof(*result));
+ result->choice = choice;
+ result->merged_file = merged_file;
+ result->save_merged = FALSE;
+
+ /* If we add more fields to svn_wc_conflict_result_t, add them here. */
+
+ return result;
+}
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.h?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.h (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/conflicts.h Sun Jan 6 02:33:34 2013
@@ -182,10 +182,10 @@ svn_wc__conflict_skel_add_prop_conflict(
svn_wc__db_t *db,
const char *wri_abspath,
const char *marker_abspath,
- apr_hash_t *mine_props,
- apr_hash_t *their_old_props,
- apr_hash_t *their_props,
- apr_hash_t *conflicted_prop_names,
+ const apr_hash_t *mine_props,
+ const apr_hash_t *their_old_props,
+ const apr_hash_t *their_props,
+ const apr_hash_t *conflicted_prop_names,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -261,6 +261,8 @@ svn_wc__conflict_skel_resolve(svn_boolea
* Output arguments can be NULL if the value is not necessary.
*
* ### stsp asks: what is LOCATIONS?
+ * ### Set *LOCATIONS to an array of (svn_wc_conflict_version_t *)
+ * representing ...
*
* TEXT_, PROP_ and TREE_CONFLICTED (when not NULL) will be set to TRUE
* when the conflict contains the specified kind of conflict, otherwise
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/copy.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/copy.c Sun Jan 6 02:33:34 2013
@@ -197,7 +197,7 @@ copy_versioned_file(svn_wc__db_t *db,
ensure the destination WC has a copy of the pristine text. */
if (copy_pristine_file)
- SVN_ERR(svn_wc__db_pristine_transfer(db, src_abspath, NULL,
+ SVN_ERR(svn_wc__db_pristine_transfer(db, src_abspath,
dst_op_root_abspath,
cancel_func, cancel_baton,
scratch_pool));
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/crop.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/crop.c Sun Jan 6 02:33:34 2013
@@ -196,8 +196,8 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
svn_revnum_t revision;
const char *repos_relpath, *repos_root, *repos_uuid;
- SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, &is_switched,
- wc_ctx->db, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc__db_is_switched(&is_root, &is_switched, NULL,
+ wc_ctx->db, local_abspath, scratch_pool));
if (is_root)
{
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/deprecated.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/deprecated.c Sun Jan 6 02:33:34 2013
@@ -903,6 +903,18 @@ svn_wc_delete(const char *path,
}
svn_error_t *
+svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(svn_wc_add_from_disk2(wc_ctx, local_abspath, NULL,
+ notify_func, notify_baton, scratch_pool));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
svn_wc_add3(const char *path,
svn_wc_adm_access_t *parent_access,
svn_depth_t depth,
@@ -2471,27 +2483,36 @@ svn_wc_merge_props2(svn_wc_notify_state_
{
const char *local_abspath;
svn_error_t *err;
+ svn_wc_context_t *wc_ctx;
struct conflict_func_1to2_baton conflict_wrapper;
+ if (base_merge && !dry_run)
+ return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ U_("base_merge=TRUE is no longer supported; "
+ "see notes/api-errata/1.7/wc006.txt"));
+
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
conflict_wrapper.inner_func = conflict_func;
conflict_wrapper.inner_baton = conflict_baton;
- err = svn_wc__perform_props_merge(state,
- svn_wc__adm_get_db(adm_access),
- local_abspath,
- NULL /* left_version */,
- NULL /* right_version */,
- baseprops,
- propchanges,
- base_merge,
- dry_run,
- conflict_func ? conflict_func_1to2_wrapper
- : NULL,
- &conflict_wrapper,
- NULL, NULL,
- scratch_pool);
+ SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL,
+ svn_wc__adm_get_db(adm_access),
+ scratch_pool));
+
+ err = svn_wc_merge_props3(state,
+ wc_ctx,
+ local_abspath,
+ NULL /* left_version */,
+ NULL /* right_version */,
+ baseprops,
+ propchanges,
+ dry_run,
+ conflict_func ? conflict_func_1to2_wrapper
+ : NULL,
+ &conflict_wrapper,
+ NULL, NULL,
+ scratch_pool);
if (err)
switch(err->apr_err)
@@ -2501,7 +2522,9 @@ svn_wc_merge_props2(svn_wc_notify_state_
err->apr_err = SVN_ERR_UNVERSIONED_RESOURCE;
break;
}
- return svn_error_trace(err);
+ return svn_error_trace(
+ svn_error_compose_create(err,
+ svn_wc_context_destroy(wc_ctx)));
}
svn_error_t *
@@ -3211,8 +3234,8 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
svn_error_t *err;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- err = svn_wc__check_wc_root(&is_root, &kind, &is_switched,
- wc_ctx->db, local_abspath, scratch_pool);
+ err = svn_wc__db_is_switched(&is_root, &is_switched, &kind,
+ wc_ctx->db, local_abspath, scratch_pool);
if (err)
{
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/diff_editor.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/diff_editor.c Sun Jan 6 02:33:34 2013
@@ -170,7 +170,7 @@ get_pristine_file(const char **result_ab
if (!use_base)
{
SVN_ERR(svn_wc__db_read_pristine_info(NULL, NULL, NULL, NULL, NULL, NULL,
- &checksum, NULL, NULL,
+ &checksum, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool));
}
@@ -178,7 +178,7 @@ get_pristine_file(const char **result_ab
{
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, &checksum,
- NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool));
}
@@ -557,7 +557,7 @@ file_diff(struct edit_baton *eb,
if (have_base)
SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, &revert_base_revnum,
NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool));
@@ -1288,11 +1288,10 @@ add_directory(const char *path,
dir_pool);
*child_baton = db;
- /* Add this path to the parent directory's list of elements that
- have been compared. */
- apr_hash_set(pb->compared, apr_pstrdup(pb->pool, db->path),
- APR_HASH_KEY_STRING, "");
-
+ /* Issue #3797: Don't add this filename to the parent directory's list of
+ elements that have been compared, to show local additions via the local
+ diff. The repository node is unrelated from the working copy version
+ (similar to not-present in the working copy) */
return SVN_NO_ERROR;
}
@@ -1438,10 +1437,10 @@ add_file(const char *path,
fb = make_file_baton(path, TRUE, pb, file_pool);
*file_baton = fb;
- /* Add this filename to the parent directory's list of elements that
- have been compared. */
- apr_hash_set(pb->compared, apr_pstrdup(pb->pool, path),
- APR_HASH_KEY_STRING, "");
+ /* Issue #3797: Don't add this filename to the parent directory's list of
+ elements that have been compared, to show local additions via the local
+ diff. The repository node is unrelated from the working copy version
+ (similar to not-present in the working copy) */
return SVN_NO_ERROR;
}
@@ -1468,7 +1467,7 @@ open_file(const char *path,
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, &fb->base_checksum, NULL,
- NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
eb->db, fb->local_abspath,
fb->pool, fb->pool));
@@ -1647,7 +1646,7 @@ close_file(void *file_baton,
NULL, NULL, NULL, NULL,
&pristine_checksum,
NULL, NULL,
- &had_props, NULL,
+ &had_props, NULL, NULL,
db, fb->local_abspath,
scratch_pool, scratch_pool));
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/diff_local.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/diff_local.c Sun Jan 6 02:33:34 2013
@@ -172,7 +172,7 @@ file_diff(struct diff_baton *eb,
&base_revision,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, &base_checksum, NULL,
- NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool));
@@ -244,7 +244,8 @@ file_diff(struct diff_baton *eb,
SVN_ERR(svn_wc__db_read_pristine_info(NULL, NULL, NULL, NULL, NULL,
NULL, &del_checksum, NULL,
- NULL, db, local_abspath,
+ NULL, NULL,
+ db, local_abspath,
scratch_pool, scratch_pool));
}
@@ -445,25 +446,11 @@ diff_status_callback(void *baton,
break; /* Go check other conditions */
}
- /* Filter items by changelist. */
- /* ### duplicated in ../libsvn_client/status.c */
- if (eb->changelist_hash)
- {
- if (status->changelist)
- {
- /* Skip unless the caller requested this changelist. */
- if (! apr_hash_get(eb->changelist_hash, status->changelist,
- APR_HASH_KEY_STRING))
- return SVN_NO_ERROR;
- }
- else
- {
- /* Skip unless the caller requested changelist-lacking items. */
- if (! apr_hash_get(eb->changelist_hash, "",
- APR_HASH_KEY_STRING))
- return SVN_NO_ERROR;
- }
- }
+ if (eb->changelist_hash != NULL
+ && (!status->changelist
+ || ! apr_hash_get(eb->changelist_hash, status->changelist,
+ APR_HASH_KEY_STRING)))
+ return SVN_NO_ERROR; /* Filtered via changelist */
/* ### The following checks should probably be reversed as it should decide
when *not* to show a diff, because generally all changed nodes should
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/entries.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/entries.c Sun Jan 6 02:33:34 2013
@@ -64,12 +64,12 @@ typedef struct db_node_t {
svn_revnum_t revision;
svn_node_kind_t kind; /* ### should switch to svn_kind_t */
svn_checksum_t *checksum;
- svn_filesize_t translated_size;
+ svn_filesize_t recorded_size;
svn_revnum_t changed_rev;
apr_time_t changed_date;
const char *changed_author;
svn_depth_t depth;
- apr_time_t last_mod_time;
+ apr_time_t recorded_time;
apr_hash_t *properties;
svn_boolean_t file_external;
} db_node_t;
@@ -231,7 +231,7 @@ get_info_for_deleted(svn_wc_entry_t *ent
checksum,
NULL,
NULL /* lock */,
- &entry->has_props,
+ &entry->has_props, NULL,
NULL,
db,
entry_abspath,
@@ -255,7 +255,7 @@ get_info_for_deleted(svn_wc_entry_t *ent
&entry->depth,
checksum,
NULL,
- &entry->has_props,
+ &entry->has_props, NULL,
db,
entry_abspath,
result_pool,
@@ -297,6 +297,7 @@ get_info_for_deleted(svn_wc_entry_t *ent
SVN_ERR(svn_wc__db_base_get_info(&status, NULL, &entry->revision,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL,
db, entry_abspath,
result_pool, scratch_pool));
@@ -565,7 +566,7 @@ read_one_entry(const svn_wc_entry_t **ne
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
- NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
db, entry_abspath,
scratch_pool,
scratch_pool));
@@ -1463,7 +1464,7 @@ insert_node(svn_sqlite__db_t *sdb,
node->changed_rev,
node->changed_date,
node->changed_author,
- node->last_mod_time));
+ node->recorded_time));
if (node->repos_relpath)
{
@@ -1513,8 +1514,8 @@ insert_node(svn_sqlite__db_t *sdb,
SVN_ERR(svn_sqlite__bind_properties(stmt, 15, node->properties,
scratch_pool));
- if (node->translated_size != SVN_INVALID_FILESIZE)
- SVN_ERR(svn_sqlite__bind_int64(stmt, 16, node->translated_size));
+ if (node->recorded_size != SVN_INVALID_FILESIZE)
+ SVN_ERR(svn_sqlite__bind_int64(stmt, 16, node->recorded_size));
if (node->file_external)
SVN_ERR(svn_sqlite__bind_int(stmt, 20, 1));
@@ -1905,8 +1906,8 @@ write_entry(struct write_baton **entry_n
base_node->op_depth = 0;
base_node->parent_relpath = parent_relpath;
base_node->revision = entry->revision;
- base_node->last_mod_time = entry->text_time;
- base_node->translated_size = entry->working_size;
+ base_node->recorded_time = entry->text_time;
+ base_node->recorded_size = entry->working_size;
if (entry->depth != svn_depth_exclude)
base_node->depth = entry->depth;
@@ -2103,12 +2104,12 @@ write_entry(struct write_baton **entry_n
below_working_node->checksum =
text_base_info->revert_base.sha1_checksum;
}
- below_working_node->translated_size = 0;
+ below_working_node->recorded_size = 0;
below_working_node->changed_rev = SVN_INVALID_REVNUM;
below_working_node->changed_date = 0;
below_working_node->changed_author = NULL;
below_working_node->depth = svn_depth_infinity;
- below_working_node->last_mod_time = 0;
+ below_working_node->recorded_time = 0;
below_working_node->properties = NULL;
SVN_ERR(insert_node(sdb, below_working_node, scratch_pool));
}
@@ -2120,8 +2121,8 @@ write_entry(struct write_baton **entry_n
working_node->local_relpath = local_relpath;
working_node->parent_relpath = parent_relpath;
working_node->changed_rev = SVN_INVALID_REVNUM;
- working_node->last_mod_time = entry->text_time;
- working_node->translated_size = entry->working_size;
+ working_node->recorded_time = entry->text_time;
+ working_node->recorded_size = entry->working_size;
if (entry->depth != svn_depth_exclude)
working_node->depth = entry->depth;
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/externals.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/externals.c Sun Jan 6 02:33:34 2013
@@ -45,6 +45,7 @@
#include "svn_wc.h"
#include "private/svn_skel.h"
+#include "private/svn_subr_private.h"
#include "wc.h"
#include "adm_files.h"
@@ -515,7 +516,7 @@ open_file(const char *path,
NULL, NULL, NULL, &eb->changed_rev,
&eb->changed_date, &eb->changed_author,
NULL, &eb->original_checksum, NULL, NULL,
- &eb->had_props, NULL,
+ &eb->had_props, NULL, NULL,
eb->db, eb->local_abspath,
eb->pool, file_pool));
@@ -733,19 +734,16 @@ close_file(void *file_baton,
if (regular_prop_changes->nelts > 0)
{
+ new_pristine_props = svn_prop__patch(base_props, regular_prop_changes,
+ pool);
SVN_ERR(svn_wc__merge_props(&conflict_skel,
&prop_state,
- &new_pristine_props,
&new_actual_props,
eb->db, eb->local_abspath,
- svn_kind_file,
NULL /* server_baseprops*/,
base_props,
actual_props,
regular_prop_changes,
- TRUE /* base_merge */,
- FALSE /* dry_run */,
- eb->cancel_func, eb->cancel_baton,
pool, pool));
}
else
@@ -1071,7 +1069,7 @@ svn_wc__crawl_file_external(svn_wc_conte
err = svn_wc__db_base_get_info(NULL, &kind, &revision,
&repos_relpath, &repos_root_url, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, &lock,
- NULL, &update_root,
+ NULL, NULL, &update_root,
db, local_abspath,
scratch_pool, scratch_pool);
@@ -1238,7 +1236,7 @@ is_external_rolled_out(svn_boolean_t *is
err = svn_wc__db_base_get_info(NULL, NULL, NULL, &repos_relpath,
&repos_root_url, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
wc_ctx->db, xinfo->local_abspath,
scratch_pool, scratch_pool);
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/info.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/info.c Sun Jan 6 02:33:34 2013
@@ -172,7 +172,7 @@ build_info_for_node(svn_wc__info2_t **in
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, &tmpinfo->rev, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
- NULL,
+ NULL, NULL,
db, local_abspath,
scratch_pool, scratch_pool));
}
@@ -226,7 +226,7 @@ build_info_for_node(svn_wc__info2_t **in
&tmpinfo->last_changed_author,
&wc_info->depth,
&wc_info->checksum,
- NULL, NULL,
+ NULL, NULL, NULL,
db, local_abspath,
result_pool, scratch_pool));
@@ -265,7 +265,7 @@ build_info_for_node(svn_wc__info2_t **in
&tmpinfo->repos_root_URL,
&tmpinfo->repos_UUID, NULL, NULL,
NULL, NULL, NULL, NULL,
- NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
db, local_abspath,
result_pool, scratch_pool));
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/merge.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/merge.c Sun Jan 6 02:33:34 2013
@@ -1145,7 +1145,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
svn_skel_t *work_items;
svn_skel_t *conflict_skel = NULL;
apr_hash_t *pristine_props = NULL;
- apr_hash_t *actual_props = NULL;
+ apr_hash_t *actual_props;
apr_hash_t *new_actual_props = NULL;
SVN_ERR_ASSERT(svn_dirent_is_absolute(left_abspath));
@@ -1222,7 +1222,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
scratch_pool, scratch_pool));
}
else if (pristine_props)
- actual_props = apr_hash_copy(scratch_pool, pristine_props);
+ actual_props = pristine_props;
else
actual_props = apr_hash_make(scratch_pool);
}
@@ -1230,7 +1230,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
if (merge_props_outcome)
{
int i;
- apr_hash_t *new_pristine_props;
+
/* The PROPCHANGES may not have non-"normal" properties in it. If entry
or wc props were allowed, then the following code would install them
into the BASE and/or WORKING properties(!). */
@@ -1249,12 +1249,10 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
SVN_ERR(svn_wc__merge_props(&conflict_skel,
merge_props_outcome,
- &new_pristine_props, &new_actual_props,
- wc_ctx->db, target_abspath, svn_kind_file,
+ &new_actual_props,
+ wc_ctx->db, target_abspath,
original_props, pristine_props, actual_props,
- prop_diff, FALSE /* base_merge */,
- dry_run,
- cancel_func, cancel_baton,
+ prop_diff,
scratch_pool, scratch_pool));
}
@@ -1325,20 +1323,3 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
return SVN_NO_ERROR;
}
-
-
-/* Constructor for the result-structure returned by conflict callbacks. */
-svn_wc_conflict_result_t *
-svn_wc_create_conflict_result(svn_wc_conflict_choice_t choice,
- const char *merged_file,
- apr_pool_t *pool)
-{
- svn_wc_conflict_result_t *result = apr_pcalloc(pool, sizeof(*result));
- result->choice = choice;
- result->merged_file = merged_file;
- result->save_merged = FALSE;
-
- /* If we add more fields to svn_wc_conflict_result_t, add them here. */
-
- return result;
-}
Modified: subversion/branches/tree-read-api/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_wc/node.c?rev=1429457&r1=1429456&r2=1429457&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_wc/node.c Sun Jan 6 02:33:34 2013
@@ -723,7 +723,7 @@ svn_wc__node_get_base(svn_revnum_t *revi
err = svn_wc__db_base_get_info(NULL, NULL, revision, repos_relpath,
repos_root_url, repos_uuid, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL,
+ NULL, NULL, NULL,
wc_ctx->db, local_abspath,
result_pool, scratch_pool);
if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
@@ -782,7 +782,7 @@ svn_wc__node_get_pre_ng_status_data(svn_
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, revision, NULL, NULL, NULL,
changed_rev, changed_date, changed_author,
NULL, NULL, NULL,
- NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
wc_ctx->db, local_abspath,
result_pool, scratch_pool));
else
@@ -811,7 +811,7 @@ svn_wc__node_get_lock_info(const char **
err = svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, &lock, NULL,
- NULL,
+ NULL, NULL,
wc_ctx->db, local_abspath,
result_pool, scratch_pool);
@@ -1117,7 +1117,7 @@ svn_wc__internal_get_origin(svn_boolean_
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, revision, repos_relpath,
repos_root_url, repos_uuid, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL,
+ NULL, NULL, NULL,
db, local_abspath,
result_pool, scratch_pool));
}
@@ -1203,7 +1203,7 @@ svn_wc__node_get_commit_status(svn_boole
{
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, revision, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));
}