You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/05/05 15:00:49 UTC

svn commit: r1099776 - in /subversion/trunk/subversion: libsvn_client/client.h libsvn_client/commit.c libsvn_client/commit_util.c tests/cmdline/copy_tests.py

Author: rhuijben
Date: Thu May  5 13:00:48 2011
New Revision: 1099776

URL: http://svn.apache.org/viewvc?rev=1099776&view=rev
Log:
Following up on r199411, we should use an url exists at the old revision check
instead of just checking if the url exists in HEAD.

(Found via copy_tests.py 98 work).

The failing test should have provided a hint...

* subversion/libsvn_client/client.h
  (svn_client__check_url_kind_t): Add revision argument.

* subversion/libsvn_client/commit.c
  (check_url_kind): Check if the node exists at the specified revision.

* subversion/libsvn_client/commit_util.c
  (handle_descendants): Check if the node is really the child we expect at the
    copy origin.

* subversion/tests/cmdline/copy_tests.py
  (wc_to_wc_copy_deleted): Revert the changes to this test in r199411.

Modified:
    subversion/trunk/subversion/libsvn_client/client.h
    subversion/trunk/subversion/libsvn_client/commit.c
    subversion/trunk/subversion/libsvn_client/commit_util.c
    subversion/trunk/subversion/tests/cmdline/copy_tests.py

Modified: subversion/trunk/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/client.h?rev=1099776&r1=1099775&r2=1099776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/client.h (original)
+++ subversion/trunk/subversion/libsvn_client/client.h Thu May  5 13:00:48 2011
@@ -782,6 +782,7 @@ typedef struct svn_client__copy_pair_t
 typedef svn_error_t *(*svn_client__check_url_kind_t)(void *baton,
                                                      svn_node_kind_t *kind,
                                                      const char *url,
+                                                     svn_revnum_t revision,
                                                      apr_pool_t *scratch_pool);
 
 /* Recursively crawl a set of working copy paths (DIR_ABSPATH + each

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1099776&r1=1099775&r2=1099776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Thu May  5 13:00:48 2011
@@ -1142,6 +1142,7 @@ static svn_error_t *
 check_url_kind(void *baton,
                svn_node_kind_t *kind,
                const char *url,
+               svn_revnum_t revision,
                apr_pool_t *scratch_pool)
 {
   struct check_url_kind_baton *cukb = baton;
@@ -1158,7 +1159,7 @@ check_url_kind(void *baton,
     SVN_ERR(svn_ra_reparent(cukb->session, url, scratch_pool));
 
   return svn_error_return(
-                svn_ra_check_path(cukb->session, "", SVN_INVALID_REVNUM,
+                svn_ra_check_path(cukb->session, "", revision,
                                   kind, scratch_pool));
 }
 

Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1099776&r1=1099775&r2=1099776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Thu May  5 13:00:48 2011
@@ -803,7 +803,8 @@ handle_descendants(void *baton,
                                                 iterpool);
 
               SVN_ERR(hdb->check_url_func(hdb->check_url_baton,
-                                          &kind, from_url, iterpool));
+                                          &kind, from_url, item->copyfrom_rev,
+                                          iterpool));
 
               if (kind == svn_node_none)
                 continue; /* This node is already deleted */

Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1099776&r1=1099775&r2=1099776&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Thu May  5 13:00:48 2011
@@ -1583,11 +1583,9 @@ def wc_to_wc_copy_deleted(sbox):
                         copied=None, wc_rev=3)
   expected_output = svntest.wc.State(wc_dir, {
     'A/B2'         : Item(verb='Adding'),
-    # Before the commit processor verified not-present deletes
-    # the output would also contain
-    # 'A/B2/E/alpha' : Item(verb='Deleting'),
-    # 'A/B2/lambda'  : Item(verb='Deleting'),
-    # 'A/B2/F'       : Item(verb='Deleting'),
+    'A/B2/E/alpha' : Item(verb='Deleting'),
+    'A/B2/lambda'  : Item(verb='Deleting'),
+    'A/B2/F'       : Item(verb='Deleting'),
     })
 
   svntest.actions.run_and_verify_commit(wc_dir,