Index: subversion/libsvn_client/log.c =================================================================== --- subversion/libsvn_client/log.c (revision 25342) +++ subversion/libsvn_client/log.c (working copy) @@ -33,6 +33,7 @@ #include "svn_client.h" #include "svn_error.h" #include "svn_path.h" +#include "svn_sorts.h" #include "svn_private_config.h" #include "private/svn_wc_private.h" @@ -112,17 +113,19 @@ if (changed_paths) { - apr_hash_index_t *hi; - char *path; + int i; + const char *path; svn_log_changed_path_t *changed_path; + /* Sort paths into depth-first order. */ + apr_array_header_t *sorted_changed_paths = + svn_sort__hash(changed_paths, svn_sort_compare_items_as_paths, pool); - for (hi = apr_hash_first(NULL, changed_paths); - hi; - hi = apr_hash_next(hi)) + for (i = (sorted_changed_paths->nelts -1) ; i >= 0 ; i--) { - void *val; - apr_hash_this(hi, (void *) &path, NULL, &val); - changed_path = val; + svn_sort__item_t *item = &APR_ARRAY_IDX(sorted_changed_paths, i, + svn_sort__item_t); + path = item->key; + changed_path = item->value; /* Consider only the path we're interested in. */ if (changed_path->copyfrom_path && Index: subversion/tests/cmdline/merge_tests.py =================================================================== --- subversion/tests/cmdline/merge_tests.py (revision 25342) +++ subversion/tests/cmdline/merge_tests.py (working copy) @@ -6506,7 +6506,9 @@ saved_cwd = os.getcwd() try: os.chdir(A_copy_of_B_C_path) - svntest.actions.run_and_verify_svn(None, [], [], 'merge', '-g') + svntest.actions.run_and_verify_svn(None, + svntest.main.merge_notify_line(2), + [], 'merge', '-g') finally: os.chdir(saved_cwd) @@ -6834,7 +6836,7 @@ XFail(merge_to_path_with_switched_children), merge_with_implicit_target_file, XFail(empty_rev_range_mergeinfo), - XFail(detect_copy_src_for_target_with_multiple_ancestors), + detect_copy_src_for_target_with_multiple_ancestors, prop_add_to_child_with_mergeinfo, diff_repos_does_not_update_mergeinfo, avoid_reflected_revs,