Author: julianfoad Date: Wed Nov 16 17:46:03 2011 New Revision: 1202804 URL: http://svn.apache.org/viewvc?rev=1202804&view=rev Log: On the 'showing-merge-info' branch: Catch up to trunk@1202802.
Modified: subversion/branches/showing-merge-info/ (props changed) subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c subversion/branches/showing-merge-info/subversion/svn/cl.h subversion/branches/showing-merge-info/subversion/svn/main.c subversion/branches/showing-merge-info/subversion/svn/notify.c subversion/branches/showing-merge-info/subversion/svn/status-cmd.c subversion/branches/showing-merge-info/subversion/svn/status.c subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/main.py Propchange: subversion/branches/showing-merge-info/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Nov 16 17:46:03 2011 @@ -57,4 +57,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1177607-1202674 +/subversion/trunk:1177607-1202802 Modified: subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c Wed Nov 16 17:46:03 2011 @@ -5600,7 +5600,7 @@ rep_write_contents_close(void *baton) /* Something's wrong with the rep-sharing index. We can continue without rep-sharing, but warn. */ - (b->fs->warning)(b->fs->warning_baton, err); + (b->fs->warning)(b->fs->warning_baton, svn_error_root_cause(err)); svn_error_clear(err); old_rep = NULL; } Modified: subversion/branches/showing-merge-info/subversion/svn/cl.h URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/svn/cl.h?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/svn/cl.h (original) +++ subversion/branches/showing-merge-info/subversion/svn/cl.h Wed Nov 16 17:46:03 2011 @@ -382,6 +382,9 @@ svn_cl__time_cstring_to_human_cstring(co /* Print STATUS for PATH to stdout for human consumption. Prints in abbreviated format by default, or DETAILED format if flag is set. + When SUPPRESS_EXTERNALS_PLACEHOLDERS is set, avoid printing + externals placeholder lines ("X lines"). + When DETAILED is set, use SHOW_LAST_COMMITTED to toggle display of the last-committed-revision and last-committed-author. @@ -402,6 +405,7 @@ svn_error_t * svn_cl__print_status(const char *cwd_abspath, const char *path, const svn_client_status_t *status, + svn_boolean_t suppress_externals_placeholders, svn_boolean_t detailed, svn_boolean_t show_last_committed, svn_boolean_t skip_unrecognized, @@ -564,14 +568,10 @@ svn_cl__merge_file_externally(const char /* Set *NOTIFY_FUNC_P and *NOTIFY_BATON_P to a notifier/baton for all * operations, allocated in POOL. - * - * If don't want a summary line at the end of notifications, set - * SUPPRESS_FINAL_LINE. */ svn_error_t * svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p, void **notify_baton_p, - svn_boolean_t suppress_final_line, apr_pool_t *pool); /* Make the notifier for use with BATON print the appropriate summary Modified: subversion/branches/showing-merge-info/subversion/svn/main.c URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/svn/main.c?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/svn/main.c (original) +++ subversion/branches/showing-merge-info/subversion/svn/main.c Wed Nov 16 17:46:03 2011 @@ -1502,6 +1502,7 @@ main(int argc, const char *argv[]) svn_config_t *cfg_config; svn_boolean_t descend = TRUE; svn_boolean_t interactive_conflicts = FALSE; + svn_boolean_t use_notifier = TRUE; apr_hash_t *changelists; /* Initialize the app. */ @@ -2519,12 +2520,21 @@ main(int argc, const char *argv[]) subcommands will populate the ctx->log_msg_baton3. */ ctx->log_msg_func3 = svn_cl__get_log_message; - /* Set up the notifier. */ - if (((subcommand->cmd_func != svn_cl__status) && !opt_state.quiet) - || ((subcommand->cmd_func == svn_cl__status) && !opt_state.xml)) + /* Set up the notifier. + + In general, we use it any time we aren't in --quiet mode. 'svn + status' is unique, though, in that we don't want it in --quiet mode + unless we're also in --verbose mode. When in --xml mode, + though, we never want it. */ + if (opt_state.quiet) + use_notifier = FALSE; + if ((subcommand->cmd_func == svn_cl__status) && opt_state.verbose) + use_notifier = TRUE; + if (opt_state.xml) + use_notifier = FALSE; + if (use_notifier) { - err = svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, - FALSE, pool); + err = svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, pool); if (err) return svn_cmdline_handle_exit_error(err, pool, "svn: "); } Modified: subversion/branches/showing-merge-info/subversion/svn/notify.c URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/svn/notify.c?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/svn/notify.c (original) +++ subversion/branches/showing-merge-info/subversion/svn/notify.c Wed Nov 16 17:46:03 2011 @@ -47,7 +47,6 @@ struct notify_baton svn_boolean_t is_checkout; svn_boolean_t is_export; svn_boolean_t is_wc_to_repos_copy; - svn_boolean_t suppress_summary_lines; svn_boolean_t sent_first_txdelta; svn_boolean_t in_external; svn_boolean_t had_print_error; /* Used to not keep printing error messages @@ -583,8 +582,7 @@ notify(void *baton, const svn_wc_notify_ break; case svn_wc_notify_update_started: - if (! (nb->suppress_summary_lines || - nb->in_external || + if (! (nb->in_external || nb->is_checkout || nb->is_export)) { @@ -596,77 +594,74 @@ notify(void *baton, const svn_wc_notify_ case svn_wc_notify_update_completed: { - if (! nb->suppress_summary_lines) + if (SVN_IS_VALID_REVNUM(n->revision)) { - if (SVN_IS_VALID_REVNUM(n->revision)) + if (nb->is_export) { - if (nb->is_export) + if ((err = svn_cmdline_printf + (pool, nb->in_external + ? _("Exported external at revision %ld.\n") + : _("Exported revision %ld.\n"), + n->revision))) + goto print_error; + } + else if (nb->is_checkout) + { + if ((err = svn_cmdline_printf + (pool, nb->in_external + ? _("Checked out external at revision %ld.\n") + : _("Checked out revision %ld.\n"), + n->revision))) + goto print_error; + } + else + { + if (nb->received_some_change) { + nb->received_some_change = FALSE; if ((err = svn_cmdline_printf (pool, nb->in_external - ? _("Exported external at revision %ld.\n") - : _("Exported revision %ld.\n"), + ? _("Updated external to revision %ld.\n") + : _("Updated to revision %ld.\n"), n->revision))) goto print_error; } - else if (nb->is_checkout) + else { if ((err = svn_cmdline_printf (pool, nb->in_external - ? _("Checked out external at revision %ld.\n") - : _("Checked out revision %ld.\n"), + ? _("External at revision %ld.\n") + : _("At revision %ld.\n"), n->revision))) goto print_error; } - else - { - if (nb->received_some_change) - { - nb->received_some_change = FALSE; - if ((err = svn_cmdline_printf - (pool, nb->in_external - ? _("Updated external to revision %ld.\n") - : _("Updated to revision %ld.\n"), - n->revision))) - goto print_error; - } - else - { - if ((err = svn_cmdline_printf - (pool, nb->in_external - ? _("External at revision %ld.\n") - : _("At revision %ld.\n"), - n->revision))) - goto print_error; - } - } } - else /* no revision */ + } + else /* no revision */ + { + if (nb->is_export) { - if (nb->is_export) - { - if ((err = svn_cmdline_printf - (pool, nb->in_external - ? _("External export complete.\n") - : _("Export complete.\n")))) - goto print_error; - } - else if (nb->is_checkout) - { - if ((err = svn_cmdline_printf - (pool, nb->in_external - ? _("External checkout complete.\n") - : _("Checkout complete.\n")))) - goto print_error; - } - else - { - if ((err = svn_cmdline_printf - (pool, nb->in_external - ? _("External update complete.\n") - : _("Update complete.\n")))) - goto print_error; - } + if ((err = svn_cmdline_printf + (pool, nb->in_external + ? _("External export complete.\n") + : _("Export complete.\n")))) + goto print_error; + } + else if (nb->is_checkout) + { + if ((err = svn_cmdline_printf + (pool, nb->in_external + ? _("External checkout complete.\n") + : _("Checkout complete.\n")))) + goto print_error; + } + else + { + if ((err = svn_cmdline_printf + (pool, nb->in_external + ? _("External update complete.\n") + : _("Update complete.\n")))) + goto print_error; } } } @@ -1016,7 +1011,6 @@ notify(void *baton, const svn_wc_notify_ svn_error_t * svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p, void **notify_baton_p, - svn_boolean_t suppress_summary_lines, apr_pool_t *pool) { struct notify_baton *nb = apr_pcalloc(pool, sizeof(*nb)); @@ -1026,7 +1020,6 @@ svn_cl__get_notifier(svn_wc_notify_func2 nb->is_checkout = FALSE; nb->is_export = FALSE; nb->is_wc_to_repos_copy = FALSE; - nb->suppress_summary_lines = suppress_summary_lines; nb->in_external = FALSE; nb->had_print_error = FALSE; nb->text_conflicts = 0; Modified: subversion/branches/showing-merge-info/subversion/svn/status-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/svn/status-cmd.c?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/svn/status-cmd.c (original) +++ subversion/branches/showing-merge-info/subversion/svn/status-cmd.c Wed Nov 16 17:46:03 2011 @@ -51,6 +51,7 @@ struct status_baton /* These fields all correspond to the ones in the svn_cl__print_status() interface. */ const char *cwd_abspath; + svn_boolean_t suppress_externals_placeholders; svn_boolean_t detailed; svn_boolean_t show_last_committed; svn_boolean_t skip_unrecognized; @@ -154,6 +155,7 @@ print_status_normal_or_xml(void *baton, sb->ctx, pool); else return svn_cl__print_status(sb->cwd_abspath, path, status, + sb->suppress_externals_placeholders, sb->detailed, sb->show_last_committed, sb->skip_unrecognized, @@ -302,6 +304,8 @@ svn_cl__status(apr_getopt_t *os, } SVN_ERR(svn_dirent_get_absolute(&(sb.cwd_abspath), "", scratch_pool)); + sb.suppress_externals_placeholders = (opt_state->quiet + && (! opt_state->verbose)); sb.detailed = (opt_state->verbose || opt_state->update); sb.show_last_committed = opt_state->verbose; sb.skip_unrecognized = opt_state->quiet; Modified: subversion/branches/showing-merge-info/subversion/svn/status.c URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/svn/status.c?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/svn/status.c (original) +++ subversion/branches/showing-merge-info/subversion/svn/status.c Wed Nov 16 17:46:03 2011 @@ -528,6 +528,7 @@ svn_error_t * svn_cl__print_status(const char *cwd_abspath, const char *path, const svn_client_status_t *status, + svn_boolean_t suppress_externals_placeholders, svn_boolean_t detailed, svn_boolean_t show_last_committed, svn_boolean_t skip_unrecognized, @@ -547,6 +548,10 @@ svn_cl__print_status(const char *cwd_abs && status->repos_node_status == svn_wc_status_none)) return SVN_NO_ERROR; + if (suppress_externals_placeholders + && status->node_status == svn_wc_status_external) + return SVN_NO_ERROR; + return print_status(cwd_abspath, svn_dirent_local_style(path, pool), detailed, show_last_committed, repos_locks, status, text_conflicts, prop_conflicts, tree_conflicts, Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py (original) +++ subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py Wed Nov 16 17:46:03 2011 @@ -49,7 +49,8 @@ from svntest.actions import make_conflic from svntest.actions import inject_conflict_into_expected_state def expected_merge_output(rev_ranges, additional_lines=None, foreign=False, - elides=False, two_url=False): + elides=False, two_url=False, target=None, + text_conflicts=0, prop_conflicts=0, tree_conflicts=0): """Generate an (inefficient) regex representing the expected merge output and mergeinfo notifications from REV_RANGES and ADDITIONAL_LINES. @@ -59,12 +60,19 @@ def expected_merge_output(rev_ranges, ad like '-c SINGLE_REV'). If REV_RANGES is None then only the standard notification for a 3-way merge is expected. - ADDITIONAL_LINES is a list of regular expression strings to match the - other lines of output. + ADDITIONAL_LINES is a list of strings to match the other lines of output; + these are basically regular expressions except that backslashes will be + escaped herein. If ELIDES is true, add to the regex an expression representing elision notification. If TWO_URL is true, tweak the regex to expect the - appropriate mergeinfo notification for a 3-way merge.""" + appropriate mergeinfo notification for a 3-way merge. + + TARGET is the local path to the target, as it should appear in + notifications; if None, it is not checked. + + TEXT_CONFLICTS, PROP_CONFLICTS and TREE_CONFLICTS specify the number of + each kind of conflict to expect.""" if rev_ranges is None: lines = [svntest.main.merge_notify_line(None, None, False, foreign)] @@ -77,8 +85,8 @@ def expected_merge_output(rev_ranges, ad else: end_rev = None lines += [svntest.main.merge_notify_line(start_rev, end_rev, - True, foreign)] - lines += [svntest.main.mergeinfo_notify_line(start_rev, end_rev)] + True, foreign, target)] + lines += [svntest.main.mergeinfo_notify_line(start_rev, end_rev, target)] if (elides): lines += ["--- Eliding mergeinfo from .*\n"] @@ -102,6 +110,16 @@ def expected_merge_output(rev_ranges, ad if sys.platform == 'win32' and additional_lines != None: additional_lines = additional_lines.replace("\\", "\\\\") lines.append(str(additional_lines)) + + if text_conflicts or prop_conflicts or tree_conflicts: + lines.append("Summary of conflicts:\n") + if text_conflicts: + lines.append(" Text conflicts: %d\n" % text_conflicts) + if prop_conflicts: + lines.append(" Property conflicts: %d\n" % prop_conflicts) + if tree_conflicts: + lines.append(" Tree conflicts: %d\n" % tree_conflicts) + return "|".join(lines) def check_mergeinfo_recursively(root_path, subpaths_mergeinfo): @@ -12542,17 +12560,11 @@ def svn_merge(rev_range, source, target, mi_rev_range = rev_range rev_arg = '-r' + str(rev_range[0] - 1) + ':' + str(rev_range[1]) if lines is None: - target_re = re.escape(target) - lines = ["(A |D |[UG] | [UG]|[UG][UG]) " + target_re + ".*"] - if text_conflicts or prop_conflicts or tree_conflicts: - lines.append("Summary of conflicts:\n") - if text_conflicts: - lines.append(" Text conflicts: %d\n" % text_conflicts) - if prop_conflicts: - lines.append(" Property conflicts: %d\n" % prop_conflicts) - if tree_conflicts: - lines.append(" Tree conflicts: %d\n" % tree_conflicts) - exp_out = expected_merge_output([mi_rev_range], lines) + lines = ["(A |D |[UG] | [UG]|[UG][UG]) " + target + ".*\n"] + exp_out = expected_merge_output([mi_rev_range], lines, target=target, + text_conflicts=text_conflicts, + prop_conflicts=prop_conflicts, + tree_conflicts=tree_conflicts) svntest.actions.run_and_verify_svn(None, exp_out, [], 'merge', rev_arg, source, target, *args) @@ -16694,11 +16706,9 @@ def foreign_repos_prop_conflict(sbox): # Now, merge the propchange to the *second* working copy. expected_output = [' C %s\n' % (os.path.join(other_wc_dir, - "A", "D", "G")), - 'Summary of conflicts:\n', - ' Property conflicts: 1\n', - ] - expected_output = expected_merge_output([[3]], expected_output, True) + "A", "D", "G"))] + expected_output = expected_merge_output([[3]], expected_output, True, + prop_conflicts=1) svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge', '-c3', Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tree_conflict_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tree_conflict_tests.py (original) +++ subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tree_conflict_tests.py Wed Nov 16 17:46:03 2011 @@ -46,6 +46,7 @@ from svntest.main import server_has_merg from merge_tests import set_up_branch from merge_tests import svn_copy from merge_tests import svn_merge +from merge_tests import expected_merge_output #---------------------------------------------------------------------- @SkipUnless(server_has_mergeinfo) @@ -1726,18 +1727,15 @@ def merge_replace_causes_tree_conflict(s 'propname', 'propval', A_D_H) # svn merge $URL/A $URL/branch A - expected_stdout = verify.UnorderedOutput([ - "--- Merging differences between repository URLs into '" + A + "':\n", + expected_stdout = expected_merge_output(None, [ + # merge ' C ' + A_B_E + '\n', ' C ' + A_mu + '\n', ' C ' + A_D_G_pi + '\n', ' C ' + A_D_H + '\n', - "--- Recording mergeinfo for merge between repository URLs into '" \ - + A + "':\n", + # mergeinfo ' U ' + A + '\n', - 'Summary of conflicts:\n', - ' Tree conflicts: 4\n', - ]) + ], target=A, two_url=True, tree_conflicts=4) actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge', url_A, url_branch, A) @@ -1817,15 +1815,10 @@ def merge_replace_causes_tree_conflict2( ### A file-with-file replacement onto a deleted file. # svn merge $URL/A/mu $URL/branch/mu A/mu - expected_stdout = verify.UnorderedOutput([ - "--- Merging differences between repository URLs into '" + A + "':\n", - ' C ' + A_mu + '\n', - "--- Recording mergeinfo for merge between repository URLs into '" + - A + "':\n", - " U " + A + "\n", - 'Summary of conflicts:\n', - ' Tree conflicts: 1\n', - ]) + expected_stdout = expected_merge_output(None, [ + ' C ' + A_mu + '\n', # merge + " U " + A + "\n", # mergeinfo + ], target=A, two_url=True, tree_conflicts=1) actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge', url_A, url_branch, A, '--depth=files') @@ -1841,15 +1834,10 @@ def merge_replace_causes_tree_conflict2( ### A dir-with-dir replacement onto a deleted directory. # svn merge $URL/A/B $URL/branch/B A/B - expected_stdout = verify.UnorderedOutput([ - "--- Merging differences between repository URLs into '" + A_B + "':\n", - ' C ' + A_B_E + '\n', - "--- Recording mergeinfo for merge between repository URLs into '" + - A_B + "':\n", - " U " + A_B + "\n", - 'Summary of conflicts:\n', - ' Tree conflicts: 1\n', - ]) + expected_stdout = expected_merge_output(None, [ + ' C ' + A_B_E + '\n', # merge + " U " + A_B + "\n", # mergeinfo + ], target=A_B, two_url=True, tree_conflicts=1) actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge', url_A_B, url_branch_B, A_B) @@ -1865,16 +1853,11 @@ def merge_replace_causes_tree_conflict2( ### A dir-with-file replacement onto a deleted directory. # svn merge --depth=immediates $URL/A/D $URL/branch/D A/D - expected_stdout = verify.UnorderedOutput([ - "--- Merging differences between repository URLs into '" + A_D + "':\n", - ' C ' + A_D_H + '\n', - "--- Recording mergeinfo for merge between repository URLs into '" + - A_D + "':\n", - " U " + A_D + "\n", + expected_stdout = expected_merge_output(None, [ + ' C ' + A_D_H + '\n', # merge + " U " + A_D + "\n", # mergeinfo " U " + A_D_G + "\n", - 'Summary of conflicts:\n', - ' Tree conflicts: 1\n', - ]) + ], target=A_D, two_url=True, tree_conflicts=1) actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge', '--depth=immediates', url_A_D, url_branch_D, A_D) @@ -1890,20 +1873,9 @@ def merge_replace_causes_tree_conflict2( ### A file-with-dir replacement onto a deleted file. # svn merge $URL/A/D/G $URL/branch/D/G A/D/G - expected_stdout = verify.UnorderedOutput([ - "--- Merging differences between repository URLs into '" + A_D_G + - "':\n", - ' C ' + A_D_G_pi + '\n', - "--- Recording mergeinfo for merge between repository URLs into '" + - A_D_G + "':\n", - "--- Eliding mergeinfo from '" + A_D_G_pi + "':\n", - " U " + A_D_G_pi + "\n", - "--- Eliding mergeinfo from '" + A_D_G_pi + "':\n", - " U " + A_D_G_pi + "\n", - " G " + A_D_G + "\n", - 'Summary of conflicts:\n', - ' Tree conflicts: 1\n', - ]) + expected_stdout = expected_merge_output(None, [ + ' C ' + A_D_G_pi + '\n', # merge + ], target=A_D_G, elides=[A_D_G_pi, A_D_G], two_url=True, tree_conflicts=1) actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge', url_A_D_G, url_branch_D_G, A_D_G) @@ -1963,15 +1935,10 @@ def merge_replace_on_del_fails(sbox): # Sync merge ^/A to branch svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) - expected_stdout = verify.UnorderedOutput([ - "--- Merging r2 through r4 into '" + branch_path + "':\n", - ' C ' + C_branch_path + '\n', - "--- Recording mergeinfo for merge of r2 through r4 into '" \ - + branch_path + "':\n", - ' U ' + branch_path + '\n', - 'Summary of conflicts:\n', - ' Tree conflicts: 1\n', - ]) + expected_stdout = expected_merge_output([[2,4]], [ + ' C ' + C_branch_path + '\n', # merge + ' U ' + branch_path + '\n', # mergeinfo + ], target=branch_path, tree_conflicts=1) # This currently fails with: # # >svn merge ^/A branch Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/main.py URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/main.py?rev=1202804&r1=1202803&r2=1202804&view=diff ============================================================================== --- subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/main.py (original) +++ subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/main.py Wed Nov 16 17:46:03 2011 @@ -998,51 +998,60 @@ def use_editor(func): os.environ['SVNTEST_EDITOR_FUNC'] = func os.environ['SVN_TEST_PYTHON'] = sys.executable -def mergeinfo_notify_line(revstart, revend): +def mergeinfo_notify_line(revstart, revend, target=None): """Return an expected output line that describes the beginning of a mergeinfo recording notification on revisions REVSTART through REVEND.""" + if target: + target_re = re.escape(target) + else: + target_re = ".+" if (revend is None): if (revstart < 0): revstart = abs(revstart) - return "--- Recording mergeinfo for reverse merge of r%ld .*:\n" \ - % (revstart) + return "--- Recording mergeinfo for reverse merge of r%ld into '%s':\n" \ + % (revstart, target_re) else: - return "--- Recording mergeinfo for merge of r%ld .*:\n" % (revstart) + return "--- Recording mergeinfo for merge of r%ld into '%s':\n" \ + % (revstart, target_re) elif (revstart < revend): - return "--- Recording mergeinfo for merge of r%ld through r%ld .*:\n" \ - % (revstart, revend) + return "--- Recording mergeinfo for merge of r%ld through r%ld into '%s':\n" \ + % (revstart, revend, target_re) else: return "--- Recording mergeinfo for reverse merge of r%ld through " \ - "r%ld .*:\n" % (revstart, revend) + "r%ld into '%s':\n" % (revstart, revend, target_re) def merge_notify_line(revstart=None, revend=None, same_URL=True, - foreign=False): + foreign=False, target=None): """Return an expected output line that describes the beginning of a merge operation on revisions REVSTART through REVEND. Omit both REVSTART and REVEND for the case where the left and right sides of the merge are from different URLs.""" from_foreign_phrase = foreign and "\(from foreign repository\) " or "" + if target: + target_re = re.escape(target) + else: + target_re = ".+" if not same_URL: - return "--- Merging differences between %srepository URLs into '.+':\n" \ - % (foreign and "foreign " or "") + return "--- Merging differences between %srepository URLs into '%s':\n" \ + % (foreign and "foreign " or "", target_re) if revend is None: if revstart is None: # The left and right sides of the merge are from different URLs. - return "--- Merging differences between %srepository URLs into '.+':\n" \ - % (foreign and "foreign " or "") + return "--- Merging differences between %srepository URLs into '%s':\n" \ + % (foreign and "foreign " or "", target_re) elif revstart < 0: - return "--- Reverse-merging %sr%ld into '.+':\n" \ - % (from_foreign_phrase, abs(revstart)) + return "--- Reverse-merging %sr%ld into '%s':\n" \ + % (from_foreign_phrase, abs(revstart), target_re) else: - return "--- Merging %sr%ld into '.+':\n" \ - % (from_foreign_phrase, revstart) + return "--- Merging %sr%ld into '%s':\n" \ + % (from_foreign_phrase, revstart, target_re) else: if revstart > revend: - return "--- Reverse-merging %sr%ld through r%ld into '.+':\n" \ - % (from_foreign_phrase, revstart, revend) + return "--- Reverse-merging %sr%ld through r%ld into '%s':\n" \ + % (from_foreign_phrase, revstart, revend, target_re) else: - return "--- Merging %sr%ld through r%ld into '.+':\n" \ - % (from_foreign_phrase, revstart, revend) + return "--- Merging %sr%ld through r%ld into '%s':\n" \ + % (from_foreign_phrase, revstart, revend, target_re) def make_log_msg():