You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/08/24 16:45:55 UTC

svn commit: r1161134 [2/2] - in /subversion/branches/fs-py: ./ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/l...

Modified: subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py?rev=1161134&r1=1161133&r2=1161134&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py Wed Aug 24 14:45:54 2011
@@ -254,8 +254,10 @@ d_adds = [
 # Scenarios that start with an existing versioned item
 #
 # GO-AWAY: node is no longer at the path where it was.
-# file-del(F) = del(F) or move(F,F2)
+# file-del(F) = del(F)
+# file-move(F) = move(F,F2)
 # dir-del(D)  = del(D) or move(D,D2)
+# Note: file-move(F) does not conflict with incoming edit
 #
 # REPLACE: node is no longer at the path where it was, but another node is.
 # file-rpl(F) = file-del(F) + file-add(F)
@@ -268,8 +270,12 @@ d_adds = [
 
 f_dels = [
   ( create_f, ['fD'] ),
+]
+
+f_moves = [
   ( create_f, ['fM'] ),
 ]
+
 d_dels = [
   ( create_d, ['dD'] ),
   ( create_d, ['dM'] ),
@@ -562,7 +568,7 @@ def test_tc_merge(sbox, incoming_scen, b
 # WC state: as scheduled (no obstruction)
 
 def up_sw_file_mod_onto_del(sbox):
-  "up/sw file: modify onto del/rpl/mv"
+  "up/sw file: modify onto del/rpl"
   test_tc_up_sw(sbox, f_mods, f_dels + f_rpls)
   # Note: See UC1 in notes/tree-conflicts/use-cases.txt.
 
@@ -573,12 +579,12 @@ def up_sw_file_del_onto_mod(sbox):
   #          ### OR (see Nico's email <>):
   #          schedule-delete but leave F on disk (can only apply with
   #            text-mod; prop-mod can't be preserved in this way)
-  test_tc_up_sw(sbox, f_dels + f_rpls, f_mods)
+  test_tc_up_sw(sbox, f_dels + f_moves + f_rpls, f_mods)
   # Note: See UC2 in notes/tree-conflicts/use-cases.txt.
 
 def up_sw_file_del_onto_del(sbox):
   "up/sw file: del/rpl/mv onto del/rpl/mv"
-  test_tc_up_sw(sbox, f_dels + f_rpls, f_dels + f_rpls)
+  test_tc_up_sw(sbox, f_dels + f_moves + f_rpls, f_dels + f_rpls)
   # Note: See UC3 in notes/tree-conflicts/use-cases.txt.
 
 def up_sw_file_add_onto_add(sbox):
@@ -650,22 +656,24 @@ def up_sw_dir_add_onto_add(sbox):
 def merge_file_mod_onto_not_file(sbox):
   "merge file: modify onto not-file"
   sbox2 = sbox.clone_dependent()
-  test_tc_merge(sbox, f_mods, br_scen = f_dels + f_rpl_d)
-  test_tc_merge(sbox2, f_mods, wc_scen = f_dels)
+  test_tc_merge(sbox, f_mods, br_scen = f_dels + f_moves + f_rpl_d)
+  test_tc_merge(sbox2, f_mods, wc_scen = f_dels + f_moves)
   # Note: See UC4 in notes/tree-conflicts/use-cases.txt.
 
 def merge_file_del_onto_not_same(sbox):
   "merge file: del/rpl/mv onto not-same"
   sbox2 = sbox.clone_dependent()
-  test_tc_merge(sbox, f_dels + f_rpls, br_scen = f_mods)
-  test_tc_merge(sbox2, f_dels + f_rpls, wc_scen = f_mods)
+  test_tc_merge(sbox, f_dels + f_moves + f_rpls, br_scen = f_mods)
+  test_tc_merge(sbox2, f_dels + f_moves + f_rpls, wc_scen = f_mods)
   # Note: See UC5 in notes/tree-conflicts/use-cases.txt.
 
 def merge_file_del_onto_not_file(sbox):
   "merge file: del/rpl/mv onto not-file"
   sbox2 = sbox.clone_dependent()
-  test_tc_merge(sbox, f_dels + f_rpls, br_scen = f_dels + f_rpl_d)
-  test_tc_merge(sbox2, f_dels + f_rpls, wc_scen = f_dels)
+  test_tc_merge(sbox, f_dels + f_moves + f_rpls,
+                br_scen = f_dels + f_moves + f_rpl_d)
+  test_tc_merge(sbox2, f_dels + f_moves + f_rpls,
+                wc_scen = f_dels + f_moves)
   # Note: See UC6 in notes/tree-conflicts/use-cases.txt.
 
 def merge_file_add_onto_not_none(sbox):

Modified: subversion/branches/fs-py/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/upgrade_tests.py?rev=1161134&r1=1161133&r2=1161134&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/upgrade_tests.py Wed Aug 24 14:45:54 2011
@@ -1093,6 +1093,24 @@ def upgrade_with_missing_subdir(sbox):
                                         expected_disk,
                                         expected_status)
 
+@Issue(3994)
+def upgrade_locked(sbox):
+  "upgrade working copy with locked files"
+
+  replace_sbox_with_tarfile(sbox, 'upgrade_locked.tar.bz2')
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
+
+  expected_status = svntest.wc.State(sbox.wc_dir,
+    {
+      ''                  : Item(status='  ', wc_rev=1),
+      'A'                 : Item(status='D ', wc_rev=2),
+      'A/third'           : Item(status='D ', writelocked='K', wc_rev=2),
+      'other'             : Item(status='D ', writelocked='K', wc_rev=4),
+      'iota'              : Item(status='  ', writelocked='K', wc_rev=3),
+    })
+
+  run_and_verify_status_no_server(sbox.wc_dir, expected_status)
 
 ########################################################################
 # Run the tests
@@ -1141,6 +1159,7 @@ test_list = [ None,
               add_add_del_del_tc,
               add_add_x2,
               upgrade_with_missing_subdir,
+              upgrade_locked,
              ]
 
 

Modified: subversion/branches/fs-py/subversion/tests/libsvn_fs_fs/fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/libsvn_fs_fs/fs-pack-test.c?rev=1161134&r1=1161133&r2=1161134&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/libsvn_fs_fs/fs-pack-test.c (original)
+++ subversion/branches/fs-py/subversion/tests/libsvn_fs_fs/fs-pack-test.c Wed Aug 24 14:45:54 2011
@@ -95,6 +95,43 @@ get_rev_contents(svn_revnum_t rev, apr_p
   return apr_psprintf(pool, "%" APR_INT64_T_FMT "\n", num);
 }
 
+struct pack_notify_baton
+{
+  apr_int64_t expected_shard;
+  svn_fs_pack_notify_action_t expected_action;
+};
+
+static svn_error_t *
+pack_notify(void *baton,
+            apr_int64_t shard,
+            svn_fs_pack_notify_action_t action,
+            apr_pool_t *pool)
+{
+  struct pack_notify_baton *pnb = baton;
+
+  SVN_TEST_ASSERT(shard == pnb->expected_shard);
+  SVN_TEST_ASSERT(action == pnb->expected_action);
+
+  /* Update expectations. */
+  switch (action)
+    {
+      case svn_fs_pack_notify_start:
+        pnb->expected_action = svn_fs_pack_notify_end;
+        break;
+
+      case svn_fs_pack_notify_end:
+        pnb->expected_action = svn_fs_pack_notify_start;
+        pnb->expected_shard++;
+        break;
+
+      default:
+        return svn_error_create(SVN_ERR_TEST_FAILED, NULL,
+                                "Unknown notification action when packing");
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /* Create a packed filesystem in DIR.  Set the shard size to
    SHARD_SIZE and create NUM_REVS number of revisions (in addition to
    r0).  Use POOL for allocations.  After this function successfully
@@ -113,6 +150,7 @@ create_packed_filesystem(const char *dir
   const char *conflict;
   svn_revnum_t after_rev;
   apr_pool_t *subpool = svn_pool_create(pool);
+  struct pack_notify_baton pnb;
   apr_pool_t *iterpool;
   int version;
 
@@ -156,7 +194,9 @@ create_packed_filesystem(const char *dir
   svn_pool_destroy(subpool);
 
   /* Now pack the FS */
-  return svn_fs_pack(dir, NULL, NULL, NULL, NULL, pool);
+  pnb.expected_shard = 0;
+  pnb.expected_action = svn_fs_pack_notify_start;
+  return svn_fs_pack(dir, pack_notify, &pnb, NULL, NULL, pool);
 }
 
 

Modified: subversion/branches/fs-py/tools/client-side/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/client-side/svnmucc/svnmucc.c?rev=1161134&r1=1161133&r2=1161134&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/client-side/svnmucc/svnmucc.c (original)
+++ subversion/branches/fs-py/tools/client-side/svnmucc/svnmucc.c Wed Aug 24 14:45:54 2011
@@ -108,6 +108,7 @@ static svn_error_t *
 create_ra_callbacks(svn_ra_callbacks2_t **callbacks,
                     const char *username,
                     const char *password,
+                    const char *config_dir,
                     svn_boolean_t non_interactive,
                     svn_boolean_t no_auth_cache,
                     apr_pool_t *pool)
@@ -116,7 +117,8 @@ create_ra_callbacks(svn_ra_callbacks2_t 
 
   SVN_ERR(svn_cmdline_create_auth_baton(&(*callbacks)->auth_baton,
                                         non_interactive,
-                                        username, password, NULL, no_auth_cache,
+                                        username, password, config_dir,
+                                        no_auth_cache,
                                         FALSE, NULL, NULL, NULL, pool));
 
   (*callbacks)->open_tmp_file = open_tmp_file;
@@ -635,7 +637,7 @@ execute(const apr_array_header_t *action
   SVN_ERR(svn_config_get_config(&config, config_dir, pool));
   SVN_ERR(svn_cmdline__apply_config_options(config, config_options,
                                             "svnmucc: ", "--config-option"));
-  SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password,
+  SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password, config_dir,
                               non_interactive, no_auth_cache, pool));
   SVN_ERR(svn_ra_open4(&session, NULL, anchor, NULL, ra_callbacks,
                        NULL, config, pool));