Author: brane
Date: Wed Feb 25 14:51:17 2015
New Revision: 1662234
URL: http://svn.apache.org/r1662234
Log:
On the svn-info-detail branch: Sync with trunk up to r1662233.
Modified:
subversion/branches/svn-info-detail/ (props changed)
subversion/branches/svn-info-detail/subversion/libsvn_wc/conflicts.c
subversion/branches/svn-info-detail/subversion/libsvn_wc/node.c
subversion/branches/svn-info-detail/subversion/libsvn_wc/update_editor.c
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc-queries.sql
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.c
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.h
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_private.h
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/svn-info-detail/subversion/svn/cl.h
subversion/branches/svn-info-detail/subversion/svn/propget-cmd.c
subversion/branches/svn-info-detail/subversion/svn/svn.c
subversion/branches/svn-info-detail/subversion/tests/cmdline/checkout_tests.py
subversion/branches/svn-info-detail/subversion/tests/cmdline/prop_tests.py
subversion/branches/svn-info-detail/subversion/tests/cmdline/special_tests.py
subversion/branches/svn-info-detail/subversion/tests/cmdline/svnmucc_tests.py
subversion/branches/svn-info-detail/subversion/tests/cmdline/trans_tests.py
subversion/branches/svn-info-detail/subversion/tests/libsvn_wc/op-depth-test.c
Propchange: subversion/branches/svn-info-detail/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 25 14:51:17 2015
@@ -88,4 +88,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660035-1661975
+/subversion/trunk:1660035-1662233
Modified: subversion/branches/svn-info-detail/subversion/libsvn_wc/conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/conflicts.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/libsvn_wc/conflicts.c
(original)
+++ subversion/branches/svn-info-detail/subversion/libsvn_wc/conflicts.c Wed
Feb 25 14:51:17 2015
@@ -2537,19 +2537,31 @@ resolve_tree_conflict_on_node(svn_boolea
{
/* Break moves for any children moved out of this directory,
* and leave this directory deleted. */
- SVN_ERR(svn_wc__db_resolve_break_moved_away_children(
- db, local_abspath, src_op_root_abspath,
- notify_func, notify_baton,
- scratch_pool));
+
+ if (action != svn_wc_conflict_action_delete)
+ {
+ SVN_ERR(svn_wc__db_op_break_moved_away(
+ db, local_abspath, src_op_root_abspath, TRUE,
+ notify_func, notify_baton,
+ scratch_pool));
+ *did_resolve = TRUE;
+ return SVN_NO_ERROR; /* Marked resolved by function*/
+ }
+ /* else # The move is/moves are already broken */
+
+
*did_resolve = TRUE;
}
else if (conflict_choice == svn_wc_conflict_choose_mine_conflict)
{
- /* Raised moved-away conflicts on any children moved out of
- * this directory, and leave this directory deleted.
+ svn_skel_t *new_conflicts;
+
+ /* Raise moved-away conflicts on any children moved out of
+ * this directory, and leave this directory as-is.
+ *
* The newly conflicted moved-away children will be updated
* if they are resolved with 'mine_conflict' as well. */
- err = svn_wc__db_resolve_delete_raise_moved_away(
+ err = svn_wc__db_op_raise_moved_away(
db, local_abspath, notify_func, notify_baton,
scratch_pool);
@@ -2569,8 +2581,44 @@ resolve_tree_conflict_on_node(svn_boolea
return SVN_NO_ERROR; /* Retry after other conflicts */
}
- else
- *did_resolve = TRUE;
+
+ /* We might now have a moved-away on *this* path, let's
+ try to resolve that directly if that is the case */
+ SVN_ERR(svn_wc__db_read_conflict(&new_conflicts, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+
+ if (new_conflicts)
+ SVN_ERR(svn_wc__conflict_read_info(NULL, NULL, NULL, NULL,
+ &tree_conflicted,
+ db, local_abspath,
+ new_conflicts,
+ scratch_pool,
+ scratch_pool));
+
+ if (!new_conflicts || !tree_conflicted)
+ {
+ /* TC is marked resolved by calling
+ svn_wc__db_resolve_delete_raise_moved_away */
+ *did_resolve = TRUE;
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action,
+ &src_op_root_abspath,
+ db, local_abspath,
+ new_conflicts,
+ scratch_pool,
+ scratch_pool));
+
+ if (reason != svn_wc_conflict_reason_moved_away)
+ {
+ *did_resolve = TRUE;
+ return SVN_NO_ERROR; /* We fixed one, but... */
+ }
+
+ conflicts = new_conflicts;
+ /* Fall through in moved_away handling */
}
else
return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
@@ -2581,8 +2629,9 @@ resolve_tree_conflict_on_node(svn_boolea
svn_dirent_local_style(local_abspath,
scratch_pool));
}
- else if (reason == svn_wc_conflict_reason_moved_away
- && action == svn_wc_conflict_action_edit)
+
+ if (reason == svn_wc_conflict_reason_moved_away
+ && action == svn_wc_conflict_action_edit)
{
/* After updates, we can resolve local moved-away
* vs. any incoming change, either by updating the
@@ -2622,15 +2671,12 @@ resolve_tree_conflict_on_node(svn_boolea
* working copy state instead of updating the move.
* Else the move would be left in an invalid state. */
- /* ### This breaks the move but leaves the conflict
- ### involving the move until
- ### svn_wc__db_op_mark_resolved. */
- SVN_ERR(svn_wc__db_resolve_break_moved_away(db, local_abspath,
- src_op_root_abspath,
- notify_func,
- notify_baton,
- scratch_pool));
+ SVN_ERR(svn_wc__db_op_break_moved_away(db, local_abspath,
+ src_op_root_abspath, TRUE,
+ notify_func, notify_baton,
+ scratch_pool));
*did_resolve = TRUE;
+ return SVN_NO_ERROR; /* Conflict is marked resolved */
}
else
return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
@@ -2768,6 +2814,7 @@ struct conflict_status_walker_baton
void *cancel_baton;
svn_wc_notify_func2_t notify_func;
void *notify_baton;
+ svn_boolean_t resolved_one;
apr_hash_t *resolve_later;
};
@@ -2943,6 +2990,9 @@ conflict_status_walker(void *baton,
iterpool),
iterpool);
+ if (resolved)
+ cswb->resolved_one = TRUE;
+
svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
@@ -3008,6 +3058,7 @@ svn_wc__resolve_conflicts(svn_wc_context
cswb.notify_func = notify_func;
cswb.notify_baton = notify_baton;
+ cswb.resolved_one = FALSE;
cswb.resolve_later = (depth != svn_depth_empty)
? apr_hash_make(scratch_pool)
: NULL;
@@ -3030,10 +3081,12 @@ svn_wc__resolve_conflicts(svn_wc_context
cancel_func, cancel_baton,
scratch_pool);
+ /* If we got new tree conflicts (or delayed conflicts) during the initial
+ walk, we now walk them one by one as closure. */
while (!err && cswb.resolve_later && apr_hash_count(cswb.resolve_later))
{
apr_hash_index_t *hi;
- svn_boolean_t cleared_one = FALSE;
+ svn_wc_status3_t *status = NULL;
const char *tc_abspath = NULL;
if (iterpool)
@@ -3043,31 +3096,64 @@ svn_wc__resolve_conflicts(svn_wc_context
hi = apr_hash_first(scratch_pool, cswb.resolve_later);
cswb.resolve_later = apr_hash_make(scratch_pool);
+ cswb.resolved_one = FALSE;
for (; hi && !err; hi = apr_hash_next(hi))
{
- tc_abspath = apr_hash_this_key(hi);
+ const char *relpath;
svn_pool_clear(iterpool);
- /* ### TODO: Check if tc_abspath falls within selected depth */
+ tc_abspath = apr_hash_this_key(hi);
+
+ if (cancel_func)
+ SVN_ERR(cancel_func(cancel_baton));
+
+ relpath = svn_dirent_skip_ancestor(local_abspath,
+ tc_abspath);
- err = svn_wc_walk_status(wc_ctx, tc_abspath, svn_depth_empty,
- FALSE, FALSE, TRUE, NULL,
- conflict_status_walker, &cswb,
- cancel_func, cancel_baton,
- iterpool);
+ if (!relpath
+ || (depth >= svn_depth_empty
+ && depth < svn_depth_infinity
+ && strchr(relpath, '/')))
+ {
+ continue;
+ }
+
+ SVN_ERR(svn_wc_status3(&status, wc_ctx, tc_abspath,
+ iterpool, iterpool));
- if (!err && !svn_hash_gets(cswb.resolve_later, tc_abspath))
- cleared_one = TRUE;
+ if (depth == svn_depth_files
+ && status->kind == svn_node_dir)
+ continue;
+
+ err = svn_error_trace(conflict_status_walker(&cswb, tc_abspath,
+ status, scratch_pool));
}
- if (!cleared_one && !err)
+ /* None of the remaining conflicts got resolved, and non did provide
+ an error...
+
+ We can fix that if we disable the 'resolve_later' option...
+ */
+ if (!cswb.resolved_one && !err && tc_abspath
+ && apr_hash_count(cswb.resolve_later))
{
- /* Return the error on one of the paths: The last one. */
+ /* Run the last resolve operation again. We still have status
+ and tc_abspath for that one. */
+
+ cswb.resolve_later = NULL; /* Produce proper error! */
+
+ /* Recreate the error */
+ err = svn_error_trace(conflict_status_walker(&cswb, tc_abspath,
+ status, scratch_pool));
+
+ SVN_ERR_ASSERT(err != NULL);
+
err = svn_error_createf(
- SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err,
_("Unable to resolve pending conflict on '%s'"),
svn_dirent_local_style(tc_abspath, scratch_pool));
+ break;
}
}
Modified: subversion/branches/svn-info-detail/subversion/libsvn_wc/node.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/node.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/svn-info-detail/subversion/libsvn_wc/node.c Wed Feb 25
14:51:17 2015
@@ -260,25 +260,24 @@ walker_helper(svn_wc__db_t *db,
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- apr_hash_t *rel_children_info;
- apr_hash_index_t *hi;
apr_pool_t *iterpool;
+ const apr_array_header_t *items;
+ int i;
if (depth == svn_depth_empty)
return SVN_NO_ERROR;
- SVN_ERR(svn_wc__db_read_children_walker_info(&rel_children_info, db,
- dir_abspath, scratch_pool,
- scratch_pool));
+ iterpool = svn_pool_create(scratch_pool);
+ SVN_ERR(svn_wc__db_read_children_walker_info(&items, db,
+ dir_abspath, scratch_pool,
+ iterpool));
- iterpool = svn_pool_create(scratch_pool);
- for (hi = apr_hash_first(scratch_pool, rel_children_info);
- hi;
- hi = apr_hash_next(hi))
+ for (i = 0; i < items->nelts; i++)
{
- const char *child_name = apr_hash_this_key(hi);
- struct svn_wc__db_walker_info_t *wi = apr_hash_this_val(hi);
+ struct svn_wc__db_walker_info_t *wi =
+ APR_ARRAY_IDX(items, i, struct svn_wc__db_walker_info_t *);
+ const char *child_name = wi->name;
svn_node_kind_t child_kind = wi->kind;
svn_wc__db_status_t child_status = wi->status;
const char *child_abspath;
Modified:
subversion/branches/svn-info-detail/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/update_editor.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/libsvn_wc/update_editor.c
(original)
+++ subversion/branches/svn-info-detail/subversion/libsvn_wc/update_editor.c
Wed Feb 25 14:51:17 2015
@@ -1382,15 +1382,15 @@ check_tree_conflict(svn_skel_t **pconfli
}
else
{
- /* The node is locally replaced but could also be moved-away. */
- SVN_ERR(svn_wc__db_base_moved_to(NULL, NULL, NULL,
- &move_src_op_root_abspath,
- eb->db, local_abspath,
- scratch_pool, scratch_pool));
- if (move_src_op_root_abspath)
- reason = svn_wc_conflict_reason_moved_away;
- else
- reason = svn_wc_conflict_reason_replaced;
+ /* The node is locally replaced but could also be moved-away,
+ but we can't report that it is moved away and replaced.
+
+ And we wouldn't be able to store that each of a dozen
+ descendants was moved to other locations...
+
+ Replaced is what actually happened... */
+
+ reason = svn_wc_conflict_reason_replaced;
}
break;
Modified:
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc-queries.sql
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/wc-queries.sql?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/libsvn_wc/wc-queries.sql
(original)
+++ subversion/branches/svn-info-detail/subversion/libsvn_wc/wc-queries.sql Wed
Feb 25 14:51:17 2015
@@ -156,6 +156,7 @@ ORDER BY local_relpath DESC
SELECT local_relpath, op_depth, presence, kind
FROM nodes_current
WHERE wc_id = ?1 AND parent_relpath = ?2
+ORDER BY local_relpath
-- STMT_SELECT_ACTUAL_CHILDREN_INFO
SELECT local_relpath, changelist, properties, conflict_data
@@ -344,7 +345,8 @@ ORDER BY local_relpath
-- STMT_SELECT_GE_OP_DEPTH_CHILDREN
SELECT 1 FROM nodes
WHERE wc_id = ?1 AND parent_relpath = ?2
- AND (op_depth > ?3 OR (op_depth = ?3 AND presence != MAP_BASE_DELETED))
+ AND (op_depth > ?3 OR (op_depth = ?3
+ AND presence IN (MAP_NORMAL, MAP_INCOMPLETE)))
UNION ALL
SELECT 1 FROM ACTUAL_NODE a
WHERE wc_id = ?1 AND parent_relpath = ?2
@@ -1675,26 +1677,6 @@ WHERE wc_id = ?1
AND moved_to IS NOT NULL
AND NOT IS_STRICT_DESCENDANT_OF(moved_to, ?2)
-/* This statement is very similar to STMT_SELECT_MOVED_DESCENDANTS_SRC
- but the passed op-depth is the depth of the shadowing node.
-
- This version is slightly more efficient as the most inner query is
- only executed once, but the Sqlite page cache makes the difference
- not really measurable */
--- STMT_SELECT_MOVED_DESCENDANTS_SHD
-SELECT n.op_depth, n.local_relpath, n.kind, n.repos_path, s.moved_to
-FROM nodes s
-JOIN nodes n ON n.wc_id = ?1 AND n.local_relpath = s.local_relpath
- AND n.op_depth=(SELECT MAX(d.op_depth)
- FROM nodes d
- WHERE d.wc_id = ?1 AND d.local_relpath = ?2
- AND d.op_depth < ?3)
-WHERE s.wc_id = ?1 AND s.op_depth = ?3
- AND (s.local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(s.local_relpath, ?2))
- AND s.moved_to IS NOT NULL
-
-/* This statement is very similar to STMT_SELECT_MOVED_DESCENDANTS_SHD,
- but the passed op-depth is the depth of the node as it originally existed */
-- STMT_SELECT_MOVED_DESCENDANTS_SRC
SELECT s.op_depth, n.local_relpath, n.kind, n.repos_path, s.moved_to
FROM nodes n
Modified: subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.c Wed Feb 25
14:51:17 2015
@@ -2073,7 +2073,7 @@ clear_moved_here(svn_wc__db_wcroot_t *wc
svn_error_t *
svn_wc__db_op_break_move_internal(svn_wc__db_wcroot_t *wcroot,
const char *src_relpath,
- int src_op_depth,
+ int delete_op_depth,
const char *dst_relpath,
const svn_skel_t *work_items,
apr_pool_t *scratch_pool)
@@ -2084,7 +2084,7 @@ svn_wc__db_op_break_move_internal(svn_wc
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_CLEAR_MOVED_TO_RELPATH));
SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, src_relpath,
- src_op_depth));
+ delete_op_depth));
SVN_ERR(svn_sqlite__update(&affected, stmt));
if (affected != 1)
@@ -6577,15 +6577,15 @@ svn_wc__db_op_mark_conflict(svn_wc__db_t
/* The body of svn_wc__db_op_mark_resolved().
*/
-static svn_error_t *
-db_op_mark_resolved(svn_wc__db_wcroot_t *wcroot,
- const char *local_relpath,
- svn_wc__db_t *db,
- 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_error_t *
+svn_wc__db_op_mark_resolved_internal(svn_wc__db_wcroot_t *wcroot,
+ const char *local_relpath,
+ svn_wc__db_t *db,
+ 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_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
@@ -6683,7 +6683,8 @@ svn_wc__db_op_mark_resolved(svn_wc__db_t
VERIFY_USABLE_WCROOT(wcroot);
SVN_WC__DB_WITH_TXN(
- db_op_mark_resolved(wcroot, local_relpath, db,
+ svn_wc__db_op_mark_resolved_internal(
+ wcroot, local_relpath, db,
resolved_text, resolved_props, resolved_tree,
work_items, scratch_pool),
wcroot);
@@ -6751,6 +6752,7 @@ op_revert_txn(void *baton,
int affected_rows;
const char *moved_to;
int op_depth_increased = 0;
+ int op_depth_below;
svn_skel_t *conflict;
/* ### Similar structure to op_revert_recursive_txn, should they be
@@ -6798,6 +6800,13 @@ op_revert_txn(void *baton,
op_depth = svn_sqlite__column_int(stmt, 0);
moved_here = svn_sqlite__column_boolean(stmt, 15);
moved_to = svn_sqlite__column_text(stmt, 17, scratch_pool);
+
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ if (have_row)
+ op_depth_below = svn_sqlite__column_int(stmt, 0);
+ else
+ op_depth_below = -1;
+
SVN_ERR(svn_sqlite__reset(stmt));
if (moved_to)
@@ -6885,7 +6894,7 @@ op_revert_txn(void *baton,
|| reason == svn_wc_conflict_reason_replaced)
{
SVN_ERR(svn_wc__db_op_raise_moved_away_internal(
- wcroot, local_relpath, op_depth+1, db,
+ wcroot, local_relpath, op_depth_below, db,
operation, action,
(locations && locations->nelts > 0)
? APR_ARRAY_IDX(locations, 0,
@@ -9785,7 +9794,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
}
svn_error_t *
-svn_wc__db_read_children_walker_info(apr_hash_t **nodes,
+svn_wc__db_read_children_walker_info(const apr_array_header_t **items,
svn_wc__db_t *db,
const char *dir_abspath,
apr_pool_t *result_pool,
@@ -9795,6 +9804,7 @@ svn_wc__db_read_children_walker_info(apr
const char *dir_relpath;
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
+ apr_array_header_t *nodes;
SVN_ERR_ASSERT(svn_dirent_is_absolute(dir_abspath));
@@ -9808,16 +9818,18 @@ svn_wc__db_read_children_walker_info(apr
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, dir_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
- *nodes = apr_hash_make(result_pool);
+ nodes = apr_array_make(result_pool, 16,
+ sizeof(struct svn_wc__db_walker_info_t *));
while (have_row)
{
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);
+ const char *name = svn_relpath_basename(child_relpath, result_pool);
int op_depth = svn_sqlite__column_int(stmt, 1);
svn_error_t *err;
child = apr_palloc(result_pool, sizeof(*child));
+ child->name = name;
child->status = svn_sqlite__column_token(stmt, 2, presence_map);
if (op_depth > 0)
{
@@ -9826,13 +9838,16 @@ svn_wc__db_read_children_walker_info(apr
SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
}
child->kind = svn_sqlite__column_token(stmt, 3, kind_map);
- svn_hash_sets(*nodes, apr_pstrdup(result_pool, name), child);
+
+ APR_ARRAY_PUSH(nodes, struct svn_wc__db_walker_info_t *) = child;
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
SVN_ERR(svn_sqlite__reset(stmt));
+ *items = nodes;
+
return SVN_NO_ERROR;
}
Modified: subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.h
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.h?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db.h Wed Feb 25
14:51:17 2015
@@ -2057,6 +2057,7 @@ svn_wc__db_read_single_info(const struct
/* Structure returned by svn_wc__db_read_walker_info. Only has the
fields needed by svn_wc__internal_walk_children(). */
struct svn_wc__db_walker_info_t {
+ const char *name;
svn_wc__db_status_t status;
svn_node_kind_t kind;
};
@@ -2117,11 +2118,10 @@ svn_wc__db_read_node_install_info(const
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Return in *NODES a hash mapping name->struct svn_wc__db_walker_info_t for
- the children of DIR_ABSPATH. "name" is the child's name relative to
- DIR_ABSPATH, not an absolute path. */
+/* Return in *ITEMS an array of struct svn_wc__db_walker_info_t* for
+ the direct children of DIR_ABSPATH. */
svn_error_t *
-svn_wc__db_read_children_walker_info(apr_hash_t **nodes,
+svn_wc__db_read_children_walker_info(const apr_array_header_t **items,
svn_wc__db_t *db,
const char *dir_abspath,
apr_pool_t *result_pool,
@@ -3422,41 +3422,24 @@ svn_wc__db_vacuum(svn_wc__db_t *db,
comment in resolve_conflict_on_node about combining with another
function. */
svn_error_t *
-svn_wc__db_resolve_delete_raise_moved_away(svn_wc__db_t *db,
- const char *local_abspath,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool);
-
-/* Like svn_wc__db_resolve_delete_raise_moved_away this should be
- 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,
- const char *src_op_root_abspath,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool);
+svn_wc__db_op_raise_moved_away(svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
-/* Break moves for all moved-away children of LOCAL_ABSPATH, within
- * a single transaction.
- *
- * ### Like svn_wc__db_resolve_delete_raise_moved_away this should be
- * combined. */
+/* Breaks all moves of nodes that exist at or below LOCAL_ABSPATH as
+ shadowed (read: deleted) by the opration rooted at
+ delete_op_root_abspath.
+ */
svn_error_t *
-svn_wc__db_resolve_break_moved_away_children(svn_wc__db_t *db,
- const char *local_abspath,
- const char *src_op_root_abspath,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool);
+svn_wc__db_op_break_moved_away(svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *delete_op_root_abspath,
+ svn_boolean_t mark_tc_resolved,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
/* Set *REQUIRED_ABSPATH to the path that should be locked to ensure
* that the lock covers all paths affected by resolving the conflicts
Modified:
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_private.h
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_private.h?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_private.h
(original)
+++ subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_private.h
Wed Feb 25 14:51:17 2015
@@ -487,16 +487,27 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
svn_error_t *
svn_wc__db_op_break_move_internal(svn_wc__db_wcroot_t *wcroot,
const char *src_relpath,
- int src_op_depth,
+ int delete_op_depth,
const char *dst_relpath,
const svn_skel_t *work_items,
apr_pool_t *scratch_pool);
svn_error_t *
+svn_wc__db_op_mark_resolved_internal(svn_wc__db_wcroot_t *wcroot,
+ const char *local_relpath,
+ svn_wc__db_t *db,
+ 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);
+
+/* op_depth is the depth at which the node is added. */
+svn_error_t *
svn_wc__db_op_raise_moved_away_internal(
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- int delete_op_depth,
+ int op_depth,
svn_wc__db_t *db,
svn_wc_operation_t operation,
svn_wc_conflict_action_t action,
Modified:
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_update_move.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_update_move.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
---
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_update_move.c
(original)
+++
subversion/branches/svn-info-detail/subversion/libsvn_wc/wc_db_update_move.c
Wed Feb 25 14:51:17 2015
@@ -166,7 +166,7 @@ find_src_op_depth(int *src_op_depth,
*src_op_depth = svn_sqlite__column_int(stmt, 0);
SVN_ERR(svn_sqlite__reset(stmt));
if (!have_row)
- return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
_("'%s' is not deleted"),
path_for_error_message(wcroot, src_relpath,
scratch_pool));
@@ -1343,68 +1343,6 @@ tc_editor_delete(node_move_baton_t *nmb,
* single-revision.
*/
-/* Set *OPERATION, *LOCAL_CHANGE, *INCOMING_CHANGE, *OLD_VERSION, *NEW_VERSION
- * to reflect the tree conflict on the victim SRC_ABSPATH in DB.
- *
- * If SRC_ABSPATH is not a tree-conflict victim, return an error.
- */
-static svn_error_t *
-get_tc_info(svn_wc_operation_t *operation,
- svn_wc_conflict_reason_t *local_change,
- svn_wc_conflict_action_t *incoming_change,
- const char **move_src_op_root_abspath,
- svn_wc_conflict_version_t **old_version,
- svn_wc_conflict_version_t **new_version,
- svn_wc__db_t *db,
- const char *src_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const apr_array_header_t *locations;
- svn_boolean_t tree_conflicted;
- svn_skel_t *conflict_skel;
-
- /* Check for tree conflict on src. */
- SVN_ERR(svn_wc__db_read_conflict(&conflict_skel, NULL,
- db, src_abspath,
- scratch_pool, scratch_pool));
- if (!conflict_skel)
- return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
- _("'%s' is not in conflict"),
- svn_dirent_local_style(src_abspath,
- scratch_pool));
-
- SVN_ERR(svn_wc__conflict_read_info(operation, &locations,
- NULL, NULL, &tree_conflicted,
- db, src_abspath,
- conflict_skel, result_pool,
- scratch_pool));
- if ((*operation != svn_wc_operation_update
- && *operation != svn_wc_operation_switch)
- || !tree_conflicted)
- return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
- _("'%s' is not a tree-conflict victim"),
- svn_dirent_local_style(src_abspath,
- scratch_pool));
- if (locations)
- {
- SVN_ERR_ASSERT(locations->nelts >= 2);
- *old_version = APR_ARRAY_IDX(locations, 0,
- svn_wc_conflict_version_t *);
- *new_version = APR_ARRAY_IDX(locations, 1,
- svn_wc_conflict_version_t *);
- }
-
- SVN_ERR(svn_wc__conflict_read_tree_conflict(local_change,
- incoming_change,
- move_src_op_root_abspath,
- db, src_abspath,
- conflict_skel, scratch_pool,
- scratch_pool));
-
- return SVN_NO_ERROR;
-}
-
/* Return *PROPS, *CHECKSUM, *CHILDREN and *KIND for LOCAL_RELPATH at
OP_DEPTH provided the row exists. Return *KIND of svn_node_none if
the row does not exist, or only describes a delete of a lower op-depth.
@@ -2330,11 +2268,103 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
return SVN_NO_ERROR;
}
+/* Set *OPERATION, *LOCAL_CHANGE, *INCOMING_CHANGE, *OLD_VERSION, *NEW_VERSION
+ * to reflect the tree conflict on the victim SRC_ABSPATH in DB.
+ *
+ * If SRC_ABSPATH is not a tree-conflict victim, return an error.
+ */
+static svn_error_t *
+fetch_conflict_details(int *src_op_depth,
+ svn_wc_operation_t *operation,
+ svn_wc_conflict_action_t *action,
+ svn_wc_conflict_version_t **left_version,
+ svn_wc_conflict_version_t **right_version,
+ svn_wc__db_wcroot_t *wcroot,
+ svn_wc__db_t *db,
+ const char *local_relpath,
+ const svn_skel_t *conflict_skel,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ const apr_array_header_t *locations;
+ svn_boolean_t text_conflicted;
+ svn_boolean_t prop_conflicted;
+ svn_boolean_t tree_conflicted;
+ const char *move_src_op_root_abspath;
+ svn_wc_conflict_reason_t reason;
+ const char *local_abspath = svn_dirent_join(wcroot->abspath, local_relpath,
+ scratch_pool);
+
+ if (!conflict_skel)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("'%s' is not in conflict"),
+ path_for_error_message(wcroot, local_relpath,
+ scratch_pool));
+
+ SVN_ERR(svn_wc__conflict_read_info(operation, &locations,
+ &text_conflicted, &prop_conflicted,
+ &tree_conflicted,
+ db, local_abspath,
+ conflict_skel, result_pool,
+ scratch_pool));
+
+ if (text_conflicted || prop_conflicted || !tree_conflicted)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("'%s' is not a valid tree-conflict victim"),
+ path_for_error_message(wcroot, local_relpath,
+ scratch_pool));
+
+ SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason,
+ action,
+ &move_src_op_root_abspath,
+ db, local_abspath,
+ conflict_skel, result_pool,
+ scratch_pool));
+
+ if (reason == svn_wc_conflict_reason_moved_away)
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("'%s' is already a moved away tree-conflict"),
+ path_for_error_message(wcroot, local_relpath,
+ scratch_pool));
+
+ if (left_version)
+ {
+ if (locations && locations->nelts > 0)
+ *left_version = APR_ARRAY_IDX(locations, 0,
+ svn_wc_conflict_version_t *);
+ else
+ *left_version = NULL;
+ }
+
+ if (right_version)
+ {
+ if (locations && locations->nelts > 1)
+ *right_version = APR_ARRAY_IDX(locations, 1,
+ svn_wc_conflict_version_t *);
+ else
+ *right_version = NULL;
+ }
+
+ {
+ int del_depth = relpath_depth(local_relpath);
+
+ if (move_src_op_root_abspath)
+ del_depth = relpath_depth(
+ svn_dirent_skip_ancestor(wcroot->abspath,
+ move_src_op_root_abspath));
+
+ SVN_ERR(find_src_op_depth(src_op_depth, wcroot, local_relpath, del_depth,
+ scratch_pool));
+ }
+
+ return SVN_NO_ERROR;
+}
+
svn_error_t *
svn_wc__db_op_raise_moved_away_internal(
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- int delete_op_depth,
+ int src_op_depth,
svn_wc__db_t *db,
svn_wc_operation_t operation,
svn_wc_conflict_action_t action,
@@ -2350,13 +2380,14 @@ svn_wc__db_op_raise_moved_away_internal(
STMT_CREATE_UPDATE_MOVE_LIST));
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_MOVED_DESCENDANTS_SHD));
+ STMT_SELECT_MOVED_DESCENDANTS_SRC));
SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
- delete_op_depth));
+ src_op_depth));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
while(have_row)
{
svn_error_t *err;
+ int delete_op_depth = svn_sqlite__column_int(stmt, 0);
const char *src_relpath = svn_sqlite__column_text(stmt, 1, NULL);
svn_node_kind_t src_kind = svn_sqlite__column_token(stmt, 2, kind_map);
const char *src_repos_relpath = svn_sqlite__column_text(stmt, 3, NULL);
@@ -2399,42 +2430,52 @@ svn_wc__db_op_raise_moved_away_internal(
}
svn_error_t *
-svn_wc__db_resolve_delete_raise_moved_away(svn_wc__db_t *db,
- const char *local_abspath,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool)
+svn_wc__db_op_raise_moved_away(svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool)
{
svn_wc__db_wcroot_t *wcroot;
const char *local_relpath;
svn_wc_operation_t operation;
- svn_wc_conflict_reason_t reason;
svn_wc_conflict_action_t action;
- svn_wc_conflict_version_t *old_version, *new_version;
+ svn_wc_conflict_version_t *left_version, *right_version;
+ int move_src_op_depth;
+ svn_skel_t *conflict;
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(get_tc_info(&operation, &reason, &action, NULL,
- &old_version, &new_version,
- db, local_abspath, scratch_pool, scratch_pool));
-
- SVN_WC__DB_WITH_TXN(
+ SVN_WC__DB_WITH_TXN4(
+ svn_wc__db_read_conflict_internal(&conflict, NULL,
+ wcroot, local_relpath,
+ scratch_pool, scratch_pool),
+ fetch_conflict_details(&move_src_op_depth,
+ &operation, &action,
+ &left_version, &right_version,
+ wcroot, db, local_relpath, conflict,
+ scratch_pool, scratch_pool),
+ svn_wc__db_op_mark_resolved_internal(wcroot, local_relpath, db,
+ FALSE, FALSE, TRUE,
+ NULL, scratch_pool),
svn_wc__db_op_raise_moved_away_internal(wcroot, local_relpath,
- relpath_depth(local_relpath),
+ move_src_op_depth,
db, operation, action,
- old_version, new_version,
+ left_version, right_version,
scratch_pool),
wcroot);
+ /* These version numbers are valid for update/switch notifications
+ only! */
SVN_ERR(svn_wc__db_update_move_list_notify(wcroot,
- (old_version
- ? old_version->peg_rev
+ (left_version
+ ? left_version->peg_rev
: SVN_INVALID_REVNUM),
- (new_version
- ? new_version->peg_rev
+ (right_version
+ ? right_version->peg_rev
: SVN_INVALID_REVNUM),
notify_func, notify_baton,
scratch_pool));
@@ -2444,44 +2485,15 @@ svn_wc__db_resolve_delete_raise_moved_aw
static svn_error_t *
break_moved_away(svn_wc__db_wcroot_t *wcroot,
+ svn_wc__db_t *db,
const char *local_relpath,
- int op_depth,
+ int src_op_depth,
apr_pool_t *scratch_pool)
{
- const char *dst_relpath;
- int src_op_depth;
- const char *delete_relpath;
-
- SVN_ERR(find_src_op_depth(&src_op_depth, wcroot,
- local_relpath, op_depth,
- scratch_pool));
-
-
- SVN_ERR(svn_wc__db_scan_moved_to_internal(NULL, &dst_relpath,
- &delete_relpath,
- wcroot, local_relpath,
- src_op_depth,
- scratch_pool, scratch_pool));
-
- SVN_ERR_ASSERT(dst_relpath != NULL && delete_relpath != NULL);
-
- SVN_ERR(svn_wc__db_op_break_move_internal(wcroot, local_relpath,
- relpath_depth(delete_relpath),
- dst_relpath, NULL,
- scratch_pool));
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-break_moved_away_children(svn_wc__db_wcroot_t *wcroot,
- svn_wc__db_t *db,
- const char *local_relpath,
- apr_pool_t *scratch_pool)
-{
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
apr_pool_t *iterpool;
+ svn_error_t *err = NULL;
SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
STMT_CREATE_UPDATE_MOVE_LIST));
@@ -2489,112 +2501,92 @@ break_moved_away_children(svn_wc__db_wcr
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_MOVED_DESCENDANTS_SRC));
SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
- relpath_depth(local_relpath)));
+ src_op_depth));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
iterpool = svn_pool_create(scratch_pool);
while (have_row)
{
- int src_op_depth = svn_sqlite__column_int(stmt, 0) ;
+ int src_op_depth = svn_sqlite__column_int(stmt, 0);
const char *src_relpath = svn_sqlite__column_text(stmt, 1, NULL);
svn_node_kind_t src_kind = svn_sqlite__column_token(stmt, 2, kind_map);
const char *dst_relpath = svn_sqlite__column_text(stmt, 4, NULL);
- svn_error_t *err;
svn_pool_clear(iterpool);
- err = svn_wc__db_op_break_move_internal(wcroot,
- src_relpath, src_op_depth,
- dst_relpath, NULL, iterpool);
+ err = verify_write_lock(wcroot, src_relpath, iterpool);
- if (! err)
- {
- err = update_move_list_add(wcroot, src_relpath, db,
- svn_wc_notify_move_broken,
- src_kind,
- svn_wc_notify_state_inapplicable,
- svn_wc_notify_state_inapplicable,
- NULL, NULL, scratch_pool);
- }
+ if (!err)
+ err = verify_write_lock(wcroot, dst_relpath, iterpool);
if (err)
- {
- return svn_error_trace(
- svn_error_compose_create(err,
- svn_sqlite__reset(stmt)));
- }
-
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- }
- svn_pool_destroy(iterpool);
-
- SVN_ERR(svn_sqlite__reset(stmt));
-
- return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__db_resolve_break_moved_away(svn_wc__db_t *db,
- const char *local_abspath,
- const char *src_op_root_abspath,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool)
-{
- svn_wc__db_wcroot_t *wcroot;
- const char *local_relpath;
- const char *src_relpath;
+ break;
- SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
- db, local_abspath,
- scratch_pool, scratch_pool));
- VERIFY_USABLE_WCROOT(wcroot);
+ err = svn_error_trace(
+ svn_wc__db_op_break_move_internal(wcroot,
+ src_relpath, src_op_depth,
+ dst_relpath, NULL, iterpool));
- src_relpath = svn_dirent_skip_ancestor(wcroot->abspath, src_op_root_abspath);
- SVN_ERR_ASSERT(src_relpath != NULL);
+ if (err)
+ break;
- SVN_WC__DB_WITH_TXN(break_moved_away(wcroot, local_relpath,
- relpath_depth(src_relpath),
- scratch_pool),
- wcroot);
+ err = svn_error_trace(
+ update_move_list_add(wcroot, src_relpath, db,
+ svn_wc_notify_move_broken,
+ src_kind,
+ svn_wc_notify_state_inapplicable,
+ svn_wc_notify_state_inapplicable,
+ NULL, NULL, scratch_pool));
- if (notify_func)
- {
- svn_wc_notify_t *notify;
+ if (err)
+ break;
- notify = svn_wc_create_notify(svn_dirent_join(wcroot->abspath,
- local_relpath,
- scratch_pool),
- svn_wc_notify_move_broken,
- scratch_pool);
- notify->kind = svn_node_unknown;
- notify->content_state = svn_wc_notify_state_inapplicable;
- notify->prop_state = svn_wc_notify_state_inapplicable;
- notify->revision = SVN_INVALID_REVNUM;
- notify_func(notify_baton, notify, scratch_pool);
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
+ svn_pool_destroy(iterpool);
- return SVN_NO_ERROR;
+ return svn_error_compose_create(err, svn_sqlite__reset(stmt));
}
svn_error_t *
-svn_wc__db_resolve_break_moved_away_children(svn_wc__db_t *db,
- const char *local_abspath,
- const char *src_op_root_abspath,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool)
+svn_wc__db_op_break_moved_away(svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *del_op_root_abspath,
+ svn_boolean_t mark_tc_resolved,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool)
{
svn_wc__db_wcroot_t *wcroot;
const char *local_relpath;
+ const char *del_relpath;
+ int src_op_depth;
SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
db, local_abspath,
scratch_pool, scratch_pool));
VERIFY_USABLE_WCROOT(wcroot);
- SVN_WC__DB_WITH_TXN(
- break_moved_away_children(wcroot, db, local_relpath, scratch_pool),
+ if (del_op_root_abspath)
+ del_relpath = svn_dirent_skip_ancestor(wcroot->abspath,
+ del_op_root_abspath);
+ else
+ del_relpath = NULL;
+
+
+ SVN_WC__DB_WITH_TXN4(
+ find_src_op_depth(&src_op_depth, wcroot, local_relpath,
+ del_relpath ? relpath_depth(del_relpath)
+ : relpath_depth(local_relpath),
+ scratch_pool),
+ break_moved_away(wcroot, db, local_relpath, src_op_depth,
+ scratch_pool),
+ mark_tc_resolved
+ ? svn_wc__db_op_mark_resolved_internal(wcroot, local_relpath, db,
+ FALSE, FALSE, TRUE,
+ NULL, scratch_pool)
+ : SVN_NO_ERROR,
+ SVN_NO_ERROR,
wcroot);
SVN_ERR(svn_wc__db_update_move_list_notify(wcroot,
Modified: subversion/branches/svn-info-detail/subversion/svn/cl.h
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/svn/cl.h?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/svn/cl.h (original)
+++ subversion/branches/svn-info-detail/subversion/svn/cl.h Wed Feb 25 14:51:17
2015
@@ -167,7 +167,6 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t version; /* print version information */
svn_boolean_t verbose; /* be verbose */
svn_boolean_t update; /* contact the server for the full story */
- svn_boolean_t strict; /* do strictly what was requested */
svn_stringbuf_t *filedata; /* contents of file used as option data
(not converted to UTF-8) */
const char *encoding; /* the locale/encoding of 'message' and of
Modified: subversion/branches/svn-info-detail/subversion/svn/propget-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/svn/propget-cmd.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/svn-info-detail/subversion/svn/propget-cmd.c Wed Feb 25
14:51:17 2015
@@ -322,11 +322,11 @@ svn_cl__propget(apr_getopt_t *os,
svn_stream_t *out;
svn_boolean_t warned = FALSE;
- if (opt_state->verbose && (opt_state->revprop || opt_state->strict
+ if (opt_state->verbose && (opt_state->revprop || opt_state->no_newline
|| opt_state->xml))
return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
_("--verbose cannot be used with --revprop or "
- "--strict or --xml"));
+ "--no-newline or --xml"));
/* PNAME is first argument (and PNAME_UTF8 will be a UTF-8 version
thereof) */
@@ -411,7 +411,7 @@ svn_cl__propget(apr_getopt_t *os,
SVN_ERR(stream_write(out, printable_val->data,
printable_val->len));
- if (! opt_state->strict)
+ if (! opt_state->no_newline)
SVN_ERR(stream_write(out, APR_EOL_STR, strlen(APR_EOL_STR)));
}
}
@@ -427,16 +427,16 @@ svn_cl__propget(apr_getopt_t *os,
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_empty;
- /* Strict mode only makes sense for a single target. So make
+ /* No-newline mode only makes sense for a single target. So make
sure we have only a single target, and that we're not being
asked to recurse on that target. */
- if (opt_state->strict
+ if (opt_state->no_newline
&& ((targets->nelts > 1) || (opt_state->depth != svn_depth_empty)
|| (opt_state->show_inherited_props)))
return svn_error_create
(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("Strict output of property values only available for single-"
- "target, non-recursive propget operations"));
+ _("--no-newline is only available for single-target,"
+ " non-recursive propget operations"));
for (i = 0; i < targets->nelts; i++)
{
@@ -472,15 +472,15 @@ svn_cl__propget(apr_getopt_t *os,
/* Any time there is more than one thing to print, or where
the path associated with a printed thing is not obvious,
we'll print filenames. That is, unless we've been told
- not to do so with the --strict option. */
+ not to do so with the --no-newline option. */
print_filenames = ((opt_state->depth > svn_depth_empty
|| targets->nelts > 1
|| apr_hash_count(props) > 1
|| opt_state->verbose
|| opt_state->show_inherited_props)
- && (! opt_state->strict));
- omit_newline = opt_state->strict;
- like_proplist = opt_state->verbose && !opt_state->strict;
+ && (! opt_state->no_newline));
+ omit_newline = opt_state->no_newline;
+ like_proplist = opt_state->verbose && !opt_state->no_newline;
/* If there are no properties, and exactly one node was queried,
then warn. */
Modified: subversion/branches/svn-info-detail/subversion/svn/svn.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/svn/svn.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/svn/svn.c (original)
+++ subversion/branches/svn-info-detail/subversion/svn/svn.c Wed Feb 25
14:51:17 2015
@@ -110,7 +110,7 @@ typedef enum svn_cl__longopt_t {
opt_remove,
opt_revprop,
opt_stop_on_copy,
- opt_strict,
+ opt_strict, /* ### DEPRECATED */
opt_targets,
opt_depth,
opt_set_depth,
@@ -233,7 +233,7 @@ const apr_getopt_option_t svn_cl__option
" "
"'empty', 'files', 'immediates', or 'infinity')")},
{"xml", opt_xml, 0, N_("output in XML")},
- {"strict", opt_strict, 0, N_("use strict semantics")},
+ {"strict", opt_strict, 0, N_("DEPRECATED")},
{"stop-on-copy", opt_stop_on_copy, 0,
N_("do not cross copies while traversing history")},
{"no-ignore", opt_no_ignore, 0,
@@ -1373,14 +1373,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
"\n"
" By default, an extra newline is printed after the property value so
that\n"
" the output looks pretty. With a single TARGET, depth 'empty' and
without\n"
- " --show-inherited-props, you can use the --strict option to disable
this\n"
+ " --show-inherited-props, you can use the --no-newline option to disable
this\n"
" (useful when redirecting a binary property value to a file, for
example).\n"
"\n"
" See 'svn help propset' for descriptions of the svn:* special
properties.\n"),
- {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_xml,
+ {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_no_newline,
opt_xml,
opt_changelist, opt_show_inherited_props },
{{'v', N_("print path, name and value on separate lines")},
- {opt_strict, N_("don't print an extra newline")}} },
+ {opt_strict, N_("(deprecated; use --no-newline)")}} },
{ "proplist", svn_cl__proplist, {"plist", "pl"}, N_
("List all properties on files, dirs, or revisions.\n"
@@ -2172,9 +2172,6 @@ sub_main(int *exit_code, int argc, const
case opt_stop_on_copy:
opt_state.stop_on_copy = TRUE;
break;
- case opt_strict:
- opt_state.strict = TRUE;
- break;
case opt_no_ignore:
opt_state.no_ignore = TRUE;
break;
@@ -2416,6 +2413,7 @@ sub_main(int *exit_code, int argc, const
opt_state.remove_ignored = TRUE;
break;
case opt_no_newline:
+ case opt_strict: /* ### DEPRECATED */
opt_state.no_newline = TRUE;
break;
case opt_show_passwords:
Modified:
subversion/branches/svn-info-detail/subversion/tests/cmdline/checkout_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/tests/cmdline/checkout_tests.py?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
---
subversion/branches/svn-info-detail/subversion/tests/cmdline/checkout_tests.py
(original)
+++
subversion/branches/svn-info-detail/subversion/tests/cmdline/checkout_tests.py
Wed Feb 25 14:51:17 2015
@@ -662,7 +662,7 @@ def checkout_peg_rev_date(sbox):
## Get svn:date.
exit_code, output, errput = svntest.main.run_svn(None, 'propget', 'svn:date',
'--revprop', '-r1',
- '--strict',
+ '--no-newline',
sbox.repo_url)
if exit_code or errput != [] or len(output) != 1:
raise svntest.Failure("svn:date propget failed")
Modified:
subversion/branches/svn-info-detail/subversion/tests/cmdline/prop_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/tests/cmdline/prop_tests.py?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/tests/cmdline/prop_tests.py
(original)
+++ subversion/branches/svn-info-detail/subversion/tests/cmdline/prop_tests.py
Wed Feb 25 14:51:17 2015
@@ -2611,7 +2611,7 @@ def peg_rev_base_working(sbox):
sbox.simple_commit(message='r2')
svntest.actions.set_prop('cardinal', 'nine\n', sbox.ospath('iota'))
svntest.actions.run_and_verify_svn(['ninth\n'], [],
- 'propget', '--strict', 'ordinal',
+ 'propget', '--no-newline', 'ordinal',
sbox.ospath('iota') + '@BASE')
@Issue(4415)
@@ -2644,7 +2644,7 @@ def xml_unsafe_author(sbox):
# a single property value which skips creating the creator-displayname
property
svntest.actions.run_and_verify_svn(['foo\bbar'], [],
'propget', '--revprop', '-r', '1',
- 'svn:author', '--strict', wc_dir)
+ 'svn:author', '--no-newline', wc_dir)
# Ensure a stable date
svntest.actions.run_and_verify_svn(None, [],
Modified:
subversion/branches/svn-info-detail/subversion/tests/cmdline/special_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/tests/cmdline/special_tests.py?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
---
subversion/branches/svn-info-detail/subversion/tests/cmdline/special_tests.py
(original)
+++
subversion/branches/svn-info-detail/subversion/tests/cmdline/special_tests.py
Wed Feb 25 14:51:17 2015
@@ -705,7 +705,7 @@ def propvalue_normalized(sbox):
# Property value should be SVN_PROP_BOOLEAN_TRUE
expected_propval = ['*']
svntest.actions.run_and_verify_svn(expected_propval, [],
- 'propget', '--strict', 'svn:special',
+ 'propget', '--no-newline', 'svn:special',
iota2_path)
# Commit and check again.
@@ -722,7 +722,7 @@ def propvalue_normalized(sbox):
svntest.main.run_svn(None, 'update', wc_dir)
svntest.actions.run_and_verify_svn(expected_propval, [],
- 'propget', '--strict', 'svn:special',
+ 'propget', '--no-newline', 'svn:special',
iota2_path)
Modified:
subversion/branches/svn-info-detail/subversion/tests/cmdline/svnmucc_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/tests/cmdline/svnmucc_tests.py?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
---
subversion/branches/svn-info-detail/subversion/tests/cmdline/svnmucc_tests.py
(original)
+++
subversion/branches/svn-info-detail/subversion/tests/cmdline/svnmucc_tests.py
Wed Feb 25 14:51:17 2015
@@ -345,7 +345,7 @@ def propset_root_internal(sbox, target):
'propset', 'foo', 'bar',
target)
svntest.actions.run_and_verify_svn('bar', [],
- 'propget', '--strict', 'foo',
+ 'propget', '--no-newline', 'foo',
target)
## propdel on ^/
@@ -355,7 +355,7 @@ def propset_root_internal(sbox, target):
target)
svntest.actions.run_and_verify_svn([],
'.*W200017: Property.*not found',
- 'propget', '--strict', 'foo',
+ 'propget', '--no-newline', 'foo',
target)
@Issues(3663)
Modified:
subversion/branches/svn-info-detail/subversion/tests/cmdline/trans_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/tests/cmdline/trans_tests.py?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
--- subversion/branches/svn-info-detail/subversion/tests/cmdline/trans_tests.py
(original)
+++ subversion/branches/svn-info-detail/subversion/tests/cmdline/trans_tests.py
Wed Feb 25 14:51:17 2015
@@ -680,7 +680,7 @@ def cat_keyword_expansion(sbox):
sbox.wc_dir)
svntest.actions.run_and_verify_svn([ full_author ], [],
'propget', '--revprop', '-r2',
- 'svn:author', '--strict',
+ 'svn:author', '--no-newline',
sbox.wc_dir)
# Make another commit so that the last changed revision for A/mu is
Modified:
subversion/branches/svn-info-detail/subversion/tests/libsvn_wc/op-depth-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/svn-info-detail/subversion/tests/libsvn_wc/op-depth-test.c?rev=1662234&r1=1662233&r2=1662234&view=diff
==============================================================================
---
subversion/branches/svn-info-detail/subversion/tests/libsvn_wc/op-depth-test.c
(original)
+++
subversion/branches/svn-info-detail/subversion/tests/libsvn_wc/op-depth-test.c
Wed Feb 25 14:51:17 2015
@@ -128,6 +128,7 @@ typedef struct conflict_info_t {
#define NO_COPY_FROM SVN_INVALID_REVNUM, NULL, FALSE
#define MOVED_HERE FALSE, NULL, TRUE
#define NOT_MOVED FALSE, NULL, FALSE
+#define FILE_EXTERNAL TRUE
/* Return a comma-separated list of the prop names in PROPS, in lexically
* ascending order, or NULL if PROPS is empty or NULL. (Here, we don't
@@ -176,13 +177,17 @@ print_row(const nodes_row_t *row,
else
moved_to_str = "";
- if (row->moved_here)
+ if (row->moved_here && !row->file_external && !row->moved_to)
moved_here_str = ", MOVED_HERE";
+ else if (row->moved_to)
+ moved_here_str = ", TRUE";
else
moved_here_str = "";
if (row->file_external)
- file_external_str = ", file-external";
+ file_external_str = ", FILE_EXTERNAL";
+ else if (row->moved_to || row->props)
+ file_external_str = ", FALSE";
else
file_external_str = "";
@@ -194,14 +199,14 @@ print_row(const nodes_row_t *row,
if (row->repo_revnum == SVN_INVALID_REVNUM)
return apr_psprintf(result_pool, "%d, %-20s%-15s NO_COPY_FROM%s%s%s%s",
row->op_depth, relpath_str, presence_str,
- moved_here_str, moved_to_str,
- file_external_str, props);
+ file_external_str, moved_here_str, moved_to_str,
+ props);
else
return apr_psprintf(result_pool, "%d, %-20s%-15s %d, \"%s\"%s%s%s%s",
row->op_depth, relpath_str, presence_str,
(int)row->repo_revnum, row->repo_relpath,
- moved_here_str, moved_to_str,
- file_external_str, props);
+ file_external_str, moved_here_str, moved_to_str,
+ props);
}
/* A baton to pass through svn_hash_diff() to compare_nodes_rows(). */
typedef struct comparison_baton_t {
@@ -9645,8 +9650,14 @@ del4_update_edit_AAA(const svn_test_opts
SVN_ERR(check_db_conflicts(&b, "", conflicts));
}
+ /* This breaks the move A/A/A -> AAA_1 */
+ SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
svn_wc_conflict_choose_merged));
+ /* This breaks the move B -> A */
+ SVN_ERR(sbox_wc_resolve(&b, "B", svn_depth_empty,
svn_wc_conflict_choose_merged));
+ /* This breaks the move C/A/A -> A/A */
+ SVN_ERR(sbox_wc_resolve(&b, "C/A", svn_depth_empty,
svn_wc_conflict_choose_merged));
/* This breaks the move from D/A/A -> A/A/A */
- SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
svn_wc_conflict_choose_merged));
+ SVN_ERR(sbox_wc_resolve(&b, "D/A/A", svn_depth_empty,
svn_wc_conflict_choose_merged));
{
nodes_row_t nodes[] = {
@@ -9669,12 +9680,12 @@ del4_update_edit_AAA(const svn_test_opts
{0, "D/A/A/A", "normal", 2, "D/A/A/A", NOT_MOVED, "key"},
{1, "A", "normal", 1, "B"},
{1, "A/A", "normal", 1, "B/A"},
- {1, "A/A/A", "normal", 1, "B/A/A", FALSE, "AAA_1"},
+ {1, "A/A/A", "normal", 1, "B/A/A", FALSE},
{1, "A/A/A/A", "normal", 1, "B/A/A/A"},
- {1, "AAA_1", "normal", 1, "A/A/A", MOVED_HERE},
- {1, "AAA_1/A", "normal", 1, "A/A/A/A", MOVED_HERE},
- {1, "AAA_2", "normal", 1, "B/A/A"},
- {1, "AAA_2/A", "normal", 1, "B/A/A/A"},
+ {1, "AAA_1", "normal", 1, "A/A/A"},
+ {1, "AAA_1/A", "normal", 1, "A/A/A/A"},
+ {1, "AAA_2", "normal", 1, "B/A/A", MOVED_HERE},
+ {1, "AAA_2/A", "normal", 1, "B/A/A/A", MOVED_HERE},
{1, "AAA_3", "normal", 1, "C/A/A", MOVED_HERE},
{1, "AAA_3/A", "normal", 1, "C/A/A/A", MOVED_HERE},
{1, "B", "base-deleted", NO_COPY_FROM},
@@ -9682,7 +9693,7 @@ del4_update_edit_AAA(const svn_test_opts
{1, "B/A/A", "base-deleted", NO_COPY_FROM},
{1, "B/A/A/A", "base-deleted", NO_COPY_FROM},
{2, "A/A", "normal", 1, "C/A"},
- {2, "A/A/A", "normal", 1, "C/A/A"},
+ {2, "A/A/A", "normal", 1, "C/A/A", FALSE, "AAA_2"},
{2, "A/A/A/A", "normal", 1, "C/A/A/A"},
{2, "C/A", "base-deleted", NO_COPY_FROM},
{2, "C/A/A", "base-deleted", NO_COPY_FROM},
@@ -10336,7 +10347,7 @@ move4_update_delself_AAA(const svn_test_
conflict_info_t conflicts[] = {
{"A", FALSE, FALSE, { svn_wc_conflict_action_edit,
- svn_wc_conflict_reason_moved_away, "A"}},
+ svn_wc_conflict_reason_replaced}},
{"B", FALSE, FALSE, { svn_wc_conflict_action_edit,
svn_wc_conflict_reason_moved_away, "B"}},
{"C/A", FALSE, FALSE, { svn_wc_conflict_action_edit,