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 2014/06/19 13:32:15 UTC
svn commit: r1603833 - in /subversion/branches/svn-auth-x509: ./
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_subr/
subversion/tests/ subversion/tests/cmdline/ subvers...
Author: stsp
Date: Thu Jun 19 11:32:14 2014
New Revision: 1603833
URL: http://svn.apache.org/r1603833
Log:
On the svn-auth-x509 branch, merge outstanding changes from trunk.
Modified:
subversion/branches/svn-auth-x509/ (props changed)
subversion/branches/svn-auth-x509/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
subversion/branches/svn-auth-x509/subversion/libsvn_client/commit.c
subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/util.c
subversion/branches/svn-auth-x509/subversion/libsvn_subr/win32_crashrpt.c
subversion/branches/svn-auth-x509/subversion/tests/cmdline/lock_tests.py
subversion/branches/svn-auth-x509/subversion/tests/libsvn_repos/repos-test.c
subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/checksum-test.c
subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/config-test.c
subversion/branches/svn-auth-x509/subversion/tests/svn_test.h
subversion/branches/svn-auth-x509/subversion/tests/svn_test_main.c
subversion/branches/svn-auth-x509/tools/dev/unix-build/Makefile.svn
Propchange: subversion/branches/svn-auth-x509/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1603509-1603832
Modified: subversion/branches/svn-auth-x509/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original)
+++ subversion/branches/svn-auth-x509/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Thu Jun 19 11:32:14 2014
@@ -651,7 +651,15 @@ public class ClientNotifyInformation ext
/** The operation failed because the operation (E.g. commit)
* is only valid if the operation includes this path.
* @since New in 1.9. */
- failed_requires_target ("failed requires target");
+ failed_requires_target ("failed requires target"),
+
+ /** Running info on an external module.
+ * @since New in 1.9. */
+ info_external ("info external"),
+
+ /** Finalizing commit.
+ * @since New in 1.9. */
+ commit_finalizing ("commit finalizing");
/**
* The description of the action.
Modified: subversion/branches/svn-auth-x509/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_client/commit.c?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_client/commit.c Thu Jun 19 11:32:14 2014
@@ -249,10 +249,38 @@ post_process_commit_item(svn_wc_committe
if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
remove_lock = TRUE;
- return svn_wc_queue_committed3(queue, wc_ctx, item->path,
- loop_recurse, item->incoming_prop_changes,
+ return svn_error_trace(
+ svn_wc_queue_committed3(queue, wc_ctx, item->path,
+ loop_recurse,
+ item->incoming_prop_changes,
remove_lock, !keep_changelists,
- sha1_checksum, scratch_pool);
+ sha1_checksum, scratch_pool));
+}
+
+/* Do similar handling as post_process_commit_item() but for items that
+ * are commit items, but aren't actual changes. Most importantly
+ * remove lock tokens. */
+static svn_error_t *
+post_process_no_commit_item(const svn_client_commit_item3_t *item,
+ svn_wc_context_t *wc_ctx,
+ svn_boolean_t keep_changelists,
+ svn_boolean_t keep_locks,
+ apr_pool_t *scratch_pool)
+{
+ if ((item->state_flags & SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN)
+ && !keep_locks)
+ {
+ SVN_ERR(svn_wc_remove_lock2(wc_ctx, item->path, scratch_pool));
+ }
+
+ if (!keep_changelists)
+ SVN_ERR(svn_wc_set_changelist2(wc_ctx, item->path, NULL,
+ svn_depth_empty, NULL,
+ NULL, NULL,
+ NULL, NULL,
+ scratch_pool));
+
+ return SVN_NO_ERROR;
}
/* Given a list of committables described by their common base abspath
@@ -915,6 +943,11 @@ svn_client_commit6(const apr_array_heade
svn_client_commit_item3_t *item
= APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+ if (! (item->state_flags & ~ SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN))
+ {
+ continue; /* Nothing to post process via the queue */
+ }
+
svn_pool_clear(iterpool);
bump_err = post_process_commit_item(
queue, item, ctx->wc_ctx,
@@ -933,6 +966,26 @@ svn_client_commit6(const apr_array_heade
commit_info->author,
ctx->cancel_func, ctx->cancel_baton,
iterpool);
+
+ if (bump_err)
+ goto cleanup;
+
+ for (i = 0; i < commit_items->nelts; i++)
+ {
+ svn_client_commit_item3_t *item
+ = APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+
+ if (item->state_flags & ~ SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN)
+ continue; /* Already processed via the queue */
+
+ svn_pool_clear(iterpool);
+ bump_err = post_process_no_commit_item(
+ item, ctx->wc_ctx,
+ keep_changelists, keep_locks,
+ iterpool);
+ if (bump_err)
+ goto cleanup;
+ }
}
cleanup:
Modified: subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/util.c?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/util.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_fs_fs/util.c Thu Jun 19 11:32:14 2014
@@ -449,6 +449,7 @@ svn_fs_fs__read_current(svn_revnum_t *re
{
fs_fs_data_t *ffd = fs->fsap_data;
svn_stringbuf_t *content;
+ const char *str;
SVN_ERR(svn_fs_fs__read_content(&content,
svn_fs_fs__path_current(fs, pool),
@@ -456,15 +457,16 @@ svn_fs_fs__read_current(svn_revnum_t *re
if (ffd->format >= SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
{
- SVN_ERR(svn_revnum_parse(rev, content->data, NULL));
+ SVN_ERR(svn_revnum_parse(rev, content->data, &str));
+ if (*str != '\n')
+ return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+ _("Corrupt 'current' file"));
*next_node_id = 0;
*next_copy_id = 0;
}
else
{
- const char *str;
-
SVN_ERR(svn_revnum_parse(rev, content->data, &str));
if (*str != ' ')
return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -475,7 +477,10 @@ svn_fs_fs__read_current(svn_revnum_t *re
return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
_("Corrupt 'current' file"));
- *next_copy_id = svn__base36toui64(NULL, str + 1);
+ *next_copy_id = svn__base36toui64(&str, str + 1);
+ if (*str != '\n')
+ return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+ _("Corrupt 'current' file"));
}
return SVN_NO_ERROR;
Modified: subversion/branches/svn-auth-x509/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/libsvn_subr/win32_crashrpt.c?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/branches/svn-auth-x509/subversion/libsvn_subr/win32_crashrpt.c Thu Jun 19 11:32:14 2014
@@ -60,12 +60,13 @@ HANDLE dbghelp_dll = INVALID_HANDLE_VALU
/*** Code. ***/
-/* Convert a wide-character string to utf-8. This function will create a buffer
- * large enough to hold the result string, the caller should free this buffer.
+/* Convert a wide-character string to the current windows locale, suitable
+ * for directly using stdio. This function will create a buffer large
+ * enough to hold the result string, the caller should free this buffer.
* If the string can't be converted, NULL is returned.
*/
static char *
-convert_wbcs_to_utf8(const wchar_t *str)
+convert_wbcs_to_ansi(const wchar_t *str)
{
size_t len = wcslen(str);
char *utf8_str = malloc(sizeof(wchar_t) * len + 1);
@@ -169,7 +170,7 @@ write_module_info_callback(void *data,
FILE *log_file = (FILE *)data;
MINIDUMP_MODULE_CALLBACK module = callback_input->Module;
- char *buf = convert_wbcs_to_utf8(module.FullPath);
+ char *buf = convert_wbcs_to_ansi(module.FullPath);
fprintf(log_file, FORMAT_PTR, module.BaseOfImage);
fprintf(log_file, " %s", buf);
free(buf);
@@ -335,7 +336,7 @@ format_value(char *value_str, DWORD64 mo
if (SymGetTypeInfo_(proc, mod_base, type, TI_GET_SYMNAME,
&type_name_wbcs))
{
- char *type_name = convert_wbcs_to_utf8(type_name_wbcs);
+ char *type_name = convert_wbcs_to_ansi(type_name_wbcs);
LocalFree(type_name_wbcs);
if (ptr == 0)
Modified: subversion/branches/svn-auth-x509/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/cmdline/lock_tests.py?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/svn-auth-x509/subversion/tests/cmdline/lock_tests.py Thu Jun 19 11:32:14 2014
@@ -165,14 +165,20 @@ def commit_file_unlock(sbox):
# make a change and commit it, allowing lock to be released
sbox.simple_append('A/mu', 'Tweak!\n')
- sbox.simple_commit()
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/mu' : Item(verb='Sending'),
+ })
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/mu', wc_rev=2)
- expected_status.tweak('iota', wc_rev=2)
- # Make sure the file is unlocked
- svntest.actions.run_and_verify_status(wc_dir, expected_status)
+ # Make sure both iota an mu are unlocked, but only mu is bumped
+ svntest.actions.run_and_verify_commit(wc_dir,
+ expected_output,
+ expected_status,
+ None,
+ wc_dir)
#----------------------------------------------------------------------
def commit_propchange(sbox):
@@ -2305,7 +2311,6 @@ def delete_locked_file_with_percent(sbox
# Invalid percent encoded URI in tagged If-header [400, #104]
sbox.simple_commit()
-@XFail()
def lock_commit_bump(sbox):
"a commit should not bump just locked files"
@@ -2330,12 +2335,21 @@ def lock_commit_bump(sbox):
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.tweak('A/mu', wc_rev=3)
-
+
svntest.actions.run_and_verify_commit(wc_dir,
expected_output,
expected_status,
None, wc_dir)
+ # We explicitly check both the Revision and Last Changed Revision.
+ expected_infos = [ {
+ 'Revision' : '1' ,
+ 'Last Changed Rev' : '1' ,
+ 'URL' : '.*',
+ 'Lock Token' : None, }
+ ]
+ svntest.actions.run_and_verify_info(expected_infos,
+ sbox.ospath('iota'))
########################################################################
Modified: subversion/branches/svn-auth-x509/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/libsvn_repos/repos-test.c?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/svn-auth-x509/subversion/tests/libsvn_repos/repos-test.c Thu Jun 19 11:32:14 2014
@@ -3331,6 +3331,7 @@ test_config_pool(const svn_test_opts_t *
svn_fs_root_t *root, *rev_root;
svn_revnum_t rev;
const char *repo_root_url;
+ const char *srcdir;
svn_error_t *err;
svn_repos__config_pool_t *config_pool;
@@ -3348,9 +3349,10 @@ test_config_pool(const svn_test_opts_t *
config_pool_pool));
/* have two different configurations */
+ SVN_ERR(svn_test_get_srcdir(&srcdir, opts, pool));
SVN_ERR(svn_stringbuf_from_file2(
&cfg_buffer1,
- svn_dirent_join(opts->srcdir,
+ svn_dirent_join(srcdir,
"../libsvn_subr/config-test.cfg",
pool),
pool));
Modified: subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/checksum-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/checksum-test.c?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/checksum-test.c (original)
+++ subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/checksum-test.c Thu Jun 19 11:32:14 2014
@@ -208,12 +208,14 @@ zlib_expansion_test(const svn_test_opts_
apr_pool_t *pool)
{
const char *data_path;
+ const char *srcdir;
svn_stringbuf_t *deflated;
Byte dst_buffer[256 * 1024];
Byte *src_buffer;
uInt sz;
- data_path = svn_dirent_join(opts->srcdir, "zlib.deflated", pool);
+ SVN_ERR(svn_test_get_srcdir(&srcdir, opts, pool));
+ data_path = svn_dirent_join(srcdir, "zlib.deflated", pool);
SVN_ERR(svn_stringbuf_from_file2(&deflated, data_path, pool));
src_buffer = (Byte*)deflated->data;
Modified: subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/config-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/config-test.c?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/config-test.c (original)
+++ subversion/branches/svn-auth-x509/subversion/tests/libsvn_subr/config-test.c Thu Jun 19 11:32:14 2014
@@ -55,6 +55,18 @@ fail(apr_pool_t *pool, const char *fmt,
return svn_error_create(SVN_ERR_TEST_FAILED, SVN_NO_ERROR, msg);
}
+static svn_error_t *
+get_config_file_path(const char **cfg_file,
+ const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ const char *srcdir;
+
+ SVN_ERR(svn_test_get_srcdir(&srcdir, opts, pool));
+ *cfg_file = svn_dirent_join(srcdir, "config-test.cfg", pool);
+
+ return SVN_NO_ERROR;
+}
static const char *config_keys[] = { "foo", "a", "b", "c", "d", "e", "f", "g",
"h", "i", NULL };
@@ -72,7 +84,7 @@ test_text_retrieval(const svn_test_opts_
int i;
const char *cfg_file;
- cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
/* Test values retrieved from our ConfigParser instance against
@@ -121,7 +133,7 @@ test_boolean_retrieval(const svn_test_op
int i;
const char *cfg_file;
- cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
for (i = 0; true_keys[i] != NULL; i++)
@@ -179,7 +191,7 @@ test_has_section_case_insensitive(const
svn_config_t *cfg;
const char *cfg_file;
- cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
if (! svn_config_has_section(cfg, "section1"))
@@ -207,7 +219,7 @@ test_has_section_case_sensitive(const sv
svn_config_t *cfg;
const char *cfg_file;
- cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, FALSE, pool));
if (! svn_config_has_section(cfg, "section1"))
@@ -248,7 +260,7 @@ test_has_option_case_sensitive(const svn
};
static const int test_data_size = sizeof(test_data)/sizeof(*test_data);
- cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, TRUE, pool));
for (i = 0; i < test_data_size; ++i)
@@ -276,7 +288,7 @@ test_stream_interface(const svn_test_opt
const char *cfg_file;
svn_stream_t *stream;
- cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
SVN_ERR(svn_stream_open_readonly(&stream, cfg_file, pool, pool));
SVN_ERR(svn_config_parse(&cfg, stream, TRUE, TRUE, pool));
@@ -314,7 +326,7 @@ test_read_only_mode(const svn_test_opts_
svn_config_t *cfg2;
const char *cfg_file;
- cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, FALSE, pool));
/* setting CFG to r/o mode shall toggle the r/o mode and expand values */
Modified: subversion/branches/svn-auth-x509/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/svn_test.h?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/svn_test.h (original)
+++ subversion/branches/svn-auth-x509/subversion/tests/svn_test.h Thu Jun 19 11:32:14 2014
@@ -244,6 +244,14 @@ const char *
svn_test_data_path(const char* basename, apr_pool_t *result_pool);
+/* Some tests require the --srcdir option and should use this function
+ * to get it. If not provided, print a warning and attempt to run the
+ * tests under the assumption that --srcdir is the current directory. */
+svn_error_t *
+svn_test_get_srcdir(const char **srcdir,
+ const svn_test_opts_t *opts,
+ apr_pool_t *pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/svn-auth-x509/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/subversion/tests/svn_test_main.c?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/svn-auth-x509/subversion/tests/svn_test_main.c Thu Jun 19 11:32:14 2014
@@ -131,7 +131,7 @@ static const apr_getopt_option_t cl_opti
{"allow-segfaults", allow_segfault_opt, 0,
N_("don't trap seg faults (useful for debugging)")},
{"srcdir", srcdir_opt, 1,
- N_("source directory")},
+ N_("directory which contains test's C source files")},
{"sqlite-logging", sqlite_log_opt, 0,
N_("enable SQLite logging")},
{"parallel", parallel_opt, 0,
@@ -664,6 +664,26 @@ svn_test_data_path(const char *base_name
return svn_dirent_join(data_path, base_name, result_pool);
}
+svn_error_t *
+svn_test_get_srcdir(const char **srcdir,
+ const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ const char *cwd;
+
+ if (opts->srcdir)
+ {
+ *srcdir = opts->srcdir;
+ return SVN_NO_ERROR;
+ }
+
+ fprintf(stderr, "WARNING: missing '--srcdir' option");
+ SVN_ERR(svn_dirent_get_absolute(&cwd, ".", pool));
+ fprintf(stderr, ", assuming '%s'\n", cwd);
+ *srcdir = cwd;
+
+ return SVN_NO_ERROR;
+}
/* Standard svn test program */
int
Modified: subversion/branches/svn-auth-x509/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/svn-auth-x509/tools/dev/unix-build/Makefile.svn?rev=1603833&r1=1603832&r2=1603833&view=diff
==============================================================================
--- subversion/branches/svn-auth-x509/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/svn-auth-x509/tools/dev/unix-build/Makefile.svn Thu Jun 19 11:32:14 2014
@@ -117,7 +117,7 @@ DISTFILES = $(DISTDIR)/$(NEON_DIST) \
FETCH_CMD = wget -c
SUBVERSION_REPOS_URL = https://svn.apache.org/repos/asf/subversion
-BDB_URL = http://ftp2.de.freebsd.org/pub/FreeBSD/distfiles/bdb/$(BDB_DIST)
+BDB_URL = http://download.oracle.com/berkeley-db/$(BDB_DIST)
APR_URL = http://svn.apache.org/repos/asf/apr/apr
APR_PATCHES_URL = http://www.apache.org/dist/apr/patches
APR_ICONV_URL = http://www.apache.org/dist/apr/$(APR_ICONV_DIST)