You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/06/14 22:58:16 UTC
svn commit: r1685464 [42/43] - in /subversion/branches/fsx-1.10: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/
contrib/client-side/svncopy/ doc/ notes/ subversion/bindings/javahl/
subversion/bindings/javahl/native/ subversion/b...
Modified: subversion/branches/fsx-1.10/subversion/tests/libsvn_wc/wc-test-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/libsvn_wc/wc-test-queries.sql?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/libsvn_wc/wc-test-queries.sql (original)
+++ subversion/branches/fsx-1.10/subversion/tests/libsvn_wc/wc-test-queries.sql Sun Jun 14 20:58:10 2015
@@ -44,8 +44,14 @@ DELETE FROM nodes;
-- STMT_INSERT_NODE
INSERT INTO nodes (local_relpath, op_depth, presence, repos_path,
- revision, parent_relpath, wc_id, repos_id, kind, depth)
- VALUES (?1, ?2, ?3, ?4, ?5, ?6, 1, 1, 'dir', 'infinity')
+ revision, parent_relpath, moved_to, moved_here,
+ properties, wc_id, repos_id, kind,
+ depth)
+ VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, 1,
+ CASE WHEN ?3 != 'base-deleted' THEN 1 END,
+ 'dir',
+ CASE WHEN ?3 in ('normal', 'incomplete')
+ THEN 'infinity' END)
-- STMT_DELETE_ACTUAL
DELETE FROM actual_node;
@@ -54,8 +60,18 @@ DELETE FROM actual_node;
INSERT INTO actual_node (local_relpath, parent_relpath, changelist, wc_id)
VALUES (?1, ?2, ?3, 1)
+-- STMT_ENSURE_EMPTY_PRISTINE
+INSERT OR IGNORE INTO pristine (checksum, md5_checksum, size, refcount)
+ VALUES ('$sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709',
+ '$md5 $d41d8cd98f00b204e9800998ecf8427e',
+ 0, 0)
+
-- STMT_NODES_SET_FILE
-UPDATE nodes SET kind = 'file' WHERE wc_id = 1 and local_relpath = ?1
+UPDATE nodes
+ SET kind = 'file',
+ checksum = '$sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709',
+ depth = NULL
+WHERE wc_id = 1 and local_relpath = ?1
-- STMT_SELECT_ALL_ACTUAL
SELECT local_relpath FROM actual_node WHERE wc_id = 1
Modified: subversion/branches/fsx-1.10/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/svn_test.h?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/svn_test.h (original)
+++ subversion/branches/fsx-1.10/subversion/tests/svn_test.h Sun Jun 14 20:58:10 2015
@@ -149,6 +149,8 @@ typedef struct svn_test_opts_t
const char *repos_dir;
/* Repository url: The url to access REPOS_DIR as */
const char *repos_url;
+ /* Memcached server. */
+ const char *memcached_server;
/* Repository template: pre-created repository to copy for tests */
const char *repos_template;
/* Minor version to use for servers and FS backends, or zero to use
Modified: subversion/branches/fsx-1.10/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/svn_test_fs.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/fsx-1.10/subversion/tests/svn_test_fs.c Sun Jun 14 20:58:10 2015
@@ -399,27 +399,30 @@ static svn_error_t *
get_dir_entries(apr_hash_t *tree_entries,
svn_fs_root_t *root,
const char *path,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
apr_hash_t *entries;
apr_hash_index_t *hi;
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+ apr_pool_t *result_pool = apr_hash_pool_get(tree_entries);
- SVN_ERR(svn_fs_dir_entries(&entries, root, path, pool));
+ SVN_ERR(svn_fs_dir_entries(&entries, root, path, scratch_pool));
/* Copy this list to the master list with the path prepended to the
names */
- for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
+ for (hi = apr_hash_first(scratch_pool, entries); hi; hi = apr_hash_next(hi))
{
void *val;
svn_fs_dirent_t *dirent;
const char *full_path;
+ svn_pool_clear(iterpool);
apr_hash_this(hi, NULL, NULL, &val);
dirent = val;
/* Calculate the full path of this entry (by appending the name
to the path thus far) */
- full_path = svn_path_join(path, dirent->name, pool);
+ full_path = svn_path_join(path, dirent->name, result_pool);
/* Now, copy this dirent to the master hash, but this time, use
the full path for the key */
@@ -427,7 +430,7 @@ get_dir_entries(apr_hash_t *tree_entries
/* If this entry is a directory, recurse into the tree. */
if (dirent->kind == svn_node_dir)
- SVN_ERR(get_dir_entries(tree_entries, root, full_path, pool));
+ SVN_ERR(get_dir_entries(tree_entries, root, full_path, iterpool));
}
return SVN_NO_ERROR;
@@ -500,6 +503,7 @@ svn_test__validate_tree(svn_fs_root_t *r
{
apr_hash_t *tree_entries, *expected_entries;
apr_pool_t *subpool = svn_pool_create(pool);
+ apr_pool_t *iterpool = svn_pool_create(pool);
svn_stringbuf_t *extra_entries = NULL;
svn_stringbuf_t *missing_entries = NULL;
svn_stringbuf_t *corrupt_entries = NULL;
@@ -509,6 +513,13 @@ svn_test__validate_tree(svn_fs_root_t *r
/* There should be no entry with this name. */
const char *na_name = "es-vee-en";
+ /* Create our master hash for storing the entries */
+ tree_entries = apr_hash_make(subpool);
+
+ /* Recursively get the whole tree */
+ SVN_ERR(get_dir_entries(tree_entries, root, "", iterpool));
+ svn_pool_clear(iterpool);
+
/* Create a hash for storing our expected entries */
expected_entries = apr_hash_make(subpool);
@@ -517,12 +528,6 @@ svn_test__validate_tree(svn_fs_root_t *r
apr_hash_set(expected_entries, entries[i].path,
APR_HASH_KEY_STRING, &(entries[i]));
- /* Create our master hash for storing the entries */
- tree_entries = apr_hash_make(pool);
-
- /* Begin the recursive directory entry dig */
- SVN_ERR(get_dir_entries(tree_entries, root, "", subpool));
-
/* For each entry in our EXPECTED_ENTRIES hash, try to find that
entry in the TREE_ENTRIES hash given us by the FS. If we find
that object, remove it from the TREE_ENTRIES. If we don't find
@@ -536,6 +541,7 @@ svn_test__validate_tree(svn_fs_root_t *r
void *val;
svn_test__tree_entry_t *entry;
+ svn_pool_clear(iterpool);
apr_hash_this(hi, &key, &keylen, &val);
entry = val;
@@ -546,7 +552,7 @@ svn_test__validate_tree(svn_fs_root_t *r
svn_error_t *err;
if ((err = validate_tree_entry(root, entry->path,
- entry->contents, subpool)))
+ entry->contents, iterpool)))
{
/* If we don't have a corrupt entries string, make one. */
if (! corrupt_entries)
@@ -627,6 +633,7 @@ svn_test__validate_tree(svn_fs_root_t *r
extra_entries ? extra_entries->data : "");
}
+ svn_pool_destroy(iterpool);
svn_pool_destroy(subpool);
return SVN_NO_ERROR;
}
@@ -675,6 +682,7 @@ svn_test__txn_script_exec(svn_fs_root_t
apr_pool_t *pool)
{
int i;
+ apr_pool_t *iterpool = svn_pool_create(pool);
/* Run through the list of edits, making the appropriate edit on
that entry in the TXN_ROOT. */
@@ -685,18 +693,19 @@ svn_test__txn_script_exec(svn_fs_root_t
int cmd = script[i].cmd;
svn_boolean_t is_dir = (param1 == 0);
+ svn_pool_clear(iterpool);
switch (cmd)
{
case 'a':
if (is_dir)
{
- SVN_ERR(svn_fs_make_dir(txn_root, path, pool));
+ SVN_ERR(svn_fs_make_dir(txn_root, path, iterpool));
}
else
{
- SVN_ERR(svn_fs_make_file(txn_root, path, pool));
+ SVN_ERR(svn_fs_make_file(txn_root, path, iterpool));
SVN_ERR(svn_test__set_file_contents(txn_root, path,
- param1, pool));
+ param1, iterpool));
}
break;
@@ -706,21 +715,21 @@ svn_test__txn_script_exec(svn_fs_root_t
svn_fs_root_t *rev_root;
svn_fs_t *fs = svn_fs_root_fs(txn_root);
- SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
- SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest, pool));
- SVN_ERR(svn_fs_copy(rev_root, path, txn_root, param1, pool));
+ SVN_ERR(svn_fs_youngest_rev(&youngest, fs, iterpool));
+ SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest, iterpool));
+ SVN_ERR(svn_fs_copy(rev_root, path, txn_root, param1, iterpool));
}
break;
case 'd':
- SVN_ERR(svn_fs_delete(txn_root, path, pool));
+ SVN_ERR(svn_fs_delete(txn_root, path, iterpool));
break;
case 'e':
if (! is_dir)
{
SVN_ERR(svn_test__set_file_contents(txn_root, path,
- param1, pool));
+ param1, iterpool));
}
break;
@@ -729,6 +738,7 @@ svn_test__txn_script_exec(svn_fs_root_t
}
}
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
@@ -765,21 +775,26 @@ svn_test__check_greek_tree(svn_fs_root_t
svn_stringbuf_t *rstring;
svn_stringbuf_t *content;
const struct svn_test__tree_entry_t *node;
+ apr_pool_t *iterpool = svn_pool_create(pool);
/* Loop through the list of files, checking for matching content. */
for (node = svn_test__greek_tree_nodes; node->path; node++)
{
if (node->contents)
{
- SVN_ERR(svn_fs_file_contents(&rstream, root, node->path, pool));
- SVN_ERR(svn_test__stream_to_string(&rstring, rstream, pool));
- content = svn_stringbuf_create(node->contents, pool);
+ svn_pool_clear(iterpool);
+
+ SVN_ERR(svn_fs_file_contents(&rstream, root, node->path, iterpool));
+ SVN_ERR(svn_test__stream_to_string(&rstring, rstream, iterpool));
+ content = svn_stringbuf_create(node->contents, iterpool);
if (! svn_stringbuf_compare(rstring, content))
return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
"data read != data written in file '%s'.",
node->path);
}
}
+
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
@@ -789,22 +804,28 @@ svn_test__create_greek_tree_at(svn_fs_ro
apr_pool_t *pool)
{
const struct svn_test__tree_entry_t *node;
+ apr_pool_t *iterpool = svn_pool_create(pool);
for (node = svn_test__greek_tree_nodes; node->path; node++)
{
- const char *path = svn_relpath_join(root_dir, node->path, pool);
+ const char *path;
+ svn_pool_clear(iterpool);
+
+ path = svn_relpath_join(root_dir, node->path, iterpool);
if (node->contents)
{
- SVN_ERR(svn_fs_make_file(txn_root, path, pool));
+ SVN_ERR(svn_fs_make_file(txn_root, path, iterpool));
SVN_ERR(svn_test__set_file_contents(txn_root, path, node->contents,
- pool));
+ iterpool));
}
else
{
- SVN_ERR(svn_fs_make_dir(txn_root, path, pool));
+ SVN_ERR(svn_fs_make_dir(txn_root, path, iterpool));
}
}
+
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsx-1.10/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/svn_test_main.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/fsx-1.10/subversion/tests/svn_test_main.c Sun Jun 14 20:58:10 2015
@@ -104,6 +104,7 @@ enum test_options_e {
reposdir_opt,
reposurl_opt,
repostemplate_opt,
+ memcached_server_opt,
mode_filter_opt,
sqlite_log_opt,
parallel_opt,
@@ -144,6 +145,8 @@ static const apr_getopt_option_t cl_opti
N_("the url to access reposdir as")},
{"repos-template",repostemplate_opt, 1,
N_("the repository to use as template")},
+ {"memcached-server", memcached_server_opt, 1,
+ N_("the memcached server to use")},
{"sqlite-logging", sqlite_log_opt, 0,
N_("enable SQLite logging")},
{"parallel", parallel_opt, 0,
@@ -158,29 +161,46 @@ static const apr_getopt_option_t cl_opti
/* When non-zero, don't remove test directories */
static svn_boolean_t skip_cleanup = FALSE;
-/* All cleanup actions are registered as cleanups on this pool. */
-#if !defined(thread_local) && APR_HAS_THREADS
+/* All cleanup actions are registered as cleanups on the cleanup_pool,
+ * which may be thread-specific. */
+#if APR_HAS_THREADS
+/* The thread-local data key for the cleanup pool. */
+static apr_threadkey_t *cleanup_pool_key = NULL;
-# if __STDC_VERSION__ >= 201112 && !defined __STDC_NO_THREADS__
-# define thread_local _Thread_local
-# elif defined(WIN32) && defined(_MSC_VER)
-# define thread_local __declspec(thread)
-# elif defined(__thread)
- /* ### Might work somewhere? */
-# define thread_local __thread
-# else
- /* gcc defines __thread in some versions, but not all.
- ### Who knows how to check for this?
- ### stackoverflow recommends __GNUC__ but that breaks on
- ### openbsd. */
-# endif
-#endif
+/* No-op destructor for apr_threadkey_private_create(). */
+static void null_threadkey_dtor(void *stuff) {}
+
+/* Set the thread-specific cleanup pool. */
+static void set_cleanup_pool(apr_pool_t *pool)
+{
+ apr_status_t status = apr_threadkey_private_set(pool, cleanup_pool_key);
+ if (status)
+ {
+ printf("apr_threadkey_private_set() failed with code %ld.\n",
+ (long)status);
+ exit(1);
+ }
+}
+
+/* Get the thread-specific cleanup pool. */
+static apr_pool_t *get_cleanup_pool(void)
+{
+ void *data;
+ apr_status_t status = apr_threadkey_private_get(&data, cleanup_pool_key);
+ if (status)
+ {
+ printf("apr_threadkey_private_get() failed with code %ld.\n",
+ (long)status);
+ exit(1);
+ }
+ return data;
+}
-#ifdef thread_local
-#define HAVE_PER_THREAD_CLEANUP
-static thread_local apr_pool_t * cleanup_pool = NULL;
+# define cleanup_pool (get_cleanup_pool())
+# define HAVE_PER_THREAD_CLEANUP
#else
static apr_pool_t *cleanup_pool = NULL;
+# define set_cleanup_pool(p) (cleanup_pool = (p))
#endif
/* Used by test_thread to serialize access to stdout. */
@@ -224,7 +244,7 @@ svn_test_add_dir_cleanup(const char *pat
err = svn_mutex__lock(log_mutex);
if (err)
{
- if (verbose_mode)
+ if (verbose_mode)
printf("FAILED svn_mutex__lock in svn_test_add_dir_cleanup.\n");
svn_error_clear(err);
return;
@@ -241,7 +261,7 @@ svn_test_add_dir_cleanup(const char *pat
err = svn_mutex__unlock(log_mutex, NULL);
if (err)
{
- if (verbose_mode)
+ if (verbose_mode)
printf("FAILED svn_mutex__unlock in svn_test_add_dir_cleanup.\n");
svn_error_clear(err);
}
@@ -508,7 +528,7 @@ test_thread(apr_thread_t *thread, void *
= apr_allocator_owner_get(svn_pool_create_allocator(FALSE));
#ifdef HAVE_PER_THREAD_CLEANUP
- cleanup_pool = svn_pool_create(thread_root);
+ set_cleanup_pool(svn_pool_create(thread_root));
#endif
pool = svn_pool_create(thread_root);
@@ -620,7 +640,7 @@ do_tests_concurrently(const char *progna
CHECK_STATUS(result,
"Test thread returned an error.");
}
-
+
return params.got_error != FALSE;
}
@@ -729,13 +749,14 @@ svn_test__init_auth_baton(svn_auth_baton
SVN_CONFIG_OPTION_PASSWORD_STORES,
"windows-cryptoapi");
- SVN_ERR(svn_cmdline_create_auth_baton(ab,
- TRUE /* non_interactive */,
- "jrandom", "rayjandom",
- NULL,
- TRUE /* no_auth_cache */,
- FALSE /* trust_server_cert */,
- cfg_config, NULL, NULL, result_pool));
+ SVN_ERR(svn_cmdline_create_auth_baton2(ab,
+ TRUE /* non_interactive */,
+ "jrandom", "rayjandom",
+ NULL,
+ TRUE /* no_auth_cache */,
+ TRUE /* trust_server_cert_unkown_ca */,
+ FALSE, FALSE, FALSE, FALSE,
+ cfg_config, NULL, NULL, result_pool));
return SVN_NO_ERROR;
}
@@ -780,6 +801,19 @@ svn_test_main(int argc, const char *argv
svn_error_clear(err);
}
+ /* Set up the thread-local storage key for the cleanup pool. */
+#ifdef HAVE_PER_THREAD_CLEANUP
+ apr_err = apr_threadkey_private_create(&cleanup_pool_key,
+ null_threadkey_dtor,
+ pool);
+ if (apr_err)
+ {
+ printf("apr_threadkey_private_create() failed with code %ld.\n",
+ (long)apr_err);
+ exit(1);
+ }
+#endif /* HAVE_PER_THREAD_CLEANUP */
+
/* Remember the command line */
test_argc = argc;
test_argv = argv;
@@ -884,6 +918,10 @@ svn_test_main(int argc, const char *argv
opts.repos_template = svn_dirent_internal_style(opts.repos_template,
pool);
break;
+ case memcached_server_opt:
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.memcached_server, opt_arg,
+ pool));
+ break;
case list_opt:
list_mode = TRUE;
break;
@@ -954,7 +992,7 @@ svn_test_main(int argc, const char *argv
}
/* Create an iteration pool for the tests */
- cleanup_pool = svn_pool_create(pool);
+ set_cleanup_pool(svn_pool_create(pool));
test_pool = svn_pool_create(pool);
if (!allow_segfaults)
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh Sun Jun 14 20:58:10 2015
@@ -25,7 +25,7 @@ set -x
# upload file to server
FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz
tar -czf $FILENAME tests.log
-ftp -n www.mobsol.be < ../ftpscript
+ftp -n www.mobsol.be < ../ftpscript
rm $FILENAME
echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/eh-debsarge1/$FILENAME"
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh Sun Jun 14 20:58:10 2015
@@ -30,10 +30,10 @@ export LD_PRELOAD_64
if [ $SVN_VER_MINOR -eq 9 ]; then
echo "============ make svnserveautocheck"
- make svnserveautocheck CLEANUP=1 PARALLEL=30 THREADED=1
+ make svnserveautocheck CLEANUP=1 PARALLEL=30 THREADED=1 || exit $?
else
echo "============ make check"
- make check CLEANUP=1 PARALLEL=30 THREADED=1
+ make check CLEANUP=1 PARALLEL=30 THREADED=1 || exit $?
fi
exit 0
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnbuild.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnbuild.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnbuild.sh Sun Jun 14 20:58:10 2015
@@ -33,7 +33,7 @@ if [ $SVN_VER_MINOR -ge 9 ]; then
APR=/home/bt/packages/apr-1.3.9-prefix/bin/apr-1-config
APU=/home/bt/packages/apr-1.3.9-prefix/bin/apu-1-config
APXS=/home/bt/packages/apr-1.3.9-prefix/bin/apxs
- SERF=/home/bt/packages/apr-1.3.9-prefix
+ SERF=/home/bt/packages/apr-1.3.9-prefix
else
APR=/usr
APU=/usr
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnlog.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnlog.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnlog.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-centos/svnlog.sh Sun Jun 14 20:58:10 2015
@@ -25,7 +25,7 @@ set -x
# upload file to server
FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz
tar -czf $FILENAME tests.log
-ftp -n www.mobsol.be < ../ftpscript
+ftp -n www.mobsol.be < ../ftpscript
rm $FILENAME
echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/eh-debsarge1/$FILENAME"
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh Sun Jun 14 20:58:10 2015
@@ -23,7 +23,7 @@
# upload file to server
FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz
tar -czf $FILENAME tests.log
-ftp -n www.mobsol.be < ../ftpscript
+ftp -n www.mobsol.be < ../ftpscript
rm $FILENAME
echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/osx10.4-gcc4.0.1-ia32/$FILENAME"
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh Sun Jun 14 20:58:10 2015
@@ -23,7 +23,7 @@
# upload file to server
FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz
tar -czf $FILENAME tests.log
-ftp -n www.mobsol.be < ../ftpscript
+ftp -n www.mobsol.be < ../ftpscript
rm $FILENAME
echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/osx10.4-gcc4.0.1-ia32/$FILENAME"
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh Sun Jun 14 20:58:10 2015
@@ -24,15 +24,40 @@ if [ -z "$1" ]; then
exit 1
fi
+if [ -z "$2" ]; then
+ echo "Missing parameter: RAMdisk config file"
+ exit 1
+fi
+
volume="/Volumes/$1"
+ramconf="$2"
-mount | fgrep "on ${volume} " >/dev/null || {
+ramconfpath=$(dirname "${ramconf}")
+if [ ! -d "${ramconfpath}" ]; then
+ echo "Missing RAMdisk config file path: ${ramconfpath}"
+ exit 1
+fi
+if [ -f "${ramconf}" ]; then
+ echo "RAMdisk config file exists: ${ramconf}"
+ exit 1
+fi
+
+if [ -d "${volume}" ]; then
+ echo "Mount point exists: ${volume}"
+ exit 1
+fi
+
+mount | grep "^/dev/disk[0-9][0-9]* on ${volume} (hfs" >/dev/null || {
set -e
+ echo -n "" > "${ramconf}"
+
# Make sure we strip trailing spaces from the result of older
# versions of hduitil.
- device=$(echo $(hdiutil attach -nomount ram://900000))
+ device=$(echo $(hdiutil attach -nomount ram://1000000))
newfs_hfs -M 0700 -v "$1" "${device}"
hdiutil mountvol "${device}"
+
+ echo -n "${device}" > "${ramconf}"
}
exit 0
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/rmramdisk.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/rmramdisk.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/rmramdisk.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/rmramdisk.sh Sun Jun 14 20:58:10 2015
@@ -24,11 +24,39 @@ if [ -z "$1" ]; then
exit 1
fi
+if [ -z "$2" ]; then
+ echo "Missing parameter: RAMdisk config file"
+ exit 1
+fi
+
volume="/Volumes/$1"
+ramconf="$2"
+
+if [ ! -f "${ramconf}" ]; then
+ mount | grep "^/dev/disk[0-9][0-9]* on ${volume} (hfs" || {
+ echo "Not mounted: ${volume}"
+ exit 0
+ }
+ echo "Missing RAMdisk config file: ${ramconf}"
+ exit 1
+fi
+
+if [ ! -d "${volume}" ]; then
+ echo "Mount point missing: ${volume}"
+ exit 1
+fi
+
+device=$(cat "${ramconf}")
+devfmt=$(echo "${device}" | grep "^/dev/disk[0-9][0-9]*$")
+if [ "${device}" != "${devfmt}" ]; then
+ echo "Invalid device name: ${device}"
+ exit 1
+fi
-mount | fgrep "on ${volume} " >/dev/null && {
+mount | grep "^${device} on ${volume} (hfs" >/dev/null && {
set -e
- hdiutil detach "${volume}" -force
+ rm "${ramconf}"
+ hdiutil detach "${device}" -force
}
exit 0
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/setenv.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/setenv.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/setenv.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/setenv.sh Sun Jun 14 20:58:10 2015
@@ -50,12 +50,14 @@ export SVNBB_APR_15
export SVNBB_APR_20_DEV
export SVNBB_JUNIT
export SVNBB_PARALLEL
-export LIBTOOL_CONFIG
# Set the absolute source path
abssrc=$(pwd)
+# Set the path to the RAMdisk device name file
+ramconf=$(dirname "${abssrc}")/ramdisk.conf
+
# The RAMdisk volume name is the same as the name of the builder
volume_name=$(basename $(dirname "${abssrc}"))
if [ -z "${volume_name}" ]; then
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh Sun Jun 14 20:58:10 2015
@@ -24,7 +24,7 @@ scripts=$(cd $(dirname "$0") && pwd)
. ${scripts}/setenv.sh
-${scripts}/mkramdisk.sh ${volume_name}
+${scripts}/mkramdisk.sh ${volume_name} ${ramconf}
# These are the default APR and Serf config options
serfconfig="--with-serf=${SVNBB_SERF} --with-apxs=/usr/sbin/apxs"
@@ -80,7 +80,7 @@ cd ${absbld}
env CC=clang CXX=clang++ \
${abssrc}/configure \
--prefix="${absbld}/.install-prefix" \
- --disable-debug${optimizeconfig} \
+ --enable-debug${optimizeconfig} \
--disable-nls \
--disable-mod-activation \
${aprconfig}${serfconfig} \
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh Sun Jun 14 20:58:10 2015
@@ -20,10 +20,11 @@
run_tests() {
check="$1"
+ cleanup="$2"
echo "============ make check-${check}"
cd ${absbld}
- make check-${check} || exit 1
+ make check-${check} ${cleanup} || exit 1
}
@@ -53,6 +54,6 @@ done
${check_swig_py} && run_tests swig-py
${check_swig_pl} && run_tests swig-pl
${check_swig_rb} && run_tests swig-rb
-${check_javahl} && run_tests javahl
+${check_javahl} && run_tests javahl JAVAHL_CLEANUP=1
exit 0
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnclean.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnclean.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnclean.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/svn-x64-macosx/svnclean.sh Sun Jun 14 20:58:10 2015
@@ -24,4 +24,4 @@ scripts=$(cd $(dirname "$0") && pwd)
. ${scripts}/setenv.sh
-${scripts}/rmramdisk.sh ${volume_name}
+${scripts}/rmramdisk.sh ${volume_name} ${ramconf}
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/ubuntu-x64/svnlog.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/ubuntu-x64/svnlog.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/ubuntu-x64/svnlog.sh (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/ubuntu-x64/svnlog.sh Sun Jun 14 20:58:10 2015
@@ -25,7 +25,7 @@ set -x
# upload file to server
FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz
tar -czf $FILENAME tests.log
-ftp -n www.mobsol.be < ../ftpscript
+ftp -n www.mobsol.be < ../ftpscript
rm $FILENAME
echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/eh-debsarge1/$FILENAME"
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd Sun Jun 14 20:58:10 2015
@@ -80,29 +80,6 @@ if "%SVN_BRANCH%" GTR "1.9." (
echo Done.
)
-) ELSE IF "%SVN_BRANCH%" GTR "1.8." (
-
- mkdir "%TESTDIR%\swig\pl-debug\SVN"
- mkdir "%TESTDIR%\swig\pl-debug\auto\SVN"
- xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-debug\SVN" > nul:
- pushd debug\subversion\bindings\swig\perl\native
- for %%i in (*.dll) do (
- set name=%%i
- mkdir "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!"
- xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
- xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
- )
- popd
-
-
- SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-debug;
- pushd subversion\bindings\swig\perl\native
- perl -MExtUtils::Command::MM -e "test_harness()" t\*.t
- IF ERRORLEVEL 1 (
- echo [Test runner reported error !ERRORLEVEL!]
- REM SET result=1
- )
- popd
)
if "%SVN_BRANCH%" GTR "1.9." (
Modified: subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd (original)
+++ subversion/branches/fsx-1.10/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd Sun Jun 14 20:58:10 2015
@@ -31,7 +31,7 @@ IF "%SVN_BRANCH%" LEQ "1.6.x" (
SET DEBUG_TARGETS=/t:__ALL_TESTS__
SET RELEASE_TARGETS=/t:__SWIG_PYTHON__
-if "%SVN_BRANCH%" GTR "1.8." (
+if "%SVN_BRANCH%" GTR "1.9." (
SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_PERL__
)
Modified: subversion/branches/fsx-1.10/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/client-side/bash_completion?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/client-side/bash_completion (original)
+++ subversion/branches/fsx-1.10/tools/client-side/bash_completion Sun Jun 14 20:58:10 2015
@@ -167,7 +167,7 @@ _svn()
cmds="$cmds info list ls lock log merge mergeinfo mkdir move mv rename"
cmds="$cmds patch propdel pdel propedit pedit propget pget proplist"
cmds="$cmds plist propset pset relocate resolve resolved revert status"
- cmds="$cmds switch unlock update upgrade youngest"
+ cmds="$cmds switch unlock update upgrade"
# help options have a strange command status...
local helpOpts='--help -h'
@@ -781,7 +781,8 @@ _svn()
# otherwise build possible options for the command
pOpts="--username --password --no-auth-cache --non-interactive \
- --trust-server-cert --force-interactive"
+ --trust-server-cert-failures \
+ --force-interactive"
mOpts="-m --message -F --file --encoding --force-log --with-revprop"
rOpts="-r --revision"
qOpts="-q --quiet"
@@ -827,7 +828,7 @@ _svn()
;;
copy|cp)
cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents \
- --ignore-externals"
+ --ignore-externals --pin-externals"
;;
delete|del|remove|rm)
cmdOpts="--force $mOpts $qOpts --targets --editor-cmd $pOpts \
@@ -854,7 +855,8 @@ _svn()
;;
info)
cmdOpts="$pOpts $rOpts --targets -R --recursive --depth \
- --include-externals --incremental --xml $cOpts"
+ --include-externals --incremental --xml \
+ --show-item --no-newline $cOpts"
;;
list|ls)
cmdOpts="$rOpts -v --verbose -R --recursive $pOpts \
@@ -869,12 +871,12 @@ _svn()
--incremental --xml $qOpts -l --limit -c --change \
$gOpts --with-all-revprops --with-revprop --depth \
--diff --diff-cmd -x --extensions --internal-diff \
- --with-no-revprops --search --search-and --auto-moves"
+ --with-no-revprops --search --search-and"
;;
merge)
cmdOpts="$rOpts $nOpts $qOpts --force --dry-run --diff3-cmd \
$pOpts --ignore-ancestry -c --change -x --extensions \
- --record-only --accept --reintegrate \
+ --record-only --accept \
--allow-mixed-revisions -v --verbose"
;;
mergeinfo)
@@ -903,7 +905,7 @@ _svn()
cmdOpts="$cmdOpts --revprop $rOpts"
;;
propget|pget|pg)
- cmdOpts="-v --verbose -R --recursive $rOpts --strict \
+ cmdOpts="-v --verbose -R --recursive $rOpts --no-newline \
$pOpts $cOpts --depth --xml --show-inherited-props"
[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
;;
@@ -935,7 +937,7 @@ _svn()
status|stat|st)
cmdOpts="-u --show-updates -v --verbose $nOpts $qOpts $pOpts \
--no-ignore --ignore-externals --incremental --xml \
- $cOpts"
+ $rOpts $cOpts"
;;
switch|sw)
cmdOpts="--relocate $rOpts $nOpts $qOpts $pOpts --diff3-cmd \
@@ -953,9 +955,6 @@ _svn()
upgrade)
cmdOpts="$qOpts $pOpts"
;;
- youngest)
- cmdOpts="$pOpts --no-newline"
- ;;
*)
;;
esac
Modified: subversion/branches/fsx-1.10/tools/client-side/bash_completion_test
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/client-side/bash_completion_test?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/client-side/bash_completion_test (original)
+++ subversion/branches/fsx-1.10/tools/client-side/bash_completion_test Sun Jun 14 20:58:10 2015
@@ -114,14 +114,18 @@ get_svn_subcommands() {
# Usage: get_svn_options SUBCMD
get_svn_options() {
{ svn help "$1" |
+ # Remove deprecated options
+ grep -v deprecated |
# Find the relevant lines; remove "arg" and description.
sed -n -e '1,/^Valid options:$/d;/^ -/!d' \
-e 's/\( ARG\)* * : .*//;p' |
# Remove brackets; put each word on its own line.
tr -d '] ' | tr '[' '\n'
# The following options are always accepted but not listed in the help
- echo "-h"
- echo "--help"
+ if [ "$1" != "help" ] ; then
+ echo "-h"
+ echo "--help"
+ fi
} | sort
}
Modified: subversion/branches/fsx-1.10/tools/client-side/svn-ssl-fingerprints.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/client-side/svn-ssl-fingerprints.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/client-side/svn-ssl-fingerprints.sh (original)
+++ subversion/branches/fsx-1.10/tools/client-side/svn-ssl-fingerprints.sh Sun Jun 14 20:58:10 2015
@@ -20,7 +20,7 @@
#
#
# $0 --- list the fingerprints of SSL certificates that svn has seen before.
-#
+#
# SYNOPSIS:
# $0
# $0 /path/to/.subversion
Modified: subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/copy_repo.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/copy_repo.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/copy_repo.py (original)
+++ subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/copy_repo.py Sun Jun 14 20:58:10 2015
@@ -137,7 +137,7 @@ class Repository:
@classmethod
def is_repository(cls, path):
""" Quick check that PATH is (probably) a repository.
- This is mainly to filter out aux files put next to
+ This is mainly to filter out aux files put next to
(not inside) the repositories to copy. """
format_path = os.path.join(path, 'db', 'format')
Modified: subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/win_repo_bench.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/win_repo_bench.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/win_repo_bench.py (original)
+++ subversion/branches/fsx-1.10/tools/dev/benchmarks/RepoPerf/win_repo_bench.py Sun Jun 14 20:58:10 2015
@@ -115,7 +115,7 @@ def run_cs_command(state, config, reposi
# Display the operation
repo_title = repository.replace('nonpacked', 'nopack')
- print state, "\t", repo_title, "\t", prefix, "\t", config, "\t",
+ print state, "\t", repo_title, "\t", prefix, "\t", config, "\t",
sys.stdout.flush()
# Execute the command and show the execution times
@@ -146,18 +146,18 @@ def run_test_cs_sequence(config, reposit
run_cs_command("Cold", config, repository, prefix, args)
stop_server(prefix)
- # OS caches are quite hot now.
+ # OS caches are quite hot now.
# Run operation from hot OS caches but cold SVN caches.
start_server(prefix, config)
run_cs_command("WarmOS", config, repository, prefix, args)
stop_server(prefix)
- # OS caches may be even hotter now.
+ # OS caches may be even hotter now.
# Run operation from hot OS caches but cold SVN caches.
start_server(prefix, config)
run_cs_command("HotOS", config, repository, prefix, args)
- # Keep server process and thus the warmed up SVN caches.
+ # Keep server process and thus the warmed up SVN caches.
# Run operation from hot OS and SVN caches.
run_cs_command("WrmSVN", config, repository, prefix, args)
run_cs_command("HotSVN", config, repository, prefix, args)
@@ -215,7 +215,7 @@ def run_admin_command(state, config, rep
else:
extra = []
- print state, "\t", repository, "\t", config, "\t",
+ print state, "\t", repository, "\t", config, "\t",
sys.stdout.flush()
subprocess.call(["TimeWin.exe", exe] + args + extra)
Modified: subversion/branches/fsx-1.10/tools/dev/benchmarks/large_dirs/create_bigdir.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/benchmarks/large_dirs/create_bigdir.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/benchmarks/large_dirs/create_bigdir.sh (original)
+++ subversion/branches/fsx-1.10/tools/dev/benchmarks/large_dirs/create_bigdir.sh Sun Jun 14 20:58:10 2015
@@ -29,7 +29,7 @@ SVNPATH="$('pwd')/subversion"
# Comment the SVNSERVE line to use file:// instead of svn://.
SVN=${SVNPATH}/svn/svn
-SVNADMIN=${SVNPATH}/svnadmin/svnadmin
+SVNADMIN=${SVNPATH}/svnadmin/svnadmin
SVNSERVE=${SVNPATH}/svnserve/svnserve
# VALGRIND="valgrind --tool=callgrind"
@@ -45,7 +45,7 @@ REPOROOT=/dev/shm
FILECOUNT=1
MAXCOUNT=20000
-# only 1.7 supports server-side caching and uncompressed data transfer
+# only 1.7 supports server-side caching and uncompressed data transfer
SERVEROPTS="-c 0 -M 400"
@@ -162,7 +162,7 @@ run_svn_get() {
fi
}
-# main loop
+# main loop
while [ $FILECOUNT -lt $MAXCOUNT ]; do
echo "Processing $FILECOUNT files in the same folder"
@@ -172,7 +172,7 @@ while [ $FILECOUNT -lt $MAXCOUNT ]; do
mkdir $WC/$FILECOUNT
for i in 1 $sequence; do
echo "File number $i" > $WC/$FILECOUNT/$i
- done
+ done
printf "\tAdding files ... \t"
run_svn add $FILECOUNT -q
@@ -182,7 +182,7 @@ while [ $FILECOUNT -lt $MAXCOUNT ]; do
printf "\tCommit files ... \t"
run_svn_ci $FILECOUNT add
-
+
printf "\tListing files ... \t"
run_svn ls $FILECOUNT
Modified: subversion/branches/fsx-1.10/tools/dev/build-svn-deps-win.pl
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/build-svn-deps-win.pl?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/build-svn-deps-win.pl (original)
+++ subversion/branches/fsx-1.10/tools/dev/build-svn-deps-win.pl Sun Jun 14 20:58:10 2015
@@ -17,7 +17,7 @@
# under the License.
# ====================================================================
#
-# Script to build all the dependencies for Subversion on Windows
+# Script to build all the dependencies for Subversion on Windows
# It's been written for Windows 8 and Visual Studio 2012, but
# it's entirely possible it will work with older versions of both.
@@ -27,7 +27,7 @@
# Subversion and quickly get up a development environment.
# Prerequisites:
-# Perl: http://www.activestate.com/activeperl/downloads
+# Perl: http://www.activestate.com/activeperl/downloads
# Python: http://www.activestate.com/activepython/downloads
# 7-Zip: http://www.7-zip.org/download.html
# CMake: http://www.cmake.org/cmake/resources/software.html
@@ -42,7 +42,7 @@
# available.
#
# TODO:
-# Find some way to work around the lack of devenv in Express (msbuild will help some)
+# Find some way to work around the lack of devenv in Express (msbuild will help some)
# Include a package target that zips everything up.
# Perl script that runs the Subversion get-make.py tool with the right args.
# Alternatively update gen-make.py with an arg that knows about our layout.
@@ -54,7 +54,7 @@
# Allow selection of Arch (x86 and x64)
# ZLib support for OpenSSL (have to patch openssl)
# Use CMake zlib build instead.
-# Assembler support for OpenSSL.
+# Assembler support for OpenSSL.
# Add more specific commands to the command line (e.g. build-httpd)
###################################
@@ -208,10 +208,10 @@ my $PERL = $Config{perlpath};
# Directory constants that we setup for convenience, but that
# shouldn't be changed since they are assumed in the build systems
-# of the various dependencies.
+# of the various dependencies.
my $HTTPD; # Where httpd gets built
my $BDB; # Where bdb gets built
-my $BINDIR; # where binaries are installed
+my $BINDIR; # where binaries are installed
my $LIBDIR; # where libraries are installed
my $INCDIR; # where headers are installed
my $SRCLIB; # httpd's srclib dir
@@ -274,7 +274,7 @@ sub system_or_die {
}
# Like perl -pi.orig the second arg is a reference to a
-# function that does whatever line processing you want.
+# function that does whatever line processing you want.
# Note that $_ is used for the input and output of the
# function. So modifying $_ changes the line in the file.
# bak can be passed to set the backup extension. If the
@@ -345,7 +345,7 @@ sub prepare_structure {
sub clean_structure {
# ignore errors in this function the paths may not exist
my $real_clean = shift;
-
+
if ($real_clean) {
rmtree($SRCDIR);
}
@@ -478,7 +478,7 @@ sub extract_dependencies {
extract_file($API_FILE, $SRCLIB,
"$SRCLIB\\apr-iconv-$API_VER", "$SRCLIB\\apr-iconv");
# We fix the line endings before putting the non-Apache deps in place since it
- # touches everything under httpd and there's no point in doing other things.
+ # touches everything under httpd and there's no point in doing other things.
httpd_fix_lineends();
extract_file($ZLIB_FILE, $SRCLIB,
"$SRCLIB\\zlib-$ZLIB_VER", "$SRCLIB\\zlib");
@@ -507,7 +507,7 @@ sub build_pcre {
my $pcre_options = '-DPCRE_NO_RECURSE:BOOL=ON';
my $pcre_shared_libs = '-DBUILD_SHARED_LIBS:BOOL=ON';
my $pcre_install_prefix = "-DCMAKE_INSTALL_PREFIX:PATH=$INSTDIR";
- my $cmake_cmd = qq("$CMAKE" -G "$pcre_generator" "$pcre_build_type" "$pcre_shared_libs" "$pcre_install_prefix" "$pcre_options" .);
+ my $cmake_cmd = qq("$CMAKE" -G "$pcre_generator" "$pcre_build_type" "$pcre_shared_libs" "$pcre_install_prefix" "$pcre_options" .);
system_or_die("Failure generating pcre Makefiles", $cmake_cmd);
system_or_die("Failure building pcre", qq("$NMAKE"));
system_or_die("Failure testing pcre", qq("$NMAKE" test));
@@ -521,7 +521,7 @@ sub build_zlib {
chdir_or_die("$SRCLIB\\zlib");
$ENV{CC_OPTS} = $DEBUG ? '/MDd /Gm /ZI /Od /GZ /D_DEBUG' : '/MD /02 /Zi';
$ENV{COMMON_CC_OPTS} = '/nologo /W3 /DWIN32 /D_WINDOWS';
-
+
system_or_die("Failure building zilb", qq("$NMAKE" /nologo -f win32\\Makefile.msc STATICLIB=zlibstat.lib all));
delete $ENV{CC_OPTS};
@@ -533,14 +533,14 @@ sub build_zlib {
sub build_openssl {
chdir_or_die("$SRCLIB\\openssl");
- # We're building openssl without an assembler. If someone wants to
+ # We're building openssl without an assembler. If someone wants to
# use this for production they should probably download NASM and
# remove the no-asm below and use ms\do_nasm.bat instead.
-
+
# TODO: Enable openssl to use zlib. openssl needs some patching to do
# this since it wants to look for zlib as zlib1.dll and as the httpd
# build instructions note you probably don't want to dynamic link zlib.
-
+
# TODO: OpenSSL requires perl on the path since it uses perl without a full
# path in the batch file and the makefiles. Probably should determine
# if PERL is on the path and add it here if not.
@@ -599,7 +599,7 @@ sub httpd_fix_lineends {
chdir_or_die($TOPDIR);
}
-# The httpd makefile in 2.4.4 doesn't know about .vcxproj files and
+# The httpd makefile in 2.4.4 doesn't know about .vcxproj files and
# still thinks it's got an older version of Visual Studio because
# .vcproj files have become .vcxproj.
sub httpd_fix_makefile {
@@ -607,8 +607,8 @@ sub httpd_fix_makefile {
modify_file_in_place($file, sub {
s/\.vcproj/.vcxproj/i;
- # below fixes that installd breaks when trying to install pcre because
- # dll is named pcred.dll when a Debug build.
+ # below fixes that installd breaks when trying to install pcre because
+ # dll is named pcred.dll when a Debug build.
s/^(\s*copy srclib\\pcre\\pcre\.\$\(src_dll\)\s+"\$\(inst_dll\)"\s+<\s*\.y\s*)$/!IF EXISTS("srclib\\pcre\\pcre\.\$(src_dll)")\n$1!ENDIF\n!IF EXISTS("srclib\\pcre\\pcred\.\$(src_dll)")\n\tcopy srclib\\pcre\\pcred.\$(src_dll)\t\t\t"\$(inst_dll)" <.y\n!ENDIF\n/;
});
}
@@ -797,8 +797,8 @@ sub build_httpd {
sub build_bdb {
chdir_or_die($BDB);
- print(cwd(),$/);
- my $sln = 'build_windows\Berkeley_DB_vs2010.sln';
+ print(cwd(),$/);
+ my $sln = 'build_windows\Berkeley_DB_vs2010.sln';
upgrade_solution($sln);
my $platform = $DEBUG ? 'Debug|Win32' : 'Release|Win32';
@@ -834,7 +834,7 @@ sub build_serf {
s/^(INTDIR = Debug)$/$1\nOPENSSL_OUT_SUFFIX = .dbg/;
s/(\$\(OPENSSL_SRC\)\\out32(?:dll)?)/$1\$(OPENSSL_OUT_SUFFIX)/g;
}, '.debug');
-
+
chdir_or_die($TOPDIR);
}
Modified: subversion/branches/fsx-1.10/tools/dev/fsfs-access-map.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/fsfs-access-map.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/fsfs-access-map.c (original)
+++ subversion/branches/fsx-1.10/tools/dev/fsfs-access-map.c Sun Jun 14 20:58:10 2015
@@ -60,7 +60,7 @@ typedef struct file_stats_t
/* number of read() calls that returned 0 bytes */
apr_int64_t empty_reads;
-
+
/* total number of bytes returned by those reads */
apr_int64_t read_size;
@@ -198,9 +198,9 @@ open_file(const char *name, int handle)
/* determine first revision of rev / packed rev files */
if (strstr(name, "/db/revs/") != NULL && strstr(name, "manifest") == NULL)
if (strstr(name, ".pack/pack") != NULL)
- file->rev_num = atoi(strstr(name, "/db/revs/") + 9);
+ file->rev_num = SVN_STR_TO_REV(strstr(name, "/db/revs/") + 9);
else
- file->rev_num = atoi(strrchr(name, '/') + 1);
+ file->rev_num = SVN_STR_TO_REV(strrchr(name, '/') + 1);
else
file->rev_num = -1;
@@ -314,7 +314,7 @@ parse_line(svn_stringbuf_t *line)
else
while(*func_start == ' ')
func_start++;
-
+
first_param_end = strchr(func_end, ',');
if (first_param_end == NULL)
first_param_end = strchr(func_end, ')');
@@ -558,13 +558,13 @@ scale_line(color_t* out,
int in_len)
{
double scaling_factor = (double)(in_len) / (double)(out_len);
-
+
apr_size_t i;
memset(out, 0, out_len * sizeof(color_t));
for (i = 0; i < out_len; ++i)
{
color_t color = { 0 };
-
+
double source_start = i * scaling_factor;
double source_end = (i + 1) * scaling_factor;
@@ -626,7 +626,7 @@ write_bitmap(apr_array_header_t *info,
/**/
line = apr_pcalloc(pool, xsize * sizeof(color_t));
scaled_line = apr_pcalloc(pool, row_size);
-
+
/* write header to file */
write_bitmap_header(file, max_x, ysize);
Modified: subversion/branches/fsx-1.10/tools/dev/po-merge.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/po-merge.py?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/po-merge.py (original)
+++ subversion/branches/fsx-1.10/tools/dev/po-merge.py Sun Jun 14 20:58:10 2015
@@ -188,7 +188,7 @@ def main(argv):
# We're done. Tell the user what we did.
print(('%d strings updated. '
- '%d fuzzy strings. '
+ '%d fuzzy strings. '
'%d of %d strings are still untranslated (%.0f%%).' %
(update_count, fuzzy, untranslated, string_count,
100.0 * untranslated / string_count)))
Modified: subversion/branches/fsx-1.10/tools/dev/remove-trailing-whitespace.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/remove-trailing-whitespace.sh?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/remove-trailing-whitespace.sh (original)
+++ subversion/branches/fsx-1.10/tools/dev/remove-trailing-whitespace.sh Sun Jun 14 20:58:10 2015
@@ -17,8 +17,8 @@
# specific language governing permissions and limitations
# under the License.
- for ext in c h cpp java py pl rb hpp cmd bat; do
- find . -name "*.$ext" -exec \
+ for ext in c h cpp java py pl rb hpp cmd bat sql sh; do
+ find . -name "*.$ext" -not -type l -exec \
perl -pi -e 's/[ \t]*$//' {} + ;
# don't use \s to not strip ^L pagebreaks
- done
+ done
Modified: subversion/branches/fsx-1.10/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/unix-build/Makefile.svn?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/fsx-1.10/tools/dev/unix-build/Makefile.svn Sun Jun 14 20:58:10 2015
@@ -1470,13 +1470,12 @@ $(MOD_DONTDOTHAT_CONF):
echo >>$@.tmp '/ = deny'
mv -f $@.tmp $@
-$(HTTPD_CHECK_USERS):
+$(HTTPD_CHECK_CONF): $(MOD_DONTDOTHAT_CONF)
mkdir -p $(dir $@)
- echo > $@.tmp 'jrandom:xCGl35kV9oWCY'
- echo >>$@.tmp 'jconstant:xCGl35kV9oWCY'
- mv -f $@.tmp $@
-
-$(HTTPD_CHECK_CONF): $(HTTPD_CHECK_USERS) $(MOD_DONTDOTHAT_CONF)
+ $(PREFIX)/httpd/bin/htpasswd -bc $(HTTPD_CHECK_USERS).tmp jrandom rayjandom
+ $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp jconstant rayjandom
+ $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp __dumpster__ __loadster__
+ mv -f $(HTTPD_CHECK_USERS).tmp $(HTTPD_CHECK_USERS)
echo > $@.tmp '# httpd config for make check'
echo >>$@.tmp 'ServerRoot "$(PREFIX)/httpd"'
echo >>$@.tmp 'Listen localhost:$(HTTPD_CHECK_PORT)'
Propchange: subversion/branches/fsx-1.10/tools/dev/wc-ng/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jun 14 20:58:10 2015
@@ -0,0 +1 @@
+svn-wc-db-tester
Modified: subversion/branches/fsx-1.10/tools/dev/x509-parser.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dev/x509-parser.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dev/x509-parser.c (original)
+++ subversion/branches/fsx-1.10/tools/dev/x509-parser.c Sun Jun 14 20:58:10 2015
@@ -84,7 +84,7 @@ is_der_cert(const svn_string_t *raw)
{
/* really simplistic fingerprinting of a DER. By definition it must
* start with an ASN.1 tag of a constructed (0x20) sequence (0x10).
- * It's somewhat unfortunate that 0x30 happens to also come out to the
+ * It's somewhat unfortunate that 0x30 happens to also come out to the
* ASCII for '0' which may mean this will create false positives. */
return raw->data[0] == 0x30 ? TRUE : FALSE;
}
Modified: subversion/branches/fsx-1.10/tools/diff/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/diff/diff.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/diff/diff.c (original)
+++ subversion/branches/fsx-1.10/tools/diff/diff.c Sun Jun 14 20:58:10 2015
@@ -117,7 +117,7 @@ int main(int argc, const char *argv[])
APR_ARRAY_PUSH(options_array, const char *) = argv[i];
- /* Special case: '-U' takes an argument, so capture the
+ /* Special case: '-U' takes an argument, so capture the
* next argument in the array. */
if (argv[i][1] == 'U' && !argv[i][2])
{
Modified: subversion/branches/fsx-1.10/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/tools/dist/backport.pl?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/tools/dist/backport.pl (original)
+++ subversion/branches/fsx-1.10/tools/dist/backport.pl Sun Jun 14 20:58:10 2015
@@ -3,6 +3,19 @@ use warnings;
use strict;
use feature qw/switch say/;
+use v5.10.0; # needed for $^V
+
+# The given/when smartmatch facility, introduced in Perl v5.10, was made
+# experimental and "subject to change" in v5.18 (see perl5180delta). Every
+# use of it now triggers a warning.
+#
+# As of Perl v5.20.1, the semantics of given/when provided by Perl are
+# compatible with those expected by the script, so disable the warning for
+# those Perls. But don't try to disable the the warning category on Perls
+# that don't know that category, since that breaks compilation.
+no if (v5.17.0 le $^V and $^V le v5.20.1),
+ warnings => 'experimental::smartmatch';
+
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -26,6 +39,8 @@ use Term::ReadKey qw/ReadMode ReadKey/;
use File::Basename qw/basename dirname/;
use File::Copy qw/copy move/;
use File::Temp qw/tempfile/;
+use IO::Select ();
+use IPC::Open3 qw/open3/;
use POSIX qw/ctermid strftime isprint isspace/;
use Text::Wrap qw/wrap/;
use Tie::File ();
@@ -63,7 +78,7 @@ my @sh = qw/false true/;
die if grep { ($sh[$_] eq 'true') != !!$_ } $DEBUG, $MAY_COMMIT, $VERBOSE, $YES;
# Username for entering votes.
-my $SVN_A_O_REALM = '<https://svn.apache.org:443> ASF Committers';
+my $SVN_A_O_REALM = '<https://svn.apache.org:443> ASF Committers';
my ($AVAILID) = $ENV{AVAILID} // do {
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
@@ -97,6 +112,7 @@ unless (defined $AVAILID) {
my $STATUS = './STATUS';
my $STATEFILE = './.backports1';
my $BRANCHES = '^/subversion/branches';
+my $TRUNK = '^/subversion/trunk';
$ENV{LC_ALL} = "C"; # since we parse 'svn info' output and use isprint()
# Globals.
@@ -119,6 +135,39 @@ $SVNq = "$SVN -q ";
$SVNq =~ s/-q// if $DEBUG;
+my $BACKPORT_OPTIONS_HELP = <<EOF;
+y: Run a merge. It will not be committed.
+ WARNING: This will run 'update' and 'revert -R ./'.
+l: Show logs for the entries being nominated.
+v: Show the full entry (the prompt only shows an abridged version).
+q: Quit the "for each entry" loop. If you have entered any votes or
+ approvals, you will be prompted to commit them.
+±1: Enter a +1 or -1 vote
+ You will be prompted to commit your vote at the end.
+±0: Enter a +0 or -0 vote
+ You will be prompted to commit your vote at the end.
+a: Move the entry to the "Approved changes" section.
+ When both approving and voting on an entry, approve first: for example,
+ to enter a third +1 vote, type "a" "+" "1".
+e: Edit the entry in \$EDITOR, which is '$EDITOR'.
+ You will be prompted to commit your edits at the end.
+N: Move to the next entry. Do not prompt for the current entry again, even
+ in future runs, unless the STATUS nomination has been modified (e.g.,
+ revisions added, justification changed) in the repository.
+ (This is a local action that will not affect other people or bots.)
+ : Move to the next entry. Prompt for the current entry again in the next
+ run of backport.pl.
+ (That's a space character, ASCII 0x20.)
+?: Display this list.
+EOF
+
+my $BACKPORT_OPTIONS_MERGE_OPTIONS_HELP = <<EOF;
+y: Open a shell.
+d: View a diff.
+N: Move to the next entry.
+?: Display this list.
+EOF
+
sub backport_usage {
my $basename = basename $0;
print <<EOF;
@@ -148,42 +197,42 @@ sense of "match" is either substring (fg
In interactive mode (the default), you will be prompted once per STATUS entry.
At a prompt, you have the following options:
-y: Run a merge. It will not be committed.
- WARNING: This will run 'update' and 'revert -R ./'.
-l: Show logs for the entries being nominated.
-v: Show the full entry (the prompt only shows an abridged version).
-q: Quit the "for each nomination" loop.
-±1: Enter a +1 or -1 vote
- You will be prompted to commit your vote at the end.
-±0: Enter a +0 or -0 vote
- You will be prompted to commit your vote at the end.
-a: Move the entry to the "Approved changes" section.
- When both approving and voting on an entry, approve first: for example,
- to enter a third +1 vote, type "a" "+" "1".
-e: Edit the entry in $EDITOR.
- You will be prompted to commit your edits at the end.
-N: Move to the next entry. Cache the entry in '$STATEFILE' and do not
- prompt for it again (even across runs) until it is changed.
- : Move to the next entry, without adding the current one to the cache.
- (That's a space character, ASCII 0x20.)
+$BACKPORT_OPTIONS_HELP
After running a merge, you have the following options:
-y: Open a shell.
-d: View a diff.
-N: Move to the next entry.
+$BACKPORT_OPTIONS_MERGE_OPTIONS_HELP
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
-and commit each entry therein. If only \$YES is defined, the script will
-merge every nomination (including unapproved and vetoed ones), and complain
-to stderr if it notices any conflicts.
+There are two batch modes. The first mode is used by the nightly svn-role
+mergebot. It is enabled by setting \$YES and \$MAY_COMMIT to '1' in the
+environment. In this mode, the script will iterate the "Approved changes:"
+section and merge and commit each entry therein. To prevent an entry from
+being auto-merged, veto it or move it to a new section named "Approved, but
+merge manually:".
+
+The second batch mode is used by the hourly conflicts detector bot. It is
+triggered by having \$YES defined in the environment to '1' and \$MAY_COMMIT
+undefined. In this mode, the script will locally merge every nomination
+(including unapproved and vetoed ones), and complain to stderr if the merge
+failed due to a conflict. This mode never commits anything.
+
+The hourly conflicts detector bot turns red if any entry produced a merge
+conflict. When entry A depends on entry B for a clean merge, put a "Depends:"
+header on entry A to instruct the bot not to turn red due to A. (The header
+is not parsed; only its presence or absence matters.)
+
+Both batch modes also perform a basic sanity-check on entries that declare
+backport branches (via the "Branch:" header): if a backport branch is used, but
+at least one of the revisions enumerated in the entry title had neither been
+merged from $TRUNK to the branch root, nor been committed
+directly to the backport branch, the hourly bot will turn red and
+nightly bot will skip the entry and email its admins. (The nightly bot does
+not email the list on failure, since it doesn't use buildbot.)
The 'svn' binary defined by the environment variable \$SVN, or otherwise the
'svn' found in \$PATH, will be used to manage the working copy.
@@ -286,9 +335,9 @@ sub shell_escape {
sub shell_safe_path_or_url($) {
local $_ = shift;
- return m{^[A-Za-z0-9._:+/-]+$} and !/^-|^[+]/;
+ return (m{^[A-Za-z0-9._:+/-]+$} and !/^-|^[+]/);
}
-
+
# Shell-safety-validating wrapper for File::Temp::tempfile
sub my_tempfile {
my ($fh, $fn) = tempfile();
@@ -297,9 +346,46 @@ sub my_tempfile {
return ($fh, $fn);
}
+# The first argument is a shell script. Run it and return the shell's
+# exit code, and stdout and stderr as references to arrays of lines.
+sub run_in_shell($) {
+ my $script = shift;
+ my $pid = open3 \*SHELL_IN, \*SHELL_OUT, \*SHELL_ERR, qw#/bin/sh#;
+ # open3 raises exception when it fails; no need to error check
+
+ print SHELL_IN $script;
+ close SHELL_IN;
+
+ # Read loop: tee stdout,stderr to arrays.
+ my $select = IO::Select->new(\*SHELL_OUT, \*SHELL_ERR);
+ my (@readable, $outlines, $errlines);
+ while (@readable = $select->can_read) {
+ for my $fh (@readable) {
+ my $line = <$fh>;
+ $select->remove($fh) if eof $fh or not defined $line;
+ next unless defined $line;
+
+ if ($fh == \*SHELL_OUT) {
+ push @$outlines, $line;
+ print STDOUT $line;
+ }
+ if ($fh == \*SHELL_ERR) {
+ push @$errlines, $line;
+ print STDERR $line;
+ }
+ }
+ }
+ waitpid $pid, 0; # sets $?
+ return $?, $outlines, $errlines;
+}
+
+# EXPECTED_ERROR_P is subref called with EXIT_CODE, OUTLINES, ERRLINES,
+# expected to return TRUE if the error should be considered fatal (cause
+# backport.pl to exit non-zero) or not. It may be undef for default behaviour.
sub merge {
- my %entry = @_;
+ my %entry = %{ +shift };
+ my $expected_error_p = shift // sub { 0 }; # by default, errors are unexpected
my $parno = $entry{parno} - scalar grep { $_->{parno} < $entry{parno} } @MERGES_TODAY;
my ($logmsg_fh, $logmsg_filename) = my_tempfile();
@@ -345,7 +431,7 @@ fi
$SVNq up
$SVNq merge @mergeargs
if [ "`$SVN status -q | wc -l`" -eq 1 ]; then
- if [ -n "`$SVN diff | perl -lne 'print if s/^(Added|Deleted|Modified): //' | grep -vx svn:mergeinfo`" ]; then
+ if [ -z "`$SVN diff | perl -lne 'print if s/^(Added|Deleted|Modified): //' | grep -vx svn:mergeinfo`" ]; then
# This check detects STATUS entries that name non-^/subversion/ revnums.
# ### Q: What if we actually commit a mergeinfo fix to trunk and then want
# ### to backport it?
@@ -413,15 +499,26 @@ EOF
revert(verbose => 0, discard_STATUS => $MAY_COMMIT);
$MERGED_SOMETHING++;
- open SHELL, '|-', qw#/bin/sh# or die "$! (in '$entry{header}')";
- print SHELL $script;
- close SHELL or do {
- warn "$0: sh($?): $! (in '$entry{header}')";
- die "Lost track of paragraph numbers; aborting" if $MAY_COMMIT
- };
- $ERRORS{$entry{id}} = [\%entry, "sh($?): $!"] if $?;
+ my ($exit_code, $outlines, $errlines) = run_in_shell $script;
+ unless ($! == 0) {
+ die "system() failed to spawn subshell ($!); aborting";
+ }
+ unless ($exit_code == 0) {
+ warn "$0: subshell exited with code $exit_code (in '$entry{header}') "
+ ."(maybe due to 'set -e'?)";
+
+ # If we're committing, don't attempt to guess the problem and gracefully
+ # continue; just abort.
+ if ($MAY_COMMIT) {
+ die "Lost track of paragraph numbers; aborting";
+ }
+
+ # Record the error, unless the caller wants not to.
+ $ERRORS{$entry{id}} = [\%entry, "subshell exited with code $exit_code"]
+ unless $expected_error_p->($exit_code, $outlines, $errlines);
+ }
- unlink $logmsg_filename unless $? or $!;
+ unlink $logmsg_filename unless $exit_code;
}
# Input formats:
@@ -481,7 +578,7 @@ sub parse_entry {
# summary
do {
push @logsummary, shift
- } until $_[0] =~ /^\s*[][\w]+:/ or not defined $_[0];
+ } until $_[0] =~ /^\s*[A-Z][][\w]*:/ or not defined $_[0];
# votes
unshift @votes, pop until $_[-1] =~ /^\s*Votes:/ or not defined $_[-1];
@@ -502,8 +599,8 @@ sub parse_entry {
$notes .= shift while @_ and $_[0] !~ /^\w/;
my %accepts = map { $_ => 1 } ($notes =~ /--accept[ =]([a-z-]+)/g);
given (scalar keys %accepts) {
- when (0) { }
- when (1) { $accept = [keys %accepts]->[0]; }
+ when (0) { }
+ when (1) { $accept = [keys %accepts]->[0]; }
default {
warn "Too many --accept values at '",
logsummarysummary({ logsummary => [@logsummary] }),
@@ -625,7 +722,7 @@ sub vote {
(exists $approved->{$key}) ? ($raw_approved .= $_) : (print VOTES);
next;
}
-
+
s/^(\s*\Q$vote\E:.*)/"$1, $AVAILID"/me
or s/(.*\w.*?\n)/"$1 $vote: $AVAILID\n"/se;
$_ = edit_string $_, $entry->{header}, trailing_eol => 2
@@ -648,7 +745,7 @@ sub vote {
grep { !$approvedcheck{$_} } keys %$approved
if scalar(keys %$approved) != scalar(keys %approvedcheck);
prompt "Press the 'any' key to continue...\n", dontprint => 1
- if scalar(keys %$approved) != scalar(keys %approvedcheck)
+ if scalar(keys %$approved) != scalar(keys %approvedcheck)
or scalar(keys %$votes) != scalar(keys %votescheck);
move "$STATUS.$$.tmp", $STATUS;
@@ -668,7 +765,7 @@ sub vote {
"Approve $_->{entry}->{header}."
} @votesarray;
(@sentences == 1)
- ? $sentences[0]
+ ? "* STATUS: $sentences[0]"
: "* STATUS:\n" . join "", map " $_\n", @sentences;
};
@@ -810,6 +907,38 @@ sub exit_stage_left {
exit scalar keys %ERRORS;
}
+# Given an ENTRY, check whether all ENTRY->{revisions} have been merged
+# into ENTRY->{branch}, if it has one. If revisions are missing, record
+# a warning in $ERRORS. Return TRUE If the entry passed the validation
+# and FALSE otherwise.
+sub validate_branch_contains_named_revisions {
+ my %entry = @_;
+ return 1 unless defined $entry{branch};
+ my %present;
+
+ return "Why are you running so old versions?" # true in boolean context
+ if $SVNvsn < 1_005_000; # doesn't have the 'mergeinfo' subcommand
+
+ my $shell_escaped_branch = shell_escape($entry{branch});
+ %present = do {
+ my @present = `$SVN mergeinfo --show-revs=merged -- $TRUNK $BRANCHES/$shell_escaped_branch &&
+ $SVN mergeinfo --show-revs=eligible -- $BRANCHES/$shell_escaped_branch`;
+ chomp @present;
+ @present = map /(\d+)/g, @present;
+ map +($_ => 1), @present;
+ };
+
+ my @absent = grep { not exists $present{$_} } @{$entry{revisions}};
+
+ if (@absent) {
+ $ERRORS{$entry{id}} //= [\%entry,
+ sprintf("Revisions '%s' nominated but not included in branch",
+ (join ", ", map { "r$_" } @absent)),
+ ];
+ }
+ return @absent ? 0 : 1;
+}
+
sub handle_entry {
my $in_approved = shift;
my $approved = shift;
@@ -829,10 +958,23 @@ sub handle_entry {
unless (@vetoes) {
if ($MAY_COMMIT and $in_approved) {
# svn-role mode
- merge %entry;
+ merge \%entry if validate_branch_contains_named_revisions %entry;
} elsif (!$MAY_COMMIT) {
# Scan-for-conflicts mode
- merge %entry;
+
+ # First, sanity-check the entry. We ignore the result; even if it
+ # failed, we do want to check for conflicts, in the remainder of this
+ # block.
+ validate_branch_contains_named_revisions %entry;
+
+ # E155015 is SVN_ERR_WC_FOUND_CONFLICT
+ my $expected_error_p = sub {
+ my ($exit_code, $outlines, $errlines) = @_;
+ ($exit_code == 0)
+ or
+ (grep /svn: E155015:/, @$errlines)
+ };
+ merge \%entry, ($entry{depends} ? $expected_error_p : undef);
my $output = `$SVN status`;
@@ -889,12 +1031,13 @@ sub handle_entry {
# See above for why the while(1).
QUESTION: while (1) {
my $key = $entry{digest};
- given (prompt 'Run a merge? [y,l,v,±1,±0,q,e,a, ,N] ',
+ given (prompt 'Run a merge? [y,l,v,±1,±0,q,e,a, ,N,?] ',
verbose => 1, extra => qr/[+-]/) {
when (/^y/i) {
- merge %entry;
- while (1) {
- given (prompt "Shall I open a subshell? [ydN] ", verbose => 1) {
+ # TODO: validate_branch_contains_named_revisions %entry;
+ merge \%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).
@@ -906,6 +1049,10 @@ sub handle_entry {
or warn "diff failed ($?): $!";
next;
}
+ when (/^[?]/i) {
+ print $BACKPORT_OPTIONS_MERGE_OPTIONS_HELP;
+ next;
+ }
when (/^N/i) {
# fall through.
}
@@ -969,6 +1116,10 @@ sub handle_entry {
when (/^\x20/) {
last PROMPT; # Fall off the end of the given/when block.
}
+ when (/^[?]/i) {
+ print $BACKPORT_OPTIONS_HELP;
+ next QUESTION;
+ }
default {
say "Please use one of the options in brackets (q to quit)!";
next QUESTION;
@@ -1091,7 +1242,7 @@ sub nominate_main {
# Construct entry.
my $logmsg = `$SVN propget --revprop -r $revnums[0] --strict svn:log '^/'`;
die "Can't fetch log message of r$revnums[0]: $!" unless $logmsg;
-
+
unless ($logmsg =~ s/^(.*?)\n\n.*/$1/s) {
# "* file\n (symbol): Log message."
@@ -1104,7 +1255,7 @@ sub nominate_main {
}
my @lines;
- warn "Wrapping [$logmsg]\n";
+ warn "Wrapping [$logmsg]\n" if $DEBUG;
push @lines, wrap " * ", ' 'x3, join ', ', map "r$_", @revnums;
push @lines, wrap ' 'x3, ' 'x3, split /\n/, $logmsg;
push @lines, " Justification:";
@@ -1136,7 +1287,7 @@ sub nominate_main {
# Done!
system "$SVN diff -- $STATUS";
if (prompt "Commit this nomination? ") {
- system "$SVN commit -m 'Nominate r$revnums[0].' -- $STATUS";
+ system "$SVN commit -m '* STATUS: Nominate r$revnums[0].' -- $STATUS";
exit $?;
}
elsif (!$had_local_mods or prompt "Revert STATUS (destroying local mods)? ") {