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

Re: Symmetric Merge

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 22 Mar 2012 12:16:03 +0000 (GMT)

I (Julian Foad) wrote:

> By the way, my intent is to remove the '--symmetric' option and have the
> code just run inside the original 'sync' and 'reintegrate' code
> paths.  There's no reason, other than for testing, to expose this at the UI.
>>
>> If anyone wants to try the new symmetric merge code, it's basically in
>> place.  It's not finished.  It's enabled with '--symmetric'
>> command-line option.  I've just tried running it in place of
>> 'reintegrate, using the following patch to the test suite, and this
>> much seems to work...

With this patch, all tests seem to pass for me (Neon, BDB, running {resolve,merge_authz,merge_reintegrate,merge_tree_conflict,merge,tree_conflict}_tests.py):

Index: subversion/tests/cmdline/svntest/actions.py
===================================================================
--- subversion/tests/cmdline/svntest/actions.py    (revision 1303481)
+++ subversion/tests/cmdline/svntest/actions.py    (working copy)
@@ -1039,6 +1039,15 @@run_and_verify_merge(
     merge_command.append(dir)
   merge_command = tuple(merge_command)
 
+  if '--reintegrate' in args:
+    args += ('--symmetric',)
+  elif not [arg for arg in merge_command + args
+            if arg.startswith('-r') or arg.startswith('--revision')
+               or arg.startswith('-c') or arg.startswith('--change')]:
+    if len([arg for arg in merge_command + args if not arg.startswith('-')]) <= 2:
+      print '## sync merge' + ' '.join(args)
+      args += ('--symmetric',)
+
   if dry_run:
     pre_disk = tree.build_tree_from_wc(dir)
     dry_run_command = merge_command + ('--dry-run',)

Of course, this doesn't prove that the results of the merge are the same as (or better than) before.  I would expect them to be just the same, but haven't checked yet.

- Julian
Received on 2012-03-22 13:16:40 CET

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.