subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1606666 [2/2] - in /subversion/branches/remove-log-addressing: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/jniwrapper/ subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ subversion/bindings/javah...
Date Mon, 30 Jun 2014 10:15:08 GMT
Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_tests.py Mon
Jun 30 10:15:06 2014
@@ -4227,7 +4227,7 @@ def obey_reporter_api_semantics_while_do
 
   copy_of_A_D_wc_rev = cur_rev
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n',
+                                     ['Committing transaction...\n',
                                       'Committed revision ' + str(cur_rev+1) +
                                       '.\n'],
                                      [],
@@ -6460,10 +6460,12 @@ def update_loses_mergeinfo(sbox):
   A_B_url = sbox.repo_url + '/A/B'
   A_B_J_url = sbox.repo_url + '/A/B/J'
   A_B_K_url = sbox.repo_url + '/A/B/K'
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 2.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 2.\n'],
                                      [],
                                      'mkdir', '-m', 'rev 2', A_B_J_url)
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 3.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 3.\n'],
                                      [],
                                      'mkdir', '-m', 'rev 3', A_B_K_url)
 
@@ -6580,10 +6582,12 @@ def merge_loses_mergeinfo(sbox):
   A_B_url = sbox.repo_url + '/A/B'
   A_B_J_url = sbox.repo_url + '/A/B/J'
   A_B_K_url = sbox.repo_url + '/A/B/K'
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 2.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 2.\n'],
                                      [],
                                      'mkdir', '-m', 'rev 2', A_B_J_url)
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 3.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 3.\n'],
                                      [],
                                      'mkdir', '-m', 'rev 3', A_B_K_url)
 
@@ -7724,7 +7728,8 @@ def merge_old_and_new_revs_from_renamed_
                                         wc_status, None, wc_dir)
 
   # Move A to A_MOVED
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 4.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 4.\n'],
                                      [], 'mv', '-m', 'mv A to A_MOVED',
                                      A_url, A_MOVED_url)
 
@@ -8145,7 +8150,8 @@ def merge_old_and_new_revs_from_renamed_
                                         expected_status, None, wc_dir)
 
   # Move mu to mu_MOVED
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 4.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 4.\n'],
                                      [], 'mv', '-m', 'mv mu to mu_MOVED',
                                      mu_url, mu_MOVED_url)
 
@@ -9143,7 +9149,8 @@ def merge_source_normalization_and_subtr
   wc_disk, wc_status = set_up_branch(sbox)
 
   # r7 - Move A to A_MOVED
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 7.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...',
+                                            'Committed revision 7.\n'],
                                      [], 'mv', '-m', 'mv A to A_MOVED',
                                      sbox.repo_url + '/A',
                                      sbox.repo_url + '/A_MOVED')
