subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1600633 - in /subversion/branches/1.8.x-rm-external-dir: ./ subversion/libsvn_client/externals.c subversion/tests/cmdline/externals_tests.py
Date Thu, 05 Jun 2014 12:28:25 GMT
Author: rhuijben
Date: Thu Jun  5 12:28:24 2014
New Revision: 1600633

URL: http://svn.apache.org/r1600633
Log:
Merge r1600311,1600315,1600323,1600393 from trunk, resolving a trivial text conflict

Modified:
    subversion/branches/1.8.x-rm-external-dir/   (props changed)
    subversion/branches/1.8.x-rm-external-dir/subversion/libsvn_client/externals.c
    subversion/branches/1.8.x-rm-external-dir/subversion/tests/cmdline/externals_tests.py

Propchange: subversion/branches/1.8.x-rm-external-dir/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1600311,1600315,1600323,1600393

Modified: subversion/branches/1.8.x-rm-external-dir/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-rm-external-dir/subversion/libsvn_client/externals.c?rev=1600633&r1=1600632&r2=1600633&view=diff
==============================================================================
--- subversion/branches/1.8.x-rm-external-dir/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/1.8.x-rm-external-dir/subversion/libsvn_client/externals.c Thu Jun
 5 12:28:24 2014
@@ -1017,19 +1017,30 @@ svn_client__handle_externals(apr_hash_t 
 
         parent_abspath = svn_dirent_dirname(parent_abspath, iterpool);
         SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, parent_abspath,
-                                  TRUE, FALSE, iterpool));
+                                  FALSE /* show_deleted*/,
+                                  FALSE /* show_hidden */,
+                                  iterpool));
         if (kind == svn_node_none)
           {
             svn_error_t *err;
 
             err = svn_io_dir_remove_nonrecursive(parent_abspath, iterpool);
-            if (err && APR_STATUS_IS_ENOTEMPTY(err->apr_err))
+            if (err)
               {
-                svn_error_clear(err);
-                break;
+                if (APR_STATUS_IS_ENOTEMPTY(err->apr_err))
+                  {
+                    svn_error_clear(err);
+                    break; /* No parents to delete */
+                  }
+                else if (APR_STATUS_IS_ENOENT(err->apr_err)
+                         || APR_STATUS_IS_ENOTDIR(err->apr_err))
+                  {
+                    svn_error_clear(err);
+                    /* Fall through; parent dir might be unversioned */
+                  }
+                else
+                  return svn_error_trace(err);
               }
-            else
-              SVN_ERR(err);
           }
       } while (strcmp(parent_abspath, defining_abspath) != 0);
     }

Modified: subversion/branches/1.8.x-rm-external-dir/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-rm-external-dir/subversion/tests/cmdline/externals_tests.py?rev=1600633&r1=1600632&r2=1600633&view=diff
==============================================================================
--- subversion/branches/1.8.x-rm-external-dir/subversion/tests/cmdline/externals_tests.py
(original)
+++ subversion/branches/1.8.x-rm-external-dir/subversion/tests/cmdline/externals_tests.py
Thu Jun  5 12:28:24 2014
@@ -3227,6 +3227,38 @@ def update_dir_external_shallow(sbox):
                                         sbox.ospath('A/B/E'))
 
 
+def update_deletes_file_external(sbox):
+  "update deletes a file external"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  sbox.simple_propset('svn:externals', '../D/gamma gamma', 'A/C')
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Create a branch
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'copy',
+                                     '-m', 'create branch',
+                                     sbox.repo_url + '/A',
+                                     sbox.repo_url + '/A_copy')
+
+  # Update the working copy
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Remove the branch
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'rm',
+                                     '-m', 'remove branch',
+                                     sbox.repo_url + '/A_copy')
+
+  # As of r1448345, this update fails:
+  # E000002: Can't remove directory '.../A_copy/C': No such file or directory
+  sbox.simple_update()
+  
+
 ########################################################################
 # Run the tests
 
@@ -3279,6 +3311,7 @@ test_list = [ None,
               move_with_file_externals,
               pinned_externals,
               update_dir_external_shallow,
+              update_deletes_file_external
              ]
 
 if __name__ == '__main__':



Mime
View raw message