You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ne...@apache.org on 2010/04/29 22:14:48 UTC

svn commit: r939474 - in /subversion/trunk/subversion: libsvn_client/merge.c tests/cmdline/merge_authz_tests.py

Author: neels
Date: Thu Apr 29 20:14:48 2010
New Revision: 939474

URL: http://svn.apache.org/viewvc?rev=939474&view=rev
Log:
Fix merge behaviour for absent nodes, broken by r939150. Now,
merge_authz_tests.py 1 passes again. Also tweak a path to local_abspath.

* subversion/libsvn_client/merge.c
  (obstructed_or_missing):
    Return absent nodes as 'missing'. Tweak: rather use LOCAL_ABSPATH to
    check the file system node kind. Also tweak comment.

* subversion/tests/cmdline/merge_authz_tests.py
  (mergeinfo_and_skipped_paths):
    Unmark XFAIL. Above changes fix the missing "skipped" notification.


Modified:
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=939474&r1=939473&r2=939474&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Thu Apr 29 20:14:48 2010
@@ -376,7 +376,8 @@ is_path_conflicted_by_merge(merge_cmd_ba
  *   - Return svn_wc_notify_state_inapplicable if the node kind matches.
  *   - Return 'obstructed' if there is a node on disk where none or a
  *     different kind is expected, or if the disk node cannot be read.
- *   - Return 'missing' if there is no node on disk but one is expected. */
+ *   - Return 'missing' if there is no node on disk but one is expected.
+ *     Also return 'missing' for absent nodes (not here due to authz).*/
 static svn_wc_notify_state_t
 obstructed_or_missing(const char *path,
                       const char *local_dir_abspath,
@@ -405,6 +406,20 @@ obstructed_or_missing(const char *path,
       kind_expected = svn_node_none;
     }
 
+  /* Report absent nodes as 'missing'. First of all, they count as 'hidden',
+   * and since we pass show_hidden == FALSE above, they will show up as
+   * 'none' here. */
+  if (kind_expected == svn_node_none)
+    {
+      svn_boolean_t is_absent;
+      err = svn_wc__node_is_status_absent(&is_absent, merge_b->ctx->wc_ctx,
+                                          local_abspath, pool);
+      if (err)
+        svn_error_clear(err);
+      else if (is_absent)
+        return svn_wc_notify_state_missing;
+    }
+
   /* If a node is deleted, we will still get its kind from the working copy.
    * But to compare with disk state, we want to consider deleted nodes as
    * svn_node_none instead of their original kind.
@@ -424,7 +439,7 @@ obstructed_or_missing(const char *path,
         kind_expected = svn_node_none;
     }
 
-  err = svn_io_check_path(path, &kind_on_disk, pool);
+  err = svn_io_check_path(local_abspath, &kind_on_disk, pool);
   if (err)
     {
       svn_error_clear(err);

Modified: subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py?rev=939474&r1=939473&r2=939474&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py Thu Apr 29 20:14:48 2010
@@ -583,9 +583,7 @@ def merge_fails_if_subtree_is_deleted_on
 
 # list all tests here, starting with None:
 test_list = [ None,
-              # Marked XFAIL because svn fails to emit a 'skipped' notice
-              # on the file 'psi'.
-              SkipUnless(Skip(XFail(mergeinfo_and_skipped_paths),
+              SkipUnless(Skip(mergeinfo_and_skipped_paths,
                               svntest.main.is_ra_type_file),
                          svntest.main.server_has_mergeinfo),
               SkipUnless(merge_fails_if_subtree_is_deleted_on_src,