subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r951753 - in /subversion/trunk/subversion: libsvn_client/add.c tests/cmdline/basic_tests.py
Date Sat, 05 Jun 2010 19:12:42 GMT
Author: danielsh
Date: Sat Jun  5 19:12:41 2010
New Revision: 951753

URL: http://svn.apache.org/viewvc?rev=951753&view=rev
Log:
Fix the common variant of issue #3496.

* subversion/libsvn_client/add.c
  (mkdir_urls):
    Reparent the RA session to the common ancestor.  Leave a comment suggesting
    why this may not be ideal.

* subversion/tests/cmdline/basic_tests.py
  (basic_mkdir_url_with_parents):
    Extend the test to capture issue #3496.

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

Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=951753&r1=951752&r2=951753&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Sat Jun  5 19:12:41 2010
@@ -768,6 +768,11 @@ mkdir_urls(svn_commit_info_t **commit_in
   qsort(targets->elts, targets->nelts, targets->elt_size,
         svn_sort_compare_paths);
 
+  /* ### This reparent may be problematic in limited-authz-to-common-parent
+     ### scenarios (compare issue #3242).  See also issue #3496. */
+  if (ra_session)
+    SVN_ERR(svn_ra_reparent(ra_session, common, pool));
+
   /* Create new commit items and add them to the array. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
     {

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=951753&r1=951752&r2=951753&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Sat Jun  5 19:12:41 2010
@@ -257,20 +257,28 @@ def basic_mkdir_url_with_parents(sbox):
 
   sbox.build()
 
+  X_url = sbox.repo_url + '/X'
   X_Y_Z_url = sbox.repo_url + '/X/Y/Z'
   X_Y_Z2_url = sbox.repo_url + '/X/Y/Z2'
   X_T_C_url = sbox.repo_url + '/X/T/C'
+  U_url = sbox.repo_url + '/U'
   U_V_url = sbox.repo_url + '/U/V'
+  U_V_W_url = sbox.repo_url + '/U/V/W'
   svntest.actions.run_and_verify_svn("erroneous mkdir sans --parents",
                                      [],
                                      ".*Try 'svn mkdir --parents' instead.*",
                                      'mkdir', '-m', 'log_msg',
-                                     X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_url)
+                                     X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_W_url)
 
-  svntest.actions.run_and_verify_svn("mkdir --parents",
+  svntest.actions.run_and_verify_svn("mkdir",
                                      ["\n", "Committed revision 2.\n"], [],
+                                     'mkdir', '-m', 'log_msg',
+                                     X_url, U_url)
+
+  svntest.actions.run_and_verify_svn("mkdir --parents",
+                                     ["\n", "Committed revision 3.\n"], [],
                                      'mkdir', '-m', 'log_msg', '--parents',
-                                     X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_url)
+                                     X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_W_url)
 
   expected_output = wc.State(sbox.wc_dir, {
     'X'      : Item(status='A '),
@@ -281,6 +289,7 @@ def basic_mkdir_url_with_parents(sbox):
     'X/T/C'  : Item(status='A '),
     'U'      : Item(status='A '),
     'U/V'    : Item(status='A '),
+    'U/V/W'  : Item(status='A '),
     })
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.add({
@@ -292,17 +301,19 @@ def basic_mkdir_url_with_parents(sbox):
     'X/T/C'  : Item(),
     'U'      : Item(),
     'U/V'    : Item(),
+    'U/V/W'  : Item(),
     })
-  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 2)
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 3)
   expected_status.add({
-    'X'      : Item(status='  ', wc_rev=2),
-    'X/Y'    : Item(status='  ', wc_rev=2),
-    'X/Y/Z'  : Item(status='  ', wc_rev=2),
-    'X/Y/Z2' : Item(status='  ', wc_rev=2),
-    'X/T'    : Item(status='  ', wc_rev=2),
-    'X/T/C'  : Item(status='  ', wc_rev=2),
-    'U'      : Item(status='  ', wc_rev=2),
-    'U/V'    : Item(status='  ', wc_rev=2),
+    'X'      : Item(status='  ', wc_rev=3),
+    'X/Y'    : Item(status='  ', wc_rev=3),
+    'X/Y/Z'  : Item(status='  ', wc_rev=3),
+    'X/Y/Z2' : Item(status='  ', wc_rev=3),
+    'X/T'    : Item(status='  ', wc_rev=3),
+    'X/T/C'  : Item(status='  ', wc_rev=3),
+    'U'      : Item(status='  ', wc_rev=3),
+    'U/V'    : Item(status='  ', wc_rev=3),
+    'U/V/W'  : Item(status='  ', wc_rev=3),
     })
   svntest.actions.run_and_verify_update(sbox.wc_dir,
                                         expected_output,



Mime
View raw message