@@ -9889,7 +9896,8 @@ def dont_add_mergeinfo_from_own_history(
   # out, leaving the only the mergeinfo created from the merge itself:
   # '/A_COPY:7'.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 8.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 8.\n'],
                                      [], 'move',
                                      sbox.repo_url + '/A',
                                      sbox.repo_url + '/A_MOVED',
@@ -10543,9 +10551,11 @@ def merge_added_subtree(sbox):
   A_COPY_url = url + "/A_COPY"
   A_path = sbox.ospath('A')
 
-  svntest.actions.run_and_verify_svn("",["\n", "Committed revision 2.\n"], [],
+  svntest.actions.run_and_verify_svn("",["Committing transaction...\n",
+                                         "Committed revision 2.\n"], [],
                                      "cp", "-m", "", A_url, A_COPY_url)
-  svntest.actions.run_and_verify_svn("",["\n", "Committed revision 3.\n"], [],
+  svntest.actions.run_and_verify_svn("",["Committing transaction...\n",
+                                         "Committed revision 3.\n"], [],
                                      "cp", "-m", "",
                                      A_COPY_url + '/D',
                                      A_COPY_url + '/D2')
@@ -10804,7 +10814,8 @@ def dont_merge_revs_into_subtree_that_pr
 
   # Copy 'A/D/H' to 'H_COPY' in r6.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 6.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 6.\n'],
                                      [], 'copy',
                                      sbox.repo_url + "/A/D/H",
                                      sbox.repo_url + "/H_COPY",
@@ -10956,7 +10967,8 @@ def set_up_renamed_subtree(sbox):
 
   # Copy 'A/D/H' to 'H_COPY' in r5.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 5.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 5.\n'],
                                      [], 'copy',
                                      sbox.repo_url + "/A/D/H",
                                      sbox.repo_url + "/H_COPY",
@@ -13557,7 +13569,8 @@ def no_self_referential_filtering_on_add
 
   # r10: Move A/C to A/C_MOVED.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 10.\n'],
+                                     ['\n', 'Committing transaction...\n',
+                                      'Committed revision 10.\n'],
                                      [], 'move',
                                      sbox.repo_url + '/A/C',
                                      sbox.repo_url + '/A/C_MOVED',
@@ -13771,6 +13784,7 @@ def merge_range_prior_to_rename_source_e
 
   # r12 - Move A/D/H/nu to A/D/H/nu_moved
   svntest.actions.run_and_verify_svn(None, ["\n",
+                                            "Committing transaction...\n",
                                             "Committed revision 12.\n"], [],
                                      'move', sbox.repo_url + '/A/D/H/nu',
                                      sbox.repo_url + '/A/D/H/nu_moved',
@@ -15093,7 +15107,8 @@ def committed_case_only_move_and_revert(
 
   # r3: A case-only file rename on the server
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 3.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 3.\n'],
                                      [], 'move',
                                      sbox.repo_url + '/A/mu',
                                      sbox.repo_url + '/A/MU',
@@ -15197,7 +15212,8 @@ def committed_case_only_move_and_revert(
 
   # r5: A case-only directory rename on the server
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 5.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 5.\n'],
                                      [], 'move',
                                      sbox.repo_url + '/A/C',
                                      sbox.repo_url + '/A/c',
@@ -17158,7 +17174,8 @@ def reverse_merge_with_rename(sbox):
 
   # r7 - Rename ^/A to ^/trunk.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 7.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 7.\n'],
                                      [], 'move',
                                      sbox.repo_url + '/A',
                                      sbox.repo_url + '/trunk',

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/stat_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/stat_tests.py Mon Jun
30 10:15:06 2014
@@ -951,7 +951,9 @@ def status_ignored_dir(sbox):
   new_dir = sbox.ospath('dir.o')
   new_dir_url = sbox.repo_url + "/dir.o"
 
-  svntest.actions.run_and_verify_svn("Create dir", "\n|Committed revision 2.", [],
+  svntest.actions.run_and_verify_svn("Create dir",
+                                     ["Committing transaction...\n",
+                                      "Committed revision 2.\n"], [],
                                      'mkdir', new_dir_url, '-m', 'msg')
 
   # Make a dir that is ignored by the default ignore patterns.

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py Mon
Jun 30 10:15:06 2014
@@ -923,7 +923,8 @@ def load_with_parent_dir(sbox):
 
   # Create 'sample' dir in sbox.repo_url, and load the dump stream there.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 1.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 1.\n'],
                                      [], "mkdir", sbox.repo_url + "/sample",
                                      "-m", "Create sample dir")
   load_dumpstream(sbox, dumpfile, '--parent-dir', '/sample')
@@ -945,7 +946,8 @@ def load_with_parent_dir(sbox):
   # This time, don't include a leading slash on the --parent-dir argument.
   # See issue #3547.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 11.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 11.\n'],
                                      [], "mkdir", sbox.repo_url + "/sample-2",
                                      "-m", "Create sample-2 dir")
   load_dumpstream(sbox, dumpfile, '--parent-dir', 'sample-2')
@@ -1018,7 +1020,8 @@ def reflect_dropped_renumbered_revs(sbox
   dumpfile = open(dumpfile_location).read()
 
   # Create 'toplevel' dir in sbox.repo_url
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 1.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 1.\n'],
                                      [], "mkdir", sbox.repo_url + "/toplevel",
                                      "-m", "Create toplevel dir")
 

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnrdump_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnrdump_tests.py Mon
Jun 30 10:15:06 2014
@@ -431,7 +431,8 @@ def reflect_dropped_renumbered_revs(sbox
 
   # Create the 'toplevel' directory in repository and then load the same
   # dumpfile into that subtree.
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 10.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 10.\n'],
                                     [], "mkdir", sbox.repo_url + "/toplevel",
                                      "-m", "Create toplevel dir to load into")
   svntest.actions.run_and_verify_svnrdump(svnrdump_dumpfile,
@@ -727,7 +728,8 @@ def svnrdump_load_partial_incremental_du
 
   # Create the 'A' directory in repository and then load the partial
   # incremental dump into the root of the repository.
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 1.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                            'Committed revision 1.\n'],
                                     [], "mkdir", sbox.repo_url + "/A",
                                      "-m", "Create toplevel dir to load into")
 

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/switch_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/switch_tests.py Mon
Jun 30 10:15:06 2014
@@ -352,11 +352,13 @@ def delete_subdir(sbox):
   A2_B_F_url = sbox.repo_url + '/A2/B/F'
 
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 2.\n'], [],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 2.\n'], [],
                                      'cp', '-m', 'make copy', A_url, A2_url)
 
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 3.\n'], [],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 3.\n'], [],
                                      'rm', '-m', 'delete subdir', A2_B_F_url)
 
   expected_output = svntest.wc.State(wc_dir, {
@@ -482,7 +484,8 @@ def failed_anchor_is_target(sbox):
   G_url = sbox.repo_url + '/A/D/G'
   G_psi_url = G_url + '/psi'
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 2.\n'], [],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 2.\n'], [],
                                      'mkdir', '-m', 'log msg', G_psi_url)
 
   # Modify the file 'H/psi' locally.
