subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1079754 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql tests/cmdline/svnversion_tests.py
Date Wed, 09 Mar 2011 11:30:40 GMT
Author: stsp
Date: Wed Mar  9 11:30:40 2011
New Revision: 1079754

URL: http://svn.apache.org/viewvc?rev=1079754&view=rev
Log:
Follow-up to r1079594, fix detection of local deletions in revision status.

* subversion/tests/cmdline/svnversion_tests.py
  (svnversion_with_structural_changes): Expand this test to cover deletions.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_NODES_WITH_TREE_MODIFICATIONS): Include nodes with
   presence 'base-deleted' in the result of this query.

Found by: rhuijben

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/tests/cmdline/svnversion_tests.py

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1079754&r1=1079753&r2=1079754&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Wed Mar  9 11:30:40 2011
@@ -889,7 +889,8 @@ WHERE wc_id = ?1 AND (local_relpath = ?2
 SELECT local_relpath FROM nodes
 WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
   AND op_depth > 0
-  AND (presence = 'normal' OR presence = 'incomplete')
+  AND (presence = 'normal' OR presence = 'incomplete' OR
+       presence = 'base-deleted')
   AND file_external IS NULL;
 
 /* Grab all the statements related to the schema.  */

Modified: subversion/trunk/subversion/tests/cmdline/svnversion_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnversion_tests.py?rev=1079754&r1=1079753&r2=1079754&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnversion_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnversion_tests.py Wed Mar  9 11:30:40 2011
@@ -254,6 +254,7 @@ def svnversion_with_structural_changes(s
   wc_dir = sbox.wc_dir
   repo_url = sbox.repo_url
 
+  # Test a copy
   iota_path = os.path.join(wc_dir, 'iota')
   iota_copy_path = os.path.join(wc_dir, 'iota_copy')
 
@@ -277,6 +278,19 @@ def svnversion_with_structural_changes(s
                                             [ "Uncommitted local addition, "
                                             "copy or move\n" ],
                                             [])
+  sbox.simple_commit()
+
+  # Test deletion
+  sbox.simple_rm('iota')
+  svntest.actions.run_and_verify_svnversion("Deleted file",
+                                            sbox.ospath('iota'),
+                                            repo_url + '/iota',
+                                            [],
+                                            [ "'%s' doesn't exist\n" % \
+                                              sbox.ospath('iota')],
+                                            )
+  svntest.actions.run_and_verify_svnversion("Deleted file", wc_dir, repo_url,
+                                            [ "1:2M\n" ], [])
 
 ########################################################################
 # Run the tests



Mime
View raw message