subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1615198 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_client/externals.c subversion/tests/cmdline/externals_tests.py
Date Fri, 01 Aug 2014 18:58:57 GMT
Author: svn-role
Date: Fri Aug  1 18:58:57 2014
New Revision: 1615198

URL: http://svn.apache.org/r1615198
Log:
Merge the 1.8.x-rm-external-dir branch:

 * r1600311, r1600315, r1600323, r1600393
   Properly delete ancestor directories of externals when removing the
   external by changing the svn:externals value.
   Justification:
     Regression against 1.7.x
   Branch:
     ^/subversion/branches/1.8.x-rm-external-dir
   Votes:
     +1: rhuijben, philip, breser

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_client/externals.c
    subversion/branches/1.8.x/subversion/tests/cmdline/externals_tests.py

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

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1615198&r1=1615197&r2=1615198&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Fri Aug  1 18:58:57 2014
@@ -189,16 +189,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1600311, r1600315, r1600323, r1600393
-   Properly delete ancestor directories of externals when removing the
-   external by changing the svn:externals value.
-   Justification:
-     Regression against 1.7.x
-   Branch:
-     ^/subversion/branches/1.8.x-rm-external-dir
-   Votes:
-     +1: rhuijben, philip, breser
-
  * ^/subversion/branches/1.8.x-VS2013-14
    Enable support for generating VS2013 and later ("14"+) project files.
    Justification:

Modified: subversion/branches/1.8.x/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_client/externals.c?rev=1615198&r1=1615197&r2=1615198&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_client/externals.c Fri Aug  1 18:58:57 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/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/cmdline/externals_tests.py?rev=1615198&r1=1615197&r2=1615198&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/1.8.x/subversion/tests/cmdline/externals_tests.py Fri Aug  1 18:58:57
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