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 2011/07/13 15:38:45 UTC

svn commit: r1146013 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/update.c libsvn_wc/update_editor.c svn/notify.c tests/cmdline/tree_conflict_tests.py

Author: rhuijben
Date: Wed Jul 13 13:38:44 2011
New Revision: 1146013

URL: http://svn.apache.org/viewvc?rev=1146013&view=rev
Log:
Improve error reporting while updating a bit by notifying why conflicted nodes
are skipped during update.

* subversion/include/svn_wc.h
  (svn_wc_notify_action_t): Add new value. Add it at the end, because it might
    not be part of 1.7, but keep the new in 1.7 to make it easy to merge.

* subversion/libsvn_client/update.c
  (update_internal): Use new notification for tree conflicts.

* subversion/libsvn_wc/update_editor.c
  (open_root,
   delete_entry,
   add_directory,
   open_directory,
   add_file,
   open_file): Skip conflicted nodes with the new notification action.

* subversion/svn/notify.c
  (notify): Handle svn_wc_notify_skip_conflicted.

* subversion/tests/cmdline/tree_conflict_tests.py
  (actual_only_node_behaviour): Update expected message.

Modified:
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_client/update.c
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/svn/notify.c
    subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1146013&r1=1146012&r2=1146013&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Wed Jul 13 13:38:44 2011
@@ -1205,6 +1205,10 @@ typedef enum svn_wc_notify_action_t
    * @since New in 1.7. */
   svn_wc_notify_failed_forbidden_by_server,
 
+  /** The operation skipped the path because it was conflicted.
+   * @since New in 1.7. */
+  svn_wc_notify_skip_conflicted,
+
 } svn_wc_notify_action_t;
 
 

Modified: subversion/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1146013&r1=1146012&r2=1146013&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Wed Jul 13 13:38:44 2011
@@ -255,7 +255,7 @@ update_internal(svn_revnum_t *result_rev
 
           nt = svn_wc_create_notify(local_abspath,
                                     tree_conflicted
-                                      ? svn_wc_notify_skip
+                                      ? svn_wc_notify_skip_conflicted
                                       : svn_wc_notify_update_skip_working_only,
                                     pool);
 

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1146013&r1=1146012&r2=1146013&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Jul 13 13:38:44 2011
@@ -1107,7 +1107,7 @@ open_root(void *edit_baton,
       /* Notify that we skipped the target, while we actually skipped
          the anchor */
       do_notification(eb, eb->target_abspath, svn_node_unknown,
-                      svn_wc_notify_skip, pool);
+                      svn_wc_notify_skip_conflicted, pool);
 
       return SVN_NO_ERROR;
     }
@@ -1758,7 +1758,8 @@ delete_entry(const char *path,
     {
       SVN_ERR(remember_skipped_tree(eb, local_abspath, scratch_pool));
 
-      do_notification(eb, local_abspath, svn_node_unknown, svn_wc_notify_skip,
+      do_notification(eb, local_abspath, svn_node_unknown,
+                      svn_wc_notify_skip_conflicted,
                       scratch_pool);
 
       svn_pool_destroy(scratch_pool);
@@ -2100,7 +2101,7 @@ add_directory(const char *path,
 
       /* ### TODO: Also print victim_path in the skip msg. */
       do_notification(eb, db->local_abspath, svn_node_dir,
-                      svn_wc_notify_skip, pool);
+                      svn_wc_notify_skip_conflicted, pool);
       return SVN_NO_ERROR;
     }
 
@@ -2331,7 +2332,7 @@ open_directory(const char *path,
       db->already_notified = TRUE;
 
       do_notification(eb, db->local_abspath, svn_node_unknown,
-                      svn_wc_notify_skip, pool);
+                      svn_wc_notify_skip_conflicted, pool);
 
       return SVN_NO_ERROR;
     }
@@ -3122,7 +3123,7 @@ add_file(const char *path,
                    APR_HASH_KEY_STRING, (void*)1);
 
       do_notification(eb, fb->local_abspath, svn_node_unknown,
-                      svn_wc_notify_skip, scratch_pool);
+                      svn_wc_notify_skip_conflicted, scratch_pool);
 
       svn_pool_destroy(scratch_pool);
 
@@ -3323,7 +3324,7 @@ open_file(const char *path,
       fb->already_notified = TRUE;
 
       do_notification(eb, fb->local_abspath, svn_node_unknown,
-                      svn_wc_notify_skip, scratch_pool);
+                      svn_wc_notify_skip_conflicted, scratch_pool);
 
       svn_pool_destroy(scratch_pool);
 

Modified: subversion/trunk/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/notify.c?rev=1146013&r1=1146012&r2=1146013&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/notify.c (original)
+++ subversion/trunk/subversion/svn/notify.c Wed Jul 13 13:38:44 2011
@@ -169,6 +169,13 @@ notify(void *baton, const svn_wc_notify_
             path_local)))
         goto print_error;
       break;
+    case svn_wc_notify_skip_conflicted:
+      nb->skipped_paths++;
+      if ((err = svn_cmdline_printf(
+            pool, _("Skipped '%s' -- Node remains in conflict\n"),
+            path_local)))
+        goto print_error;
+      break;
     case svn_wc_notify_update_delete:
     case svn_wc_notify_exclude:
       nb->received_some_change = TRUE;

Modified: subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py?rev=1146013&r1=1146012&r2=1146013&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py Wed Jul 13 13:38:44 2011
@@ -1362,7 +1362,7 @@ def actual_only_node_behaviour(sbox):
 
   # update (up)
   expected_stdout = [
-   "Skipped '%s'\n" % sbox.ospath('A/foo'),
+   "Skipped '%s' -- Node remains in conflict\n" % sbox.ospath('A/foo'),
    "Summary of conflicts:\n",
    "  Skipped paths: 1\n",
   ]