You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/12/23 06:58:53 UTC
svn commit: r1425414 [5/5] - in /subversion/branches/javahl-ra: ./
notes/wc-ng/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/bindings/javahl/tests/org/tigris/subversion/javahl/
subversion/include/ subversion/libsvn_subr/ su...
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c Sun Dec 23 05:58:52 2012
@@ -34,6 +34,7 @@
#include "wc_db.h"
#include "workqueue.h"
#include "adm_files.h"
+#include "conflicts.h"
#include "translate.h"
#include "svn_private_config.h"
@@ -1322,58 +1323,64 @@ run_set_text_conflict_markers(svn_wc__db
scratch_pool, scratch_pool));
}
- return svn_error_trace(
- svn_wc__db_temp_op_set_text_conflict_marker_files(db,
- local_abspath,
- old_abspath,
- new_abspath,
- wrk_abspath,
- scratch_pool));
-}
+ /* Upgrade scenario: We have a workqueue item that describes how to install a
+ non skel conflict. Fetch all the information we can to create a new style
+ conflict. */
+ /* ### Before format 30 this is/was a common code path as we didn't install
+ ### the conflict directly in the db. It just calls the wc_db code
+ ### to set the right fields. */
+ {
+ /* Check if we also have a property conflict... */
+ const apr_array_header_t *conflicts;
+ svn_skel_t *conflict_skel;
+ int i;
-svn_error_t *
-svn_wc__wq_tmp_build_set_text_conflict_markers(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *old_abspath,
- const char *new_abspath,
- const char *wrk_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const char *local_relpath;
- *work_item = svn_skel__make_empty_list(result_pool);
+ conflict_skel = svn_wc__conflict_skel_create(scratch_pool);
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+ SVN_ERR(svn_wc__db_read_conflicts(&conflicts, db, local_abspath,
+ scratch_pool, scratch_pool));
+
+ if (conflicts)
+ for (i = 0; i < conflicts->nelts; i++)
+ {
+ svn_wc_conflict_description2_t *desc =
+ APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description2_t *);
+ apr_hash_t *prop_names;
+
+ if (desc->kind != svn_wc_conflict_kind_property)
+ continue;
+
+ prop_names = apr_hash_make(scratch_pool);
+
+ /* Add the absolute minimal property conflict */
+ SVN_ERR(svn_wc__conflict_skel_add_prop_conflict(conflict_skel, db,
+ local_abspath,
+ desc->their_abspath,
+ NULL, NULL, NULL,
+ prop_names,
+ scratch_pool,
+ scratch_pool));
- /* Abspaths in the workqueue won't work if the WC is moved. */
- if (wrk_abspath)
- SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
- wrk_abspath, result_pool, scratch_pool));
-
- svn_skel__prepend_str(wrk_abspath ? local_relpath : "",
- *work_item, result_pool);
-
- if (new_abspath)
- SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
- new_abspath, result_pool, scratch_pool));
- svn_skel__prepend_str(new_abspath ? local_relpath : "",
- *work_item, result_pool);
-
- if (old_abspath)
- SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
- old_abspath, result_pool, scratch_pool));
- svn_skel__prepend_str(old_abspath ? local_relpath : "",
- *work_item, result_pool);
+ break;
+ }
- SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
- local_abspath, result_pool, scratch_pool));
+ SVN_ERR(svn_wc__conflict_skel_add_text_conflict(conflict_skel, db,
+ local_abspath,
+ wrk_abspath,
+ old_abspath,
+ new_abspath,
+ scratch_pool,
+ scratch_pool));
- svn_skel__prepend_str(local_relpath, *work_item, result_pool);
- svn_skel__prepend_str(OP_TMP_SET_TEXT_CONFLICT_MARKERS, *work_item,
- result_pool);
+ /* ### Set some 'none' operation? */
+ SVN_ERR(svn_wc__conflict_skel_set_op_update(conflict_skel, NULL,
+ scratch_pool,
+ scratch_pool));
+ SVN_ERR(svn_wc__db_op_mark_conflict(db, local_abspath, conflict_skel,
+ NULL, scratch_pool));
+ }
return SVN_NO_ERROR;
}
@@ -1409,40 +1416,57 @@ run_set_property_conflict_marker(svn_wc_
local_relpath,
scratch_pool, scratch_pool));
- return svn_error_trace(
- svn_wc__db_temp_op_set_property_conflict_marker_file(db,
- local_abspath,
- prej_abspath,
- scratch_pool));
-}
+ {
+ /* Check if we also have a property conflict... */
+ const apr_array_header_t *conflicts;
+ svn_skel_t *conflict_skel;
+ int i;
+ apr_hash_t *prop_names;
-svn_error_t *
-svn_wc__wq_tmp_build_set_property_conflict_marker(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *prej_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const char *local_relpath;
- *work_item = svn_skel__make_empty_list(result_pool);
+ conflict_skel = svn_wc__conflict_skel_create(scratch_pool);
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+ SVN_ERR(svn_wc__db_read_conflicts(&conflicts, db, local_abspath,
+ scratch_pool, scratch_pool));
- if (prej_abspath)
- SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
- prej_abspath, result_pool, scratch_pool));
+ if (conflicts)
+ for (i = 0; i < conflicts->nelts; i++)
+ {
+ svn_wc_conflict_description2_t *desc =
+ APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description2_t *);
- svn_skel__prepend_str(prej_abspath ? local_relpath : "",
- *work_item, result_pool);
+ if (desc->kind != svn_wc_conflict_kind_text)
+ continue;
- SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
- local_abspath, result_pool, scratch_pool));
+ /* Add the existing text conflict */
+ SVN_ERR(svn_wc__conflict_skel_add_text_conflict(
+ conflict_skel, db,
+ local_abspath,
+ desc->my_abspath,
+ desc->base_abspath,
+ desc->their_abspath,
+ scratch_pool,
+ scratch_pool));
- svn_skel__prepend_str(local_relpath, *work_item, result_pool);
- svn_skel__prepend_str(OP_TMP_SET_PROPERTY_CONFLICT_MARKER, *work_item,
- result_pool);
+ break;
+ }
+ prop_names = apr_hash_make(scratch_pool);
+ SVN_ERR(svn_wc__conflict_skel_add_prop_conflict(conflict_skel, db,
+ local_abspath,
+ prej_abspath,
+ NULL, NULL, NULL,
+ prop_names,
+ scratch_pool,
+ scratch_pool));
+
+ /* ### Set some 'none' operation? */
+ SVN_ERR(svn_wc__conflict_skel_set_op_update(conflict_skel, NULL,
+ scratch_pool,
+ scratch_pool));
+
+ SVN_ERR(svn_wc__db_op_mark_conflict(db, local_abspath, conflict_skel,
+ NULL, scratch_pool));
+ }
return SVN_NO_ERROR;
}
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h Sun Dec 23 05:58:52 2012
@@ -200,47 +200,6 @@ svn_wc__wq_build_base_remove(svn_skel_t
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-
-/* ### Temporary helper to store text conflict marker locations as a wq
- ### operation. Eventually the data must be stored in the pristine store+db
- ### before the wq runs (within the operation transaction) and then a wq
- ### operation will create the markers.
-
- Set *WORK_ITEM to a new work item that sets the conflict marker values
- on ACTUAL_NODE to the passed values or to NULL if NULL is passed.
-
- Allocate the result in RESULT_POOL and perform temporary allocations
- in SCRATCH_POOL
-*/
-svn_error_t *
-svn_wc__wq_tmp_build_set_text_conflict_markers(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *old_abspath,
- const char *new_abspath,
- const char *wrk_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/* ### Temporary helper to store the property conflict marker location as a wq
- ### operation. Eventually the data must be stored in the pristine store+db
- ### before the wq runs (within the operation transaction) and then a wq
- ### operation will create the marker.
-
- Set *WORK_ITEM to a new work item that sets the conflict marker values
- on ACTUAL_NODE to the passed values or to NULL if NULL is passed.
-
- Allocate the result in RESULT_POOL and perform temporary allocations
- in SCRATCH_POOL
-*/
-svn_error_t *
-svn_wc__wq_tmp_build_set_property_conflict_marker(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *prej_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
/* Handle the final post-commit step of retranslating and recording the
working copy state of a committed file.
Modified: subversion/branches/javahl-ra/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/cl.h?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/cl.h (original)
+++ subversion/branches/javahl-ra/subversion/svn/cl.h Sun Dec 23 05:58:52 2012
@@ -237,6 +237,8 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t show_diff; /* produce diff output (maps to --diff) */
svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
+ const char *search_pattern; /* pattern argument for --search */
+ svn_boolean_t case_insensitive_search; /* perform case-insensitive search */
} svn_cl__opt_state_t;
Modified: subversion/branches/javahl-ra/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/log-cmd.c?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/log-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/log-cmd.c Sun Dec 23 05:58:52 2012
@@ -24,6 +24,7 @@
#define APR_WANT_STRFUNC
#define APR_WANT_STDIO
#include <apr_want.h>
+#include <apr_fnmatch.h>
#include "svn_client.h"
#include "svn_compat.h"
@@ -70,6 +71,11 @@ struct log_receiver_baton
/* Stack which keeps track of merge revision nesting, using svn_revnum_t's */
apr_array_header_t *merge_stack;
+ /* Log message search pattern. Log entries will only be shown if the author,
+ * the log message, or a changed path matches this pattern. */
+ const char *search_pattern;
+ svn_boolean_t case_insensitive_search;
+
/* Pool for persistent allocations. */
apr_pool_t *pool;
};
@@ -141,6 +147,63 @@ display_diff(const svn_log_entry_t *log_
}
+/* Return TRUE if SEARCH_PATTERN matches the AUTHOR, DATE, LOG_MESSAGE,
+ * or a path in the set of keys of the CHANGED_PATHS hash. Else, return FALSE.
+ * Any of AUTHOR, DATE, LOG_MESSAGE, and CHANGED_PATHS may be NULL. */
+static svn_boolean_t
+match_search_pattern(const char *search_pattern,
+ const char *author,
+ const char *date,
+ const char *log_message,
+ apr_hash_t *changed_paths,
+ svn_boolean_t case_insensitive_search,
+ apr_pool_t *pool)
+{
+ /* Match any substring containing the pattern, like UNIX 'grep' does. */
+ const char *pattern = apr_psprintf(pool, "*%s*", search_pattern);
+ int flags = (case_insensitive_search ? APR_FNM_CASE_BLIND : 0);
+
+ /* Does the author match the search pattern? */
+ if (author && apr_fnmatch(pattern, author, flags) == APR_SUCCESS)
+ return TRUE;
+
+ /* Does the date the search pattern? */
+ if (date && apr_fnmatch(pattern, date, flags) == APR_SUCCESS)
+ return TRUE;
+
+ /* Does the log message the search pattern? */
+ if (log_message && apr_fnmatch(pattern, log_message, flags) == APR_SUCCESS)
+ return TRUE;
+
+ if (changed_paths)
+ {
+ apr_hash_index_t *hi;
+
+ /* Does a changed path match the search pattern? */
+ for (hi = apr_hash_first(pool, changed_paths);
+ hi;
+ hi = apr_hash_next(hi))
+ {
+ const char *path = svn__apr_hash_index_key(hi);
+ svn_log_changed_path2_t *log_item;
+
+ if (apr_fnmatch(pattern, path, flags) == APR_SUCCESS)
+ return TRUE;
+
+ /* Match copy-from paths, too. */
+ log_item = svn__apr_hash_index_val(hi);
+ if (log_item->copyfrom_path
+ && SVN_IS_VALID_REVNUM(log_item->copyfrom_rev)
+ && apr_fnmatch(pattern,
+ log_item->copyfrom_path, flags) == APR_SUCCESS)
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+
/* Implement `svn_log_entry_receiver_t', printing the logs in
* a human-readable and machine-parseable format.
*
@@ -257,6 +320,17 @@ log_entry_receiver(void *baton,
if (! lb->omit_log_message && message == NULL)
message = "";
+ if (lb->search_pattern &&
+ ! match_search_pattern(lb->search_pattern, author, date, message,
+ log_entry->changed_paths2,
+ lb->case_insensitive_search, pool))
+ {
+ if (log_entry->has_children)
+ APR_ARRAY_PUSH(lb->merge_stack, svn_revnum_t) = log_entry->revision;
+
+ return SVN_NO_ERROR;
+ }
+
SVN_ERR(svn_cmdline_printf(pool,
SEP_STRING "r%ld | %s | %s",
log_entry->revision, author, date));
@@ -418,13 +492,6 @@ log_entry_receiver_xml(void *baton,
svn_compat_log_revprops_out(&author, &date, &message, log_entry->revprops);
- if (author)
- author = svn_xml_fuzzy_escape(author, pool);
- if (date)
- date = svn_xml_fuzzy_escape(date, pool);
- if (message)
- message = svn_xml_fuzzy_escape(message, pool);
-
if (log_entry->revision == 0 && message == NULL)
return SVN_NO_ERROR;
@@ -437,6 +504,25 @@ log_entry_receiver_xml(void *baton,
return SVN_NO_ERROR;
}
+ /* Match search pattern before XML-escaping. */
+ if (lb->search_pattern &&
+ ! match_search_pattern(lb->search_pattern, author, date, message,
+ log_entry->changed_paths2,
+ lb->case_insensitive_search, pool))
+ {
+ if (log_entry->has_children)
+ APR_ARRAY_PUSH(lb->merge_stack, svn_revnum_t) = log_entry->revision;
+
+ return SVN_NO_ERROR;
+ }
+
+ if (author)
+ author = svn_xml_fuzzy_escape(author, pool);
+ if (date)
+ date = svn_xml_fuzzy_escape(date, pool);
+ if (message)
+ message = svn_xml_fuzzy_escape(message, pool);
+
revstr = apr_psprintf(pool, "%ld", log_entry->revision);
/* <logentry revision="xxx"> */
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "logentry",
@@ -654,6 +740,8 @@ svn_cl__log(apr_getopt_t *os,
: opt_state->depth;
lb.diff_extensions = opt_state->extensions;
lb.merge_stack = apr_array_make(pool, 0, sizeof(svn_revnum_t));
+ lb.search_pattern = opt_state->search_pattern;
+ lb.case_insensitive_search = opt_state->case_insensitive_search;
lb.pool = pool;
if (opt_state->xml)
Modified: subversion/branches/javahl-ra/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/main.c?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/main.c Sun Dec 23 05:58:52 2012
@@ -130,6 +130,8 @@ typedef enum svn_cl__longopt_t {
opt_allow_mixed_revisions,
opt_include_externals,
opt_symmetric,
+ opt_search,
+ opt_isearch,
} svn_cl__longopt_t;
@@ -375,6 +377,11 @@ const apr_getopt_option_t svn_cl__option
"fixed revision. (See the svn:externals property)")},
{"symmetric", opt_symmetric, 0,
N_("Symmetric merge")},
+ {"search", opt_search, 1,
+ N_("use ARG as search pattern (glob syntax)")},
+
+ {"isearch", opt_isearch, 1,
+ N_("like --search, but case-insensitive")},
/* Long-opt Aliases
*
@@ -678,7 +685,17 @@ const svn_opt_subcommand_desc2_t svn_cl_
"\n"
" The --depth option is only valid in combination with the --diff option\n"
" and limits the scope of the displayed diff to the specified depth.\n"
-
+ "\n"
+ " If the --search option is used, log messages are displayed only if the\n"
+ " provided search pattern matches the author, date, log message text,\n"
+ " or, if the --verbose option is also provided, a changed path.\n"
+ " The search pattern may include glob syntax wildcards:\n"
+ " ? matches any single character\n"
+ " * matches a sequence of arbitrary characters\n"
+ " [...] matches any of the characters listed inside the brackets\n"
+ " If --limit is used in combination with --search, --limit restricts the\n"
+ " number of log messages searched, rather than restricting the output\n"
+ " to a particular number of matching log messages.\n"
"\n"
" Examples:\n"
"\n"
@@ -707,7 +724,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
" svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo\n"),
{'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy, opt_incremental,
opt_xml, 'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
- opt_depth, opt_diff, opt_diff_cmd, opt_internal_diff, 'x'},
+ opt_depth, opt_diff, opt_diff_cmd, opt_internal_diff, 'x', opt_search,
+ opt_isearch},
{{opt_with_revprop, N_("retrieve revision property ARG")},
{'c', N_("the change made in revision ARG")}} },
@@ -2153,6 +2171,13 @@ main(int argc, const char *argv[])
case opt_properties_only:
opt_state.diff.properties_only = TRUE;
break;
+ case opt_search:
+ opt_state.search_pattern = opt_arg;
+ break;
+ case opt_isearch:
+ opt_state.search_pattern = opt_arg;
+ opt_state.case_insensitive_search = TRUE;
+ break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Sun Dec 23 05:58:52 2012
@@ -30,6 +30,17 @@ usage: 1. log [PATH][@REV]
The --depth option is only valid in combination with the --diff option
and limits the scope of the displayed diff to the specified depth.
+ If the --search option is used, log messages are displayed only if the
+ provided search pattern matches the author, date, log message text,
+ or, if the --verbose option is also provided, a changed path.
+ The search pattern may include glob syntax wildcards:
+ ? matches any single character
+ * matches a sequence of arbitrary characters
+ [...] matches any of the characters listed inside the brackets
+ If --limit is used in combination with --search, --limit restricts the
+ number of log messages searched, rather than restricting the output
+ to a particular number of matching log messages.
+
Examples:
Show the latest 5 log messages for the current working copy
@@ -99,6 +110,8 @@ Valid options:
Ignore changes in EOL style.
-p (--show-c-function):
Show C function name in diff output.
+ --search ARG : use ARG as search pattern (glob syntax)
+ --isearch ARG : like --search, but case-insensitive
Global options:
--username ARG : specify a username ARG
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py Sun Dec 23 05:58:52 2012
@@ -2280,6 +2280,55 @@ def log_diff_moved(sbox):
compare_diff_output(r2diff, log_chain[1]['diff_lines'])
compare_diff_output(r1diff, log_chain[2]['diff_lines'])
+
+#----------------------------------------------------------------------
+def log_search(sbox):
+ "'svn log --search'"
+
+ guarantee_repos_and_wc(sbox)
+
+ os.chdir(sbox.wc_dir)
+
+ exit_code, output, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '--search',
+ 'for revision [367]')
+
+ log_chain = parse_log_output(output)
+ check_log_chain(log_chain, [7, 6, 3])
+
+ # case-insensitive search
+ exit_code, output, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '--isearch',
+ 'FOR REVISION [367]')
+
+ log_chain = parse_log_output(output)
+ check_log_chain(log_chain, [7, 6, 3])
+
+@SkipUnless(server_has_mergeinfo)
+def merge_sensitive_log_with_search(sbox):
+ "test 'svn log -g --search'"
+
+ merge_history_repos(sbox)
+
+ TRUNK_path = os.path.join(sbox.wc_dir, "trunk")
+
+ # Run log -g on a non-copying revision that adds mergeinfo,
+ # and perform a search that only matches the merged revision
+ exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
+ 'log', '-g',
+ '-r6',
+ '--search',
+ 'upsilon',
+ TRUNK_path)
+
+ # Parse and check output. The only revision should be r4 (the merge rev).
+ log_chain = parse_log_output(output)
+ expected_merges = {
+ 4 : [6],
+ }
+ check_merge_results(log_chain, expected_merges)
+
+
########################################################################
# Run the tests
@@ -2323,6 +2372,8 @@ test_list = [ None,
log_diff,
log_xml_old,
log_diff_moved,
+ log_search,
+ merge_sensitive_log_with_search,
]
if __name__ == '__main__':
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py Sun Dec 23 05:58:52 2012
@@ -2445,7 +2445,7 @@ def tree_conflicts_on_switch_1_2(sbox):
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
@@ -2463,7 +2463,7 @@ def tree_conflicts_on_switch_1_2(sbox):
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
@@ -2528,37 +2528,37 @@ def tree_conflicts_on_switch_2_1(sbox):
'Tree conflict' :
'^local edit, incoming delete upon switch'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon switch'
+ ' Source left: .dir.*/DF/D1@2'
- + ' Source right: .none.*/DF/D1@3$',
+ + ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon switch'
+ ' Source left: .dir.*/DDF/D1@2'
- + ' Source right: .none.*/DDF/D1@3$',
+ + ' Source right: .none.*(/DDF/D1@3)?$',
},
'D/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon switch'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon switch'
+ ' Source left: .dir.*/DD/D1@2'
- + ' Source right: .none.*/DD/D1@3$',
+ + ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon switch'
+ ' Source left: .dir.*/DDD/D1@2'
- + ' Source right: .none.*/DDD/D1@3$',
+ + ' Source right: .none.*(/DDD/D1@3)?$',
},
}
@@ -2627,37 +2627,37 @@ def tree_conflicts_on_switch_2_2(sbox):
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DF/D1@2'
- + ' Source right: .none.*/DF/D1@3$',
+ + ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DDF/D1@2'
- + ' Source right: .none.*/DDF/D1@3$',
+ + ' Source right: .none.*(/DDF/D1@3)?$',
},
'D/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DD/D1@2'
- + ' Source right: .none.*/DD/D1@3$',
+ + ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DDD/D1@2'
- + ' Source right: .none.*/DDD/D1@3$',
+ + ' Source right: .none.*(/DDD/D1@3)?$',
},
}
@@ -2716,37 +2716,37 @@ def tree_conflicts_on_switch_3(sbox):
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DF/D1@2'
- + ' Source right: .none.*/DF/D1@3$',
+ + ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DDF/D1@2'
- + ' Source right: .none.*/DDF/D1@3$',
+ + ' Source right: .none.*(/DDF/D1@3)?$',
},
'D/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DD/D1@2'
- + ' Source right: .none.*/DD/D1@3$',
+ + ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon switch'
+ ' Source left: .dir.*/DDD/D1@2'
- + ' Source right: .none.*/DDD/D1@3$',
+ + ' Source right: .none.*(/DDD/D1@3)?$',
},
}
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py Sun Dec 23 05:58:52 2012
@@ -4449,7 +4449,7 @@ def tree_conflicts_on_update_1_2(sbox):
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
@@ -4467,7 +4467,7 @@ def tree_conflicts_on_update_1_2(sbox):
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
@@ -4532,37 +4532,37 @@ def tree_conflicts_on_update_2_1(sbox):
'Tree conflict' :
'^local edit, incoming delete upon update'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon update'
+ ' Source left: .dir.*/DF/D1@2'
- + ' Source right: .none.*/DF/D1@3$',
+ + ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon update'
+ ' Source left: .dir.*/DDF/D1@2'
- + ' Source right: .none.*/DDF/D1@3$',
+ + ' Source right: .none.*(/DDF/D1@3)?$',
},
'D/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon update'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon update'
+ ' Source left: .dir.*/DD/D1@2'
- + ' Source right: .none.*/DD/D1@3$',
+ + ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
'^local edit, incoming delete upon update'
+ ' Source left: .dir.*/DDD/D1@2'
- + ' Source right: .none.*/DDD/D1@3$',
+ + ' Source right: .none.*(/DDD/D1@3)?$',
},
}
@@ -4640,37 +4640,37 @@ def tree_conflicts_on_update_2_2(sbox):
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DF/D1@2'
- + ' Source right: .none.*/DF/D1@3$',
+ + ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DDF/D1@2'
- + ' Source right: .none.*/DDF/D1@3$',
+ + ' Source right: .none.*(/DDF/D1@3)?$',
},
'D/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DD/D1@2'
- + ' Source right: .none.*/DD/D1@3$',
+ + ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DDD/D1@2'
- + ' Source right: .none.*/DDD/D1@3$',
+ + ' Source right: .none.*(/DDD/D1@3)?$',
},
}
@@ -4802,37 +4802,37 @@ def tree_conflicts_on_update_3(sbox):
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .file.*/F/alpha@2'
- + ' Source right: .none.*/F/alpha@3$',
+ + ' Source right: .none.*(/F/alpha@3)?$',
},
'DF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DF/D1@2'
- + ' Source right: .none.*/DF/D1@3$',
+ + ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DDF/D1@2'
- + ' Source right: .none.*/DDF/D1@3$',
+ + ' Source right: .none.*(/DDF/D1@3)?$',
},
'D/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/D/D1@2'
- + ' Source right: .none.*/D/D1@3$',
+ + ' Source right: .none.*(/D/D1@3)?$',
},
'DD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DD/D1@2'
- + ' Source right: .none.*/DD/D1@3$',
+ + ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
'^local delete, incoming delete upon update'
+ ' Source left: .dir.*/DDD/D1@2'
- + ' Source right: .none.*/DDD/D1@3$',
+ + ' Source right: .none.*(/DDD/D1@3)?$',
},
}
Propchange: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec 23 05:58:52 2012
@@ -1,12 +1,13 @@
-tree-conflict-data-test
-.libs
*.lo
+.libs
+conflict-data-test
db-test
+entries-compat-test
fake-wc
+op-depth-test
pristine-store-test
svn-test-work
-entries-compat-test
-op-depth-test
-wc-lock-tester
+tree-conflict-data-test
wc-incomplete-tester
+wc-lock-tester
wc-queries-test
Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c?rev=1425414&r1=1425413&r2=1425414&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c Sun Dec 23 05:58:52 2012
@@ -1416,6 +1416,7 @@ test_externals_store(apr_pool_t *pool)
FALSE, NULL,
FALSE,
NULL,
+ NULL,
pool));
SVN_ERR(svn_wc__db_external_add_dir(db,