@@ -543,7 +546,8 @@ def bad_intermediate_urls(sbox):
   # First, make an extra subdirectory in C to match one in the root, plus
   # another one inside of that.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 2.\n'], [],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 2.\n'], [],
                                      'mkdir', '-m', 'log msg',
                                      url_A_C_A, url_A_C_A_Z)
 
@@ -1106,7 +1110,7 @@ def forced_switch_failures(sbox):
   # Make dir A/D/H/I in repos.
   # svn mkdir -m "Log message" url/A/D/H/I
   expected_stdout = verify.UnorderedOutput([
-    '\n',
+    'Committing transaction...\n',
     'Committed revision 2.\n',
   ])
 

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/update_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/update_tests.py Mon
Jun 30 10:15:06 2014
@@ -1238,7 +1238,8 @@ def another_hudson_problem(sbox):
 
   # Delete directory G from the repository
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 3.\n'], [],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 3.\n'], [],
                                      'rm', '-m', 'log msg',
                                      sbox.repo_url + '/A/D/G')
 
@@ -1340,7 +1341,8 @@ def new_dir_with_spaces(sbox):
 
   # Create a new directory ("spacey dir") directly in repository
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 2.\n'], [],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 2.\n'], [],
                                      'mkdir', '-m', 'log msg',
                                      sbox.repo_url
                                      + '/A/spacey%20dir')
@@ -1983,7 +1985,7 @@ def update_copy_of_old_rev(sbox):
 
   # Commit, and check that it says it's committing the right thing
   exp_out = ['Adding         ' + dir2 + '\n',
-             '\n',
+             'Committing transaction...\n',
              'Committed revision 3.\n']
   svntest.actions.run_and_verify_svn(None, exp_out, [],
                                      'ci', '-m', '', wc_dir)

