You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/01/30 13:54:40 UTC

svn commit: r1440379 - in /subversion/trunk/subversion: libsvn_client/repos_diff.c tests/cmdline/merge_tests.py

Author: rhuijben
Date: Wed Jan 30 12:54:39 2013
New Revision: 1440379

URL: http://svn.apache.org/viewvc?rev=1440379&view=rev
Log:
When opening a repository diff report the root directory as opened to
the diff tree processor.

This fixes a case where the tree-tee processor would segfault, and a case where
the merge code didn't detect a tree conflict in the right place.

* subversion/libsvn_client/repos_diff.c
  (open_root): Also report opening the root; not just closing.

* subversion/tests/cmdline/merge_tests.py
  (merge_target_selection): Expect tree conflict on the invalid target instead
    of below the target. This finally makes the file and directory case
    behave in the same way.

Modified:
    subversion/trunk/subversion/libsvn_client/repos_diff.c
    subversion/trunk/subversion/tests/cmdline/merge_tests.py

Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1440379&r1=1440378&r2=1440379&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Wed Jan 30 12:54:39 2013
@@ -425,6 +425,18 @@ open_root(void *edit_baton,
   db->left_source = svn_diff__source_create(eb->revision, db->pool);
   db->right_source = svn_diff__source_create(eb->target_revision, db->pool);
 
+  SVN_ERR(eb->processor->dir_opened(&db->pdb,
+                                    &db->skip,
+                                    &db->skip_children,
+                                    "",
+                                    db->left_source,
+                                    db->right_source,
+                                    NULL,
+                                    NULL,
+                                    eb->processor,
+                                    db->pool,
+                                    db->pool /* scratch_pool */));
+
   *root_baton = db;
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1440379&r1=1440378&r2=1440379&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Wed Jan 30 12:54:39 2013
@@ -18081,11 +18081,11 @@ def merge_target_selection(sbox):
 
   # Merge the dir (wrong target)
   expected_output = [
-    'Skipped \'%s\'\n' % os.path.join('binary-file', 'binary-file'),
+    '   C %s\n' % os.path.join('binary-file'),
     '--- Recording mergeinfo for merge of r4 into \'binary-file\':\n',
     ' U   binary-file\n',
     'Summary of conflicts:\n',
-    '  Skipped paths: 1\n',
+    '  Tree conflicts: 1\n',
   ]
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'merge', '^/dir', '-c', '4', 'binary-file')