[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Symmetric merge -- current test failures when enabled

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 9 May 2012 17:54:39 +0100 (BST)

In r1336079 I updated the symmetric merge base-finding code to properly follow branches that have been renamed (which includes being branched off another branch) during their lifetime.

Currently there are 12 test failures, of just three kinds, in the existing test suite, when I make the symmetric merge code run for all sync and reintegrate merges using the patch below [1]:
FAIL:  blame_tests.py 10: test 'svn blame -g'

FAIL:  blame_tests.py 11: don't look for merged files out of range
FAIL:  log_tests.py 16: test 'svn log -g' on a single revision
FAIL:  log_tests.py 17: test 'svn log -g' on a branching revision
FAIL:  log_tests.py 18: test 'svn log -g' on a non-branching revision
FAIL:  log_tests.py 19: test 'svn log -g' a path added before merge

FAIL:  merge_tests.py 6: merging a file w/no explicit target path or revs
FAIL:  merge_tests.py 12: merge one file without explicit revisions

FAIL:  merge_tests.py 78: dont merge revs into a subtree that predate it
FAIL:  merge_tests.py 88: subtree merges dont cause spurious conflicts
FAIL:  merge_tests.py 89: target and subtrees need nonintersecting revs
FAIL:  merge_reintegrate_tests.py 10: merge --reintegrate with subtree mergeinfo

The first group is trivial: the merge works properly and so doesn't produce the expected conflict.  The second group concerns merging changes into a file from its own (past or future) history; this kind of merge isn't a 'sync' so shouldn't be handled by this code path.  That leaves subtree merges as the only missing functionality that the test suite currently picks up.

In symmetric_merge_tests.py there are currently two XFAIL tests ...

XFAIL: merge_symmetric_tests.py 16: cherry2_fwd
XFAIL: merge_symmetric_tests.py 17: cherry3_fwd

... because I haven't paid attention to skipping of cherry-picked revisions yet.  We need to write some more extensive tests there, such as ones covering subtree merges and ones covering branches that have been renamed in their lifetime.

[1] Patch to use the symmetric merge code for all sync and reintegrate merges:
[[[
Index: subversion/svn/merge-cmd.c
===================================================================
--- subversion/svn/merge-cmd.c    (revision 1336246)
+++ subversion/svn/merge-cmd.c    (working copy)
@@ -385,7 +385,14 @@ svn_cl__merge(apr_getopt_t *os,
     }

 #ifdef SVN_WITH_SYMMETRIC_MERGE
-  if (opt_state->symmetric_merge)
+  /* Do a symmetric merge if explicitly requested, or if a reintegrate
+   * is requested, or if a sync merge is requested by specifying just
+   * one source and no revisions. */
+  if (opt_state->symmetric_merge
+      || opt_state->reintegrate
+      || (! two_sources_specified
+          && first_range_start.kind == svn_opt_revision_unspecified
+          && first_range_end.kind == svn_opt_revision_unspecified))
     {
       svn_boolean_t allow_local_mods = ! opt_state->reintegrate;
       svn_boolean_t allow_switched_subtrees = ! opt_state->reintegrate;
]]]

- Julian
Received on 2012-05-09 18:55:14 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.