You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gb...@apache.org on 2013/10/13 18:11:00 UTC
svn commit: r1531702 [2/4] - in
/subversion/branches/invoke-diff-cmd-feature: ./
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/i...
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/deprecated.c?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/deprecated.c Sun Oct 13 16:10:59 2013
@@ -1250,6 +1250,8 @@ svn_xml_make_header(svn_stringbuf_t **st
svn_xml_make_header2(str, NULL, pool);
}
+
+/*** From utf.c ***/
void
svn_utf_initialize(apr_pool_t *pool)
{
@@ -1257,6 +1259,18 @@ svn_utf_initialize(apr_pool_t *pool)
}
svn_error_t *
+svn_utf_cstring_from_utf8_ex(const char **dest,
+ const char *src,
+ const char *topage,
+ const char *convset_key,
+ apr_pool_t *pool)
+{
+ return svn_utf_cstring_from_utf8_ex2(dest, src, topage, pool);
+}
+
+
+/*** From subst.c ***/
+svn_error_t *
svn_subst_build_keywords(svn_subst_keywords_t *kw,
const char *keywords_val,
const char *rev,
@@ -1306,3 +1320,4 @@ svn_ver_check_list(const svn_version_t *
{
return svn_ver_check_list2(my_version, checklist, svn_ver_compatible);
}
+
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/file.c Sun Oct 13 16:10:59 2013
@@ -137,7 +137,7 @@ get_handle_pool(void)
}
#define FNV1_PRIME_32 0x01000193
-#define FNV1_BASE_32 2166136261
+#define FNV1_BASE_32 2166136261u
/* FNV-1a core implementation returning a 32 bit checksum over the first
* LEN bytes in INPUT. HASH is the checksum over preceding data (if any).
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/sorts.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/sorts.c?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/sorts.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/sorts.c Sun Oct 13 16:10:59 2013
@@ -453,4 +453,4 @@ svn_priority_queue__push(svn_priority_qu
memcpy(apr_array_push(queue->elements), element, queue->elements->elt_size);
heap_bubble_down(queue, queue->elements->nelts - 1);
-}
\ No newline at end of file
+}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/utf.c?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_subr/utf.c Sun Oct 13 16:10:59 2013
@@ -934,18 +934,6 @@ svn_utf_cstring_from_utf8_ex2(const char
return err;
}
-
-svn_error_t *
-svn_utf_cstring_from_utf8_ex(const char **dest,
- const char *src,
- const char *topage,
- const char *convset_key,
- apr_pool_t *pool)
-{
- return svn_utf_cstring_from_utf8_ex2(dest, src, topage, pool);
-}
-
-
const char *
svn_utf__cstring_from_utf8_fuzzy(const char *src,
apr_pool_t *pool,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql Sun Oct 13 16:10:59 2013
@@ -1571,7 +1571,7 @@ WHERE wc_id = ?1
AND moved_to IS NOT NULL
-- STMT_SELECT_MOVED_OUTSIDE
-SELECT local_relpath, moved_to FROM nodes
+SELECT local_relpath, moved_to, op_depth FROM nodes
WHERE wc_id = ?1
AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
AND op_depth >= ?3
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c Sun Oct 13 16:10:59 2013
@@ -2247,6 +2247,12 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
* might introduce actual-only nodes without direct parents,
* and we're not yet sure if other existing code is prepared
* to handle such nodes. To be revisited post-1.8.
+ *
+ * ### In case of a conflict we are most likely creating WORKING nodes
+ * describing a copy of what was in BASE. The move information
+ * should be updated to describe a move from the WORKING layer.
+ * When stored that way the resolver of the tree conflict still has
+ * the knowledge of what was moved.
*/
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_MOVED_OUTSIDE));
@@ -6387,6 +6393,7 @@ op_revert_txn(void *baton,
{
SVN_ERR(svn_wc__db_resolve_break_moved_away_internal(wcroot,
local_relpath,
+ op_depth,
scratch_pool));
}
else
@@ -6553,10 +6560,12 @@ op_revert_recursive_txn(void *baton,
while (have_row)
{
const char *move_src_relpath = svn_sqlite__column_text(stmt, 0, NULL);
+ int op_depth = svn_sqlite__column_int(stmt, 2);
svn_error_t *err;
err = svn_wc__db_resolve_break_moved_away_internal(wcroot,
move_src_relpath,
+ op_depth,
scratch_pool);
if (err)
return svn_error_compose_create(err, svn_sqlite__reset(stmt));
@@ -12128,38 +12137,6 @@ svn_wc__db_follow_moved_to(apr_array_hea
return SVN_NO_ERROR;
}
-/* Extract the moved-to information for LOCAL_RELPATH at OP-DEPTH by
- examining the lowest working node above OP_DEPTH. The output paths
- are NULL if there is no move, otherwise:
-
- *MOVE_DST_RELPATH: the moved-to destination of LOCAL_RELPATH.
-
- *MOVE_DST_OP_ROOT_RELPATH: the moved-to destination of the root of
- the move of LOCAL_RELPATH. This may be equal to *MOVE_DST_RELPATH
- if LOCAL_RELPATH is the root of the move.
-
- *MOVE_SRC_ROOT_RELPATH: the root of the move source. For moves
- inside a delete this will be different from *MOVE_SRC_OP_ROOT_RELPATH.
-
- *MOVE_SRC_OP_ROOT_RELPATH: the root of the source layer that
- contains the move. For moves inside deletes this is the root of
- the delete, for other moves this is the root of the move.
-
- Given a path A/B/C with A/B moved to X then for A/B/C
-
- MOVE_DST_RELPATH is X/C
- MOVE_DST_OP_ROOT_RELPATH is X
- MOVE_SRC_ROOT_RELPATH is A/B
- MOVE_SRC_OP_ROOT_RELPATH is A/B
-
- If A is then deleted the MOVE_DST_RELPATH, MOVE_DST_OP_ROOT_RELPATH
- and MOVE_SRC_ROOT_RELPATH remain the same but MOVE_SRC_OP_ROOT_RELPATH
- changes to A.
-
- ### Think about combining with scan_deletion? Also with
- ### scan_addition to get moved-to for replaces? Do we need to
- ### return the op-root of the move source, i.e. A/B in the example
- ### above? */
svn_error_t *
svn_wc__db_op_depth_moved_to(const char **move_dst_relpath,
const char **move_dst_op_root_relpath,
@@ -12176,6 +12153,8 @@ svn_wc__db_op_depth_moved_to(const char
int delete_op_depth;
const char *relpath = local_relpath;
+ SVN_ERR_ASSERT(local_relpath[0]); /* Not valid on the WC root */
+
*move_dst_relpath = *move_dst_op_root_relpath = NULL;
*move_src_root_relpath = *move_src_op_root_relpath = NULL;
@@ -12191,14 +12170,17 @@ svn_wc__db_op_depth_moved_to(const char
*move_dst_op_root_relpath = svn_sqlite__column_text(stmt, 3,
result_pool);
if (*move_dst_op_root_relpath)
- *move_src_root_relpath = apr_pstrdup(result_pool, relpath);
+ {
+ *move_src_root_relpath = apr_pstrdup(result_pool, relpath);
+ SVN_ERR(svn_sqlite__reset(stmt));
+
+ break;
+ }
}
SVN_ERR(svn_sqlite__reset(stmt));
- if (!*move_dst_op_root_relpath)
- relpath = svn_relpath_dirname(relpath, scratch_pool);
+ relpath = svn_relpath_dirname(relpath, scratch_pool);
}
- while (!*move_dst_op_root_relpath
- && have_row && delete_op_depth <= relpath_depth(relpath));
+ while (have_row && delete_op_depth <= relpath_depth(relpath));
if (*move_dst_op_root_relpath)
{
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h Sun Oct 13 16:10:59 2013
@@ -3382,7 +3382,14 @@ svn_wc__db_resolve_delete_raise_moved_aw
apr_pool_t *scratch_pool);
/* Like svn_wc__db_resolve_delete_raise_moved_away this should be
- combined. */
+ combined.
+
+ ### LOCAL_ABSPATH specifies the move origin, but the move origin
+ ### is not necessary unique enough. This function needs an op_root_abspath
+ ### argument to differentiate between different origins.
+
+ ### See move_tests.py: move_many_update_delete for an example case.
+ */
svn_error_t *
svn_wc__db_resolve_break_moved_away(svn_wc__db_t *db,
const char *local_abspath,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_private.h?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_private.h Sun Oct 13 16:10:59 2013
@@ -423,6 +423,38 @@ svn_wc__db_retract_parent_delete(svn_wc_
int op_depth,
apr_pool_t *scratch_pool);
+/* Extract the moved-to information for LOCAL_RELPATH at OP-DEPTH by
+ examining the lowest working node above OP_DEPTH. The output paths
+ are NULL if there is no move, otherwise:
+
+ *MOVE_DST_RELPATH: the moved-to destination of LOCAL_RELPATH.
+
+ *MOVE_DST_OP_ROOT_RELPATH: the moved-to destination of the root of
+ the move of LOCAL_RELPATH. This may be equal to *MOVE_DST_RELPATH
+ if LOCAL_RELPATH is the root of the move.
+
+ *MOVE_SRC_ROOT_RELPATH: the root of the move source. For moves
+ inside a delete this will be different from *MOVE_SRC_OP_ROOT_RELPATH.
+
+ *MOVE_SRC_OP_ROOT_RELPATH: the root of the source layer that
+ contains the move. For moves inside deletes this is the root of
+ the delete, for other moves this is the root of the move.
+
+ Given a path A/B/C with A/B moved to X then for A/B/C
+
+ MOVE_DST_RELPATH is X/C
+ MOVE_DST_OP_ROOT_RELPATH is X
+ MOVE_SRC_ROOT_RELPATH is A/B
+ MOVE_SRC_OP_ROOT_RELPATH is A/B
+
+ If A is then deleted the MOVE_DST_RELPATH, MOVE_DST_OP_ROOT_RELPATH
+ and MOVE_SRC_ROOT_RELPATH remain the same but MOVE_SRC_OP_ROOT_RELPATH
+ changes to A.
+
+ ### Think about combining with scan_deletion? Also with
+ ### scan_addition to get moved-to for replaces? Do we need to
+ ### return the op-root of the move source, i.e. A/B in the example
+ ### above? */
svn_error_t *
svn_wc__db_op_depth_moved_to(const char **move_dst_relpath,
const char **move_dst_op_root_relpath,
@@ -445,9 +477,12 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
svn_wc__db_t *db,
apr_pool_t *scratch_pool);
+/* Unbreak the move from LOCAL_RELPATH on op-depth in WCROOT, by making
+ the destination a normal copy */
svn_error_t *
svn_wc__db_resolve_break_moved_away_internal(svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
+ int op_depth,
apr_pool_t *scratch_pool);
svn_error_t *
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_update_move.c?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db_update_move.c Sun Oct 13 16:10:59 2013
@@ -2275,30 +2275,34 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
svn_wc__db_t *db,
apr_pool_t *scratch_pool)
{
- const char *dummy1, *move_dst_op_root_relpath;
- const char *move_src_root_relpath, *move_src_op_root_relpath;
apr_hash_t *src_done;
SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
STMT_CREATE_UPDATE_MOVE_LIST));
- SVN_ERR(svn_wc__db_op_depth_moved_to(&dummy1, &move_dst_op_root_relpath,
- &move_src_root_relpath,
- &move_src_op_root_relpath, 0,
- wcroot, local_relpath,
- scratch_pool, scratch_pool));
-
- if (move_src_root_relpath)
+ if (local_relpath[0] != '\0')
{
- if (strcmp(move_src_root_relpath, local_relpath))
+ const char *dummy1, *move_dst_op_root_relpath;
+ const char *move_src_root_relpath, *move_src_op_root_relpath;
+
+ /* Is the root of the update moved away? (Impossible for the wcroot) */
+ SVN_ERR(svn_wc__db_op_depth_moved_to(&dummy1, &move_dst_op_root_relpath,
+ &move_src_root_relpath,
+ &move_src_op_root_relpath, 0,
+ wcroot, local_relpath,
+ scratch_pool, scratch_pool));
+
+ if (move_src_root_relpath)
{
- SVN_ERR(bump_mark_tree_conflict(wcroot, move_src_root_relpath,
- move_src_op_root_relpath,
- move_dst_op_root_relpath,
- db, scratch_pool));
- return SVN_NO_ERROR;
+ if (strcmp(move_src_root_relpath, local_relpath))
+ {
+ SVN_ERR(bump_mark_tree_conflict(wcroot, move_src_root_relpath,
+ move_src_op_root_relpath,
+ move_dst_op_root_relpath,
+ db, scratch_pool));
+ return SVN_NO_ERROR;
+ }
}
-
}
src_done = apr_hash_make(scratch_pool);
@@ -2431,17 +2435,23 @@ break_move(svn_wc__db_wcroot_t *wcroot,
svn_error_t *
svn_wc__db_resolve_break_moved_away_internal(svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
+ int op_depth,
apr_pool_t *scratch_pool)
{
const char *dummy1, *move_dst_op_root_relpath;
const char *dummy2, *move_src_op_root_relpath;
+ /* We want to include the passed op-depth, but the function does a > check */
SVN_ERR(svn_wc__db_op_depth_moved_to(&dummy1, &move_dst_op_root_relpath,
&dummy2,
&move_src_op_root_relpath,
- relpath_depth(local_relpath) - 1,
+ op_depth - 1,
wcroot, local_relpath,
scratch_pool, scratch_pool));
+
+ SVN_ERR_ASSERT(move_src_op_root_relpath != NULL
+ && move_dst_op_root_relpath != NULL);
+
SVN_ERR(break_move(wcroot, local_relpath,
relpath_depth(move_src_op_root_relpath),
move_dst_op_root_relpath,
@@ -2510,6 +2520,7 @@ svn_wc__db_resolve_break_moved_away(svn_
SVN_WC__DB_WITH_TXN(
svn_wc__db_resolve_break_moved_away_internal(wcroot, local_relpath,
+ relpath_depth(local_relpath),
scratch_pool),
wcroot);
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/cyrus_auth.c?rev=1531702&r1=1531701&r2=1531702&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/svnserve/cyrus_auth.c Sun Oct 13 16:10:59 2013
@@ -177,7 +177,7 @@ static svn_error_t *try_auth(svn_ra_svn_
SVN_ERR(svn_ra_svn__read_tuple(conn, pool, "w(?s)", &mech, &in));
if (strcmp(mech, "EXTERNAL") == 0 && !in)
- in = svn_string_create(b->tunnel_user, pool);
+ in = svn_string_create(b->client_info->tunnel_user, pool);
else if (in)
in = svn_base64_decode_string(in, pool);
@@ -246,7 +246,7 @@ svn_error_t *cyrus_auth_request(svn_ra_s
apr_pool_t *subpool;
apr_status_t apr_err;
const char *localaddrport = NULL, *remoteaddrport = NULL;
- const char *mechlist, *val;
+ const char *mechlist;
char hostname[APRMAXHOSTLEN + 1];
sasl_security_properties_t secprops;
svn_boolean_t success, no_anonymous;
@@ -265,7 +265,7 @@ svn_error_t *cyrus_auth_request(svn_ra_s
/* Create a SASL context. SASL_SUCCESS_DATA tells SASL that the protocol
supports sending data along with the final "success" message. */
result = sasl_server_new(SVN_RA_SVN_SASL_NAME,
- hostname, b->realm,
+ hostname, b->repository->realm,
localaddrport, remoteaddrport,
NULL, SASL_SUCCESS_DATA,
&sasl_ctx);
@@ -285,21 +285,12 @@ svn_error_t *cyrus_auth_request(svn_ra_s
svn_ra_svn__default_secprops(&secprops);
/* Don't allow ANONYMOUS if a username is required. */
- no_anonymous = needs_username || get_access(b, UNAUTHENTICATED) < required;
+ no_anonymous = needs_username || b->repository->anon_access < required;
if (no_anonymous)
secprops.security_flags |= SASL_SEC_NOANONYMOUS;
- svn_config_get(b->cfg, &val,
- SVN_CONFIG_SECTION_SASL,
- SVN_CONFIG_OPTION_MIN_SSF,
- "0");
- SVN_ERR(svn_cstring_atoui(&secprops.min_ssf, val));
-
- svn_config_get(b->cfg, &val,
- SVN_CONFIG_SECTION_SASL,
- SVN_CONFIG_OPTION_MAX_SSF,
- "256");
- SVN_ERR(svn_cstring_atoui(&secprops.max_ssf, val));
+ secprops.min_ssf = b->repository->min_ssf;
+ secprops.max_ssf = b->repository->max_ssf;
/* Set security properties. */
result = sasl_setprop(sasl_ctx, SASL_SEC_PROPS, &secprops);
@@ -307,8 +298,9 @@ svn_error_t *cyrus_auth_request(svn_ra_s
return fail_cmd(conn, pool, sasl_ctx);
/* SASL needs to know if we are externally authenticated. */
- if (b->tunnel_user)
- result = sasl_setprop(sasl_ctx, SASL_AUTH_EXTERNAL, b->tunnel_user);
+ if (b->client_info->tunnel_user)
+ result = sasl_setprop(sasl_ctx, SASL_AUTH_EXTERNAL,
+ b->client_info->tunnel_user);
if (result != SASL_OK)
return fail_cmd(conn, pool, sasl_ctx);
@@ -330,7 +322,7 @@ svn_error_t *cyrus_auth_request(svn_ra_s
/* Send the list of mechanisms and the realm to the client. */
SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "(w)c",
- mechlist, b->realm));
+ mechlist, b->repository->realm));
/* The main authentication loop. */
subpool = svn_pool_create(pool);
@@ -358,7 +350,8 @@ svn_error_t *cyrus_auth_request(svn_ra_s
if ((p = strchr(user, '@')) != NULL)
{
/* Drop the realm part. */
- b->user = apr_pstrndup(b->pool, user, p - (const char *)user);
+ b->client_info->user = apr_pstrndup(b->pool, user,
+ p - (const char *)user);
}
else
{