Modified: subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/locks-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/locks-test.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/locks-test.c Mon
Jun 30 10:15:06 2014
@@ -857,6 +857,7 @@ expect_unlock_error(const char *path,
 struct lock_many_baton_t {
   apr_hash_t *results;
   apr_pool_t *pool;
+  int count;
 };
 
 /* Implements svn_fs_lock_callback_t. */
@@ -875,6 +876,10 @@ lock_many_cb(void *lock_baton,
   result->fs_err = svn_error_dup(fs_err);
   svn_hash_sets(b->results, apr_pstrdup(b->pool, path), result);
 
+  if (b->count)
+    if (!--(b->count))
+      return svn_error_create(SVN_ERR_FS_GENERAL, NULL, "lock_many_cb");
+
   return SVN_NO_ERROR;
 }
 
@@ -908,6 +913,7 @@ lock_multiple_paths(const svn_test_opts_
 
   baton.results = apr_hash_make(pool);
   baton.pool = pool;
+  baton.count = 0;
   lock_paths = apr_hash_make(pool);
   unlock_paths = apr_hash_make(pool);
   target = svn_fs_lock_target_create(NULL, newrev, pool);
@@ -1012,6 +1018,67 @@ lock_multiple_paths(const svn_test_opts_
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+lock_cb_error(const svn_test_opts_t *opts,
+              apr_pool_t *pool)
+{
+  svn_fs_t *fs;
+  svn_revnum_t newrev;
+  svn_fs_access_t *access;
+  svn_fs_lock_target_t *target;
+  struct lock_many_baton_t baton;
+  apr_hash_t *lock_paths, *unlock_paths;
+  svn_lock_t *lock;
+
+  SVN_ERR(create_greek_fs(&fs, &newrev, "test-lock-cb-error", opts, pool));
+  SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
+  SVN_ERR(svn_fs_set_access(fs, access));
+
+  baton.results = apr_hash_make(pool);
+  baton.pool = pool;
+  baton.count = 1;
+  lock_paths = apr_hash_make(pool);
+  unlock_paths = apr_hash_make(pool);
+  target = svn_fs_lock_target_create(NULL, newrev, pool);
+
+  svn_hash_sets(lock_paths, "/A/B/E/alpha", target);
+  svn_hash_sets(lock_paths, "/A/B/E/beta", target);
+
+  apr_hash_clear(baton.results);
+  SVN_TEST_ASSERT_ERROR(svn_fs_lock_many(fs, lock_paths, "comment", 0, 0, 0,
+                                         lock_many_cb, &baton,
+                                         pool, pool),
+                        SVN_ERR_FS_GENERAL);
+
+  SVN_TEST_ASSERT(apr_hash_count(baton.results) == 1);
+  SVN_TEST_ASSERT(svn_hash_gets(baton.results, "/A/B/E/alpha")
+                  || svn_hash_gets(baton.results, "/A/B/E/beta"));
+  SVN_ERR(svn_fs_get_lock(&lock, fs, "/A/B/E/alpha", pool));
+  SVN_TEST_ASSERT(lock);
+  svn_hash_sets(unlock_paths, "/A/B/E/alpha", lock->token);
+  SVN_ERR(svn_fs_get_lock(&lock, fs, "/A/B/E/beta", pool));
+  SVN_TEST_ASSERT(lock);
+  svn_hash_sets(unlock_paths, "/A/B/E/beta", lock->token);
+
+  baton.count = 1;
+  apr_hash_clear(baton.results);
+  SVN_TEST_ASSERT_ERROR(svn_fs_unlock_many(fs, unlock_paths, FALSE,
+                                           lock_many_cb, &baton,
+                                           pool, pool),
+                        SVN_ERR_FS_GENERAL);
+
+  SVN_TEST_ASSERT(apr_hash_count(baton.results) == 1);
+  SVN_TEST_ASSERT(svn_hash_gets(baton.results, "/A/B/E/alpha")
+                  || svn_hash_gets(baton.results, "/A/B/E/beta"));
+
+  SVN_ERR(svn_fs_get_lock(&lock, fs, "/A/B/E/alpha", pool));
+  SVN_TEST_ASSERT(!lock);
+  SVN_ERR(svn_fs_get_lock(&lock, fs, "/A/B/E/beta", pool));
+  SVN_TEST_ASSERT(!lock);
+
+  return SVN_NO_ERROR;
+}
+
 /* ------------------------------------------------------------------------ */
 
 /* The test table.  */
@@ -1045,6 +1112,8 @@ static struct svn_test_descriptor_t test
                        "check out-of-dateness before locking"),
     SVN_TEST_OPTS_PASS(lock_multiple_paths,
                        "lock multiple paths"),
+    SVN_TEST_OPTS_PASS(lock_cb_error,
+                       "lock callback error"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/remove-log-addressing/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/tools/dist/backport.pl?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/tools/dist/backport.pl (original)
+++ subversion/branches/remove-log-addressing/tools/dist/backport.pl Mon Jun 30 10:15:06 2014
@@ -35,7 +35,6 @@ use Tie::File ();
 # Programs we use.
 #
 # TODO: document which are interpreted by sh and which should point to binary.
-my $SVNAUTH = $ENV{SVNAUTH} // 'svnauth'; # optional dependency
 my $SVN = $ENV{SVN} || 'svn'; # passed unquoted to sh
 my $SHELL = $ENV{SHELL} // '/bin/sh';
 my $VIM = 'vim';
@@ -43,11 +42,17 @@ my $EDITOR = $ENV{SVN_EDITOR} // $ENV{VI
 my $PAGER = $ENV{PAGER} // 'less' // 'cat';
 
 # Mode flags.
-#    svn-role:      YES=1 MAY_COMMIT=1      (plus '--renormalize')
-#    conflicts-bot: YES=1 MAY_COMMIT=0
-#    interactive:   YES=0 MAY_COMMIT=0      (default)
+package Mode {
+  use constant {
+    AutoCommitApproveds => 1, # used by nightly commits (svn-role)
+    Conflicts => 2,           # used by the hourly conflicts-detection buildbot
+    Interactive => 3,
+  };
+};
 my $YES = ($ENV{YES} // "0") =~ /^(1|yes|true)$/i; # batch mode: eliminate prompts, add sleeps
 my $MAY_COMMIT = ($ENV{MAY_COMMIT} // "false") =~ /^(1|yes|true)$/i;
+my $MODE = ($YES ? ($MAY_COMMIT ? Mode::AutoCommitApproveds : Mode::Conflicts )
+                 : Mode::Interactive );
 
 # Other knobs.
 my $VERBOSE = 0;
@@ -60,15 +65,31 @@ die if grep { ($sh[$_] eq 'true') != !!$
 # Username for entering votes.
 my $SVN_A_O_REALM = '<https://svn.apache.org:443> ASF Committers';            
 my ($AVAILID) = $ENV{AVAILID} // do {
-  local $_ = `$SVNAUTH list 2>/dev/null`;
+  local $_ = `$SVN auth svn.apache.org:443 2>/dev/null`; # TODO: pass $SVN_A_O_REALM
   ($? == 0 && /Auth.*realm: \Q$SVN_A_O_REALM\E\nUsername: (.*)/) ? $1 : undef
 } // do {
   local $/; # slurp mode
+  my $fh;
+  my $dir = "$ENV{HOME}/.subversion/auth/svn.simple/";
   my $filename = Digest->new("MD5")->add($SVN_A_O_REALM)->hexdigest;
-  `cat $ENV{HOME}/.subversion/auth/svn.simple/$filename`
-  =~ /K 8\nusername\nV \d+\n(.*)/ and $1 or undef
+  open $fh, '<', "$dir/$filename"
+  and <$fh> =~ /K 8\nusername\nV \d+\n(.*)/
+  ? $1
+  : undef
+};
+
+unless (defined $AVAILID) {
+  unless ($MODE == Mode::Conflicts) {
+    warn "Username for commits (of votes/merges) not found; "
+         ."it will be possible to review nominations but not to commit votes "
+         ."or merges.\n";
+    warn "Press the 'any' key to continue...\n";
+    die if $MODE == Mode::AutoCommitApproveds; # unattended mode; can't prompt.
+    ReadMode 'cbreak';
+    ReadKey 0;
+    ReadMode 'restore';
+  }
 }
-// warn "Username for commits (of votes/merges) not found";
 
 ############## End of reading values from the environment ##############
 
@@ -152,6 +173,11 @@ y:   Open a shell.
 d:   View a diff.
 N:   Move to the next entry.
 
+To commit a merge, you have two options: either answer 'y' to the second prompt
+to open a shell, and manually run 'svn commit' therein; or set \$MAY_COMMIT=1
+in the environment before running the script, in which case answering 'y'
+to the first prompt will not only run the merge but also commit it.
+
 There is also a batch mode (normally used only by cron jobs and buildbot tasks,
 rather than interactively): when \$YES and \$MAY_COMMIT are defined to '1' in
 the environment, this script will iterate the "Approved:" section, and merge
@@ -165,6 +191,7 @@ EOF
 }
 
 sub nominate_usage {
+  my $availid = $AVAILID // "(your username)";
   my $basename = basename $0;
   print <<EOF;
 nominate.pl: a tool for adding entries to STATUS.
@@ -177,7 +204,7 @@ Will add:
    Justification:
      \$Some_justification
    Votes:
-     +1: $AVAILID
+     +1: $availid
 to STATUS.  Backport branches are detected automatically.
 
 The STATUS file in the current directory is used (unless argv[0] is "n", in
@@ -191,6 +218,18 @@ EOF
 # TODO: Do a dry-run merge on interactively-edited entries in backport.pl
 }
 
+# If $AVAILID is undefined, warn about it and return true.
+# Else return false.
+#
+# $_[0] is a string for inclusion in generated error messages.
+sub warned_cannot_commit {
+  my $caller_error_string = shift;
+  return 0 if defined $AVAILID;
+
+  warn "$0: $caller_error_string: unable to determine your username via \$AVAILID or svnauth(1)
or ~/.subversion/auth/";
+  return 1;
+}
+
 sub digest_string {
   Digest->new("MD5")->add(@_)->hexdigest
 }
@@ -538,6 +577,11 @@ sub vote {
   my @votesarray;
   return unless %$approved or %$votes;
 
+  # If $AVAILID is undef, we can only process 'edit' pseudovotes; handle_entry() is
+  # supposed to prevent numeric (±1,±0) votes from getting to this point.
+  die "Assertion failed" if not defined $AVAILID
+                            and grep { $_ ne 'edit' } map { $_->[0] } values %$votes;
+
   my $had_empty_line;
 
   $. = 0;
@@ -852,6 +896,8 @@ sub handle_entry {
         while (1) { 
           given (prompt "Shall I open a subshell? [ydN] ", verbose => 1) {
             when (/^y/i) {
+              # TODO: if $MAY_COMMIT, save the log message to a file (say,
+              #       backport.logmsg in the wcroot).
               system($SHELL) == 0
                 or warn "Creating an interactive subshell failed ($?): $!"
             }
@@ -900,11 +946,14 @@ sub handle_entry {
         next PROMPT;
       }
       when (/^([+-][01])\s*$/i) {
+        next QUESTION if warned_cannot_commit "Entering a vote failed";
         $votes->{$key} = [$1, \%entry];
         say "Your '$1' vote has been recorded." if $VERBOSE;
         last PROMPT;
       }
       when (/^e/i) {
+        prompt "Press the 'any' key to continue...\n"
+            if warned_cannot_commit "Committing this edit later on may fail";
         my $original = $entry{raw};
         $entry{raw} = edit_string $entry{raw}, $entry{header},
                         trailing_eol => 2;
@@ -1026,6 +1075,8 @@ sub nominate_main {
   my (@revnums) = (+shift) =~ /(\d+)/g;
   my $justification = shift;
 
+  die "Unable to proceed." if warned_cannot_commit "Nominating failed";
+
   @revnums = sort { $a <=> $b } keys %{{ map { $_ => 1 } @revnums }};
   die "No revision numbers specified" unless @revnums;
 

Modified: subversion/branches/remove-log-addressing/tools/server-side/svnfsfs/stats-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/tools/server-side/svnfsfs/stats-cmd.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/tools/server-side/svnfsfs/stats-cmd.c (original)
+++ subversion/branches/remove-log-addressing/tools/server-side/svnfsfs/stats-cmd.c Mon Jun
30 10:15:06 2014
@@ -290,7 +290,8 @@ open_rev_or_pack_file(apr_file_t **file,
                       apr_pool_t *pool)
 {
   svn_fs_fs__revision_file_t *rev_file;
-  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs->fs, rev, pool));
+  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs->fs, rev,
+                                           pool, pool));
 
   *file = rev_file->file;
   return SVN_NO_ERROR;

Modified: subversion/branches/remove-log-addressing/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/win-tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/win-tests.py (original)
+++ subversion/branches/remove-log-addressing/win-tests.py Mon Jun 30 10:15:06 2014
@@ -788,8 +788,11 @@ elif test_javahl:
   if not java_exe:
     print('Java not found. Skipping Java tests')
   else:
-    args = (
-            os.path.abspath(java_exe),
+    args = (os.path.abspath(java_exe),)
+    if (objdir == 'Debug'):
+      args = args + ('-Xcheck:jni',)
+
+    args = args + (
             '-Dtest.rootdir=' + os.path.join(abs_builddir, 'javahl'),
             '-Dtest.srcdir=' + os.path.join(abs_srcdir,
                                             'subversion/bindings/javahl'),



Mime
View raw message