subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1442611 - in /subversion/trunk/subversion: libsvn_client/delete.c tests/cmdline/basic_tests.py
Date Tue, 05 Feb 2013 14:43:05 GMT
Author: rhuijben
Date: Tue Feb  5 14:43:04 2013
New Revision: 1442611

URL: http://svn.apache.org/viewvc?rev=1442611&view=rev
Log:
Allow 'svn cp iota iota2; svn rm iota2' if iota was originally
an unchanged copy.

* subversion/libsvn_client/delete.c
  (find_undeletables): Allow unmodified copies to pass without
    noticing an unsafe to delete item.

* subversion/tests/cmdline/basic_tests.py
  (basic_delete): Extend to cover this change.

Modified:
    subversion/trunk/subversion/libsvn_client/delete.c
    subversion/trunk/subversion/tests/cmdline/basic_tests.py

Modified: subversion/trunk/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/delete.c?rev=1442611&r1=1442610&r2=1442611&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/delete.c (original)
+++ subversion/trunk/subversion/libsvn_client/delete.c Tue Feb  5 14:43:04 2013
@@ -79,7 +79,14 @@ find_undeletables(void *baton,
     return svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
                              _("'%s' is not under version control"),
                              svn_dirent_local_style(local_abspath, pool));
-
+  else if ((status->node_status == svn_wc_status_added
+            || status->node_status == svn_wc_status_replaced)
+           && status->text_status == svn_wc_status_normal
+           && (status->prop_status == svn_wc_status_normal
+               || status->prop_status == svn_wc_status_none))
+    {
+      /* Unmodified copy. Go ahead, remove it */
+    }
   else if (status->node_status != svn_wc_status_normal
            && status->node_status != svn_wc_status_deleted
            && status->node_status != svn_wc_status_missing)

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1442611&r1=1442610&r2=1442611&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Tue Feb  5 14:43:04 2013
@@ -1152,6 +1152,10 @@ def basic_delete(sbox):
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'rm', '--force', X_path)
 
+  # Deleting an unchanged copy shouldn't error.
+  sbox.simple_copy('iota', 'iota2')
+  svntest.main.run_svn(None, 'rm', sbox.ospath('iota2'))
+
   # Deleting already removed from wc versioned item with --force
   iota_path = sbox.ospath('iota')
   os.remove(iota_path)



Mime
View raw message