subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1142207 - /subversion/trunk/subversion/libsvn_wc/adm_crawler.c
Date Sat, 02 Jul 2011 11:49:01 GMT
Author: rhuijben
Date: Sat Jul  2 11:49:01 2011
New Revision: 1142207

URL: http://svn.apache.org/viewvc?rev=1142207&view=rev
Log:
Make the restore step of 'svn update' capable of restoring missing added
and incomplete directories. This should fix a few usability problems that
were found by danielsh's recent experiments with using normal 'rm' in a
wc-ng working copy.

* subversion/libsvn_wc/adm_crawler.c
  (svn_wc_restore,
   report_revisions_and_depths,
   svn_wc_crawl_revisions5): Allow restoring directories in the added and
     incomplete status.

Found by: danielsh

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_crawler.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=1142207&r1=1142206&r2=1142207&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Sat Jul  2 11:49:01 2011
@@ -131,7 +131,9 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
   if (status != svn_wc__db_status_normal
       && status != svn_wc__db_status_copied
       && status != svn_wc__db_status_moved_here
-      && !(status == svn_wc__db_status_added && kind == svn_wc__db_kind_dir))
+      && !(kind == svn_wc__db_kind_dir
+           && (status == svn_wc__db_status_added
+               || status == svn_wc__db_status_incomplete)))
     {
       return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
                                _("The node '%s' can not be restored."),
@@ -388,7 +390,10 @@ report_revisions_and_depths(svn_wc__db_t
 
           if (wrk_status == svn_wc__db_status_normal
               || wrk_status == svn_wc__db_status_copied
-              || wrk_status == svn_wc__db_status_moved_here)
+              || wrk_status == svn_wc__db_status_moved_here
+              || (wrk_kind == svn_wc__db_kind_dir
+                  && (wrk_status == svn_wc__db_status_added
+                      || wrk_status == svn_wc__db_status_incomplete)))
             {
               svn_node_kind_t dirent_kind;
 
@@ -736,7 +741,10 @@ svn_wc_crawl_revisions5(svn_wc_context_t
 
       if (wrk_status == svn_wc__db_status_normal
           || wrk_status == svn_wc__db_status_copied
-          || wrk_status == svn_wc__db_status_moved_here)
+          || wrk_status == svn_wc__db_status_moved_here
+          || (wrk_kind == svn_wc__db_kind_dir
+              && (wrk_status == svn_wc__db_status_added
+                  || wrk_status == svn_wc__db_status_incomplete))) 
         {
           SVN_ERR(restore_node(wc_ctx->db, local_abspath,
                                wrk_kind, use_commit_times,



Mime
View raw message