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/01/28 10:22:52 UTC
svn commit: r1655247 - in /subversion/branches/pin-externals: ./ build/
subversion/include/ subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_fs_base/ subversion/libsvn_repos/ subversion/libsvn_subr/
subversion/libsvn_wc/ subversi...
Author: stsp
Date: Wed Jan 28 09:22:51 2015
New Revision: 1655247
URL: http://svn.apache.org/r1655247
Log:
On the pin-externals branch, merge outstanding changes from trunk.
Modified:
subversion/branches/pin-externals/ (props changed)
subversion/branches/pin-externals/build/run_tests.py
subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h
subversion/branches/pin-externals/subversion/include/svn_version.h
subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c
subversion/branches/pin-externals/subversion/libsvn_client/mergeinfo.c
subversion/branches/pin-externals/subversion/libsvn_fs_base/dag.c
subversion/branches/pin-externals/subversion/libsvn_repos/dump.c
subversion/branches/pin-externals/subversion/libsvn_subr/stream.c
subversion/branches/pin-externals/subversion/libsvn_subr/sysinfo.c
subversion/branches/pin-externals/subversion/libsvn_wc/conflicts.c
subversion/branches/pin-externals/subversion/libsvn_wc/merge.c
subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/pin-externals/subversion/svndumpfilter/svndumpfilter.c
subversion/branches/pin-externals/subversion/svnmucc/svnmucc.c
subversion/branches/pin-externals/subversion/svnrdump/dump_editor.c
subversion/branches/pin-externals/subversion/tests/cmdline/svntest/verify.py
subversion/branches/pin-externals/subversion/tests/libsvn_diff/parse-diff-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_subr/auth-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_subr/dirent_uri-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_wc/conflict-data-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_wc/op-depth-test.c
Propchange: subversion/branches/pin-externals/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 28 09:22:51 2015
@@ -85,4 +85,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1643755-1655004
+/subversion/trunk:1643755-1655241
Modified: subversion/branches/pin-externals/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/build/run_tests.py?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/build/run_tests.py (original)
+++ subversion/branches/pin-externals/build/run_tests.py Wed Jan 28 09:22:51 2015
@@ -207,15 +207,12 @@ class TestHarness:
self._open_log('w')
failed = 0
- # Only run the C tests when testing ra_local
+ # If asked to skip C tests, remove non-Python tests from the list
if self.skip_c_tests:
- filtered_list = []
- for cnt, prog in enumerate(list):
+ def is_py_test(prog):
progpath, nums = self._split_nums(prog)
- if not progpath.endswith('.py'):
- continue
- filtered_list.append(prog)
- list = filtered_list
+ return progpath.endswith('.py')
+ list = filter(is_py_test, list)
for cnt, prog in enumerate(list):
failed = self._run_test(prog, cnt, len(list)) or failed
Modified: subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h Wed Jan 28 09:22:51 2015
@@ -363,6 +363,34 @@ svn_repos__dump_revision_record(svn_stre
svn_boolean_t props_section_always,
apr_pool_t *scratch_pool);
+/* Output node headers and props.
+ *
+ * Output HEADERS, content length headers, blank line, and
+ * then PROPS_STR (if non-null) to DUMP_STREAM.
+ *
+ * HEADERS is an array of headers as struct {const char *key, *val;}.
+ * Write them all in the given order.
+ *
+ * PROPS_STR is the property content block, including a terminating
+ * 'PROPS_END\n' line. Iff PROPS_STR is non-null, write a
+ * Prop-content-length header and the prop content block.
+ *
+ * Iff HAS_TEXT is true, write a Text-content length, using the value
+ * TEXT_CONTENT_LENGTH.
+ *
+ * Write a Content-length header, its value being the sum of the
+ * Prop- and Text- content length headers, if props and/or text are present
+ * or if CONTENT_LENGTH_ALWAYS is true.
+ */
+svn_error_t *
+svn_repos__dump_node_record(svn_stream_t *dump_stream,
+ apr_array_header_t *headers,
+ svn_stringbuf_t *props_str,
+ svn_boolean_t has_text,
+ svn_filesize_t text_content_length,
+ svn_boolean_t content_length_always,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/pin-externals/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_version.h?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_version.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_version.h Wed Jan 28 09:22:51 2015
@@ -306,6 +306,11 @@ typedef struct svn_version_extended_t sv
* retrieve (for example, the OS release name, list of shared
* libraries, etc.). Use @a pool for all allocations.
*
+ * @note This function may allocate significant auxiliary resources
+ * (memory and file descriptors) in @a pool. It is recommended to
+ * copy the returned data to suitable longer-lived memory and clear
+ * @a pool after calling this function.
+ *
* @since New in 1.8.
*/
const svn_version_extended_t *
Modified: subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c Wed Jan 28 09:22:51 2015
@@ -2881,7 +2881,7 @@ svn_client_uuid_from_url(const char **uu
/* destroy the RA session */
svn_pool_destroy(subpool);
- return svn_error_trace(err);;
+ return svn_error_trace(err);
}
svn_error_t *
Modified: subversion/branches/pin-externals/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/mergeinfo.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/mergeinfo.c Wed Jan 28 09:22:51 2015
@@ -2130,7 +2130,7 @@ svn_client__mergeinfo_log(svn_boolean_t
svn_rangelist__initialize(youngest_range->end - 1,
youngest_range->end,
youngest_range->inheritable,
- scratch_pool);;
+ scratch_pool);
for (hi = apr_hash_first(scratch_pool, source_history);
hi;
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_base/dag.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_base/dag.c Wed Jan 28 09:22:51 2015
@@ -1028,12 +1028,14 @@ svn_fs_base__dag_delete_if_mutable(svn_f
void *val;
svn_fs_dirent_t *dirent;
+ svn_pool_clear(subpool);
apr_hash_this(hi, NULL, NULL, &val);
dirent = val;
SVN_ERR(svn_fs_base__dag_delete_if_mutable(fs, dirent->id,
txn_id, trail,
subpool));
}
+ svn_pool_destroy(subpool);
}
}
Modified: subversion/branches/pin-externals/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_repos/dump.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_repos/dump.c Wed Jan 28 09:22:51 2015
@@ -563,6 +563,50 @@ svn_repos__dump_revision_record(svn_stre
return SVN_NO_ERROR;
}
+svn_error_t *
+svn_repos__dump_node_record(svn_stream_t *dump_stream,
+ apr_array_header_t *headers,
+ svn_stringbuf_t *props_str,
+ svn_boolean_t has_text,
+ svn_filesize_t text_content_length,
+ svn_boolean_t content_length_always,
+ apr_pool_t *scratch_pool)
+{
+ svn_filesize_t content_length = 0;
+
+ /* add content-length headers */
+ if (props_str)
+ {
+ svn_repos__dumpfile_header_pushf(
+ headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
+ "%" APR_SIZE_T_FMT, props_str->len);
+ content_length += props_str->len;
+ }
+ if (has_text)
+ {
+ svn_repos__dumpfile_header_pushf(
+ headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
+ "%" SVN_FILESIZE_T_FMT, text_content_length);
+ content_length += text_content_length;
+ }
+ if (content_length_always || props_str || has_text)
+ {
+ svn_repos__dumpfile_header_pushf(
+ headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
+ "%" SVN_FILESIZE_T_FMT, content_length);
+ }
+
+ /* write the headers */
+ SVN_ERR(svn_repos__dump_headers(dump_stream, headers, TRUE, scratch_pool));
+
+ /* write the props */
+ if (props_str)
+ {
+ SVN_ERR(svn_stream_write(dump_stream, props_str->data, &props_str->len));
+ }
+ return SVN_NO_ERROR;
+}
+
/*----------------------------------------------------------------------*/
/** An editor which dumps node-data in 'dumpfile format' to a file. **/
@@ -1041,7 +1085,6 @@ dump_node(struct edit_baton *eb,
apr_pool_t *pool)
{
svn_stringbuf_t *propstring;
- svn_filesize_t content_length = 0;
apr_size_t len;
svn_boolean_t must_dump_text = FALSE, must_dump_props = FALSE;
const char *compare_path = path;
@@ -1049,6 +1092,7 @@ dump_node(struct edit_baton *eb,
svn_fs_root_t *compare_root = NULL;
apr_file_t *delta_file = NULL;
apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+ svn_filesize_t textlen;
/* Maybe validate the path. */
if (eb->verify || eb->notify_func)
@@ -1293,7 +1337,6 @@ dump_node(struct edit_baton *eb,
if (must_dump_props)
{
apr_hash_t *prophash, *oldhash = NULL;
- apr_size_t proplen;
svn_stream_t *propstream;
SVN_ERR(svn_fs_node_proplist(&prophash, eb->fs_root, path, pool));
@@ -1361,11 +1404,6 @@ dump_node(struct edit_baton *eb,
SVN_ERR(svn_hash_write_incremental(prophash, oldhash, propstream,
"PROPS-END", pool));
SVN_ERR(svn_stream_close(propstream));
- proplen = propstring->len;
- content_length += proplen;
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
- "%" APR_SIZE_T_FMT, proplen);
}
/* If we are supposed to dump text, write out a text length header
@@ -1374,7 +1412,6 @@ dump_node(struct edit_baton *eb,
{
svn_checksum_t *checksum;
const char *hex_digest;
- svn_filesize_t textlen;
if (eb->use_deltas)
{
@@ -1411,11 +1448,6 @@ dump_node(struct edit_baton *eb,
SVN_ERR(svn_fs_file_length(&textlen, eb->fs_root, path, pool));
}
- content_length += textlen;
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
- "%" SVN_FILESIZE_T_FMT, textlen);
-
SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5,
eb->fs_root, path, FALSE, pool));
hex_digest = svn_checksum_to_cstring(checksum, pool);
@@ -1434,18 +1466,12 @@ dump_node(struct edit_baton *eb,
/* 'Content-length:' is the last header before we dump the content,
and is the sum of the text and prop contents lengths. We write
this only for the benefit of non-Subversion RFC-822 parsers. */
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
- "%" SVN_FILESIZE_T_FMT, content_length);
-
- SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
-
- /* Dump property content if we're supposed to do so. */
- if (must_dump_props)
- {
- len = propstring->len;
- SVN_ERR(svn_stream_write(eb->stream, propstring->data, &len));
- }
+ SVN_ERR(svn_repos__dump_node_record(eb->stream, headers,
+ must_dump_props ? propstring : NULL,
+ must_dump_text,
+ must_dump_text ? textlen : 0,
+ TRUE /*content_length_always*/,
+ pool));
/* Dump text content */
if (must_dump_text && (kind == svn_node_file))
Modified: subversion/branches/pin-externals/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_subr/stream.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_subr/stream.c Wed Jan 28 09:22:51 2015
@@ -2071,7 +2071,7 @@ create_tempfile(HANDLE *hFile,
if (h == INVALID_HANDLE_VALUE)
{
- apr_status_t status = apr_get_os_error();;
+ apr_status_t status = apr_get_os_error();
if (i > 1000)
return svn_error_createf(SVN_ERR_IO_UNIQUE_NAMES_EXHAUSTED,
svn_error_wrap_apr(status, NULL),
Modified: subversion/branches/pin-externals/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_subr/sysinfo.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_subr/sysinfo.c Wed Jan 28 09:22:51 2015
@@ -410,6 +410,63 @@ lsb_release(apr_pool_t *pool)
return NULL;
}
+/* Read /etc/os-release, as documented here:
+ * http://www.freedesktop.org/software/systemd/man/os-release.html
+ */
+static const char *
+systemd_release(apr_pool_t *pool)
+{
+ svn_error_t *err;
+ svn_stream_t *stream;
+
+ /* Open the file. */
+ err = svn_stream_open_readonly(&stream, "/etc/os-release", pool, pool);
+ if (err && APR_STATUS_IS_ENOENT(err->apr_err))
+ {
+ svn_error_clear(err);
+ err = svn_stream_open_readonly(&stream, "/usr/lib/os-release", pool,
+ pool);
+ }
+ if (err)
+ {
+ svn_error_clear(err);
+ return NULL;
+ }
+
+ /* Look for the PRETTY_NAME line. */
+ while (TRUE)
+ {
+ svn_stringbuf_t *line;
+ svn_boolean_t eof;
+
+ err = svn_stream_readline(stream, &line, "\n", &eof, pool);
+ if (err)
+ {
+ svn_error_clear(err);
+ return NULL;
+ }
+
+ if (!strncmp(line->data, "PRETTY_NAME=", 12))
+ {
+ svn_stringbuf_t *release_name;
+
+ /* The value may or may not be enclosed by double quotes. We don't
+ * attempt to strip them. */
+ release_name = svn_stringbuf_create(line->data + 12, pool);
+ svn_error_clear(svn_stream_close(stream));
+ svn_stringbuf_strip_whitespace(release_name);
+ return release_name->data;
+ }
+
+ if (eof)
+ break;
+ }
+
+ /* The file did not contain a PRETTY_NAME line. */
+ svn_error_clear(svn_stream_close(stream));
+ return NULL;
+}
+
/* Read the whole contents of a file. */
static svn_stringbuf_t *
read_file_contents(const char *filename, apr_pool_t *pool)
@@ -527,6 +584,10 @@ linux_release_name(apr_pool_t *pool)
Covers, for example, Debian, Ubuntu and SuSE. */
const char *release_name = lsb_release(pool);
+ /* Try the systemd way (covers Arch). */
+ if (!release_name)
+ release_name = systemd_release(pool);
+
/* Try RHEL/Fedora/CentOS */
if (!release_name)
release_name = redhat_release(pool);
Modified: subversion/branches/pin-externals/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_wc/conflicts.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_wc/conflicts.c Wed Jan 28 09:22:51 2015
@@ -2240,7 +2240,7 @@ svn_wc__read_conflicts(const apr_array_h
{
/* Some callers expect not NULL */
*conflicts = apr_array_make(result_pool, 0,
- sizeof(svn_wc_conflict_description2_t *));;
+ sizeof(svn_wc_conflict_description2_t *));
return SVN_NO_ERROR;
}
Modified: subversion/branches/pin-externals/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_wc/merge.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_wc/merge.c Wed Jan 28 09:22:51 2015
@@ -180,7 +180,7 @@ detranslate_wc_file(const char **detrans
= prop ? (prop->value ? prop->value->data : NULL) : old_mime_value;
old_is_binary = old_mime_value && svn_mime_type_is_binary(old_mime_value);
- new_is_binary = new_mime_value && svn_mime_type_is_binary(new_mime_value);;
+ new_is_binary = new_mime_value && svn_mime_type_is_binary(new_mime_value);
}
/* See what translations we want to do */
Modified: subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c Wed Jan 28 09:22:51 2015
@@ -2230,6 +2230,19 @@ bump_moved_layer(svn_boolean_t *recurse,
always have sufficient depth to bump subtree moves. */
can_bump = TRUE;
+ /* Are we allowed to bump */
+ if (can_bump)
+ {
+ svn_boolean_t locked;
+
+ SVN_ERR(svn_wc__db_wclock_owns_lock_internal(&locked, wcroot,
+ dst_relpath,
+ FALSE, scratch_pool));
+
+ if (!locked)
+ can_bump = FALSE;
+ }
+
if (!can_bump)
{
SVN_ERR(bump_mark_tree_conflict(wcroot, src_relpath,
Modified: subversion/branches/pin-externals/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/svndumpfilter/svndumpfilter.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/pin-externals/subversion/svndumpfilter/svndumpfilter.c Wed Jan 28 09:22:51 2015
@@ -660,66 +660,6 @@ new_node_record(void **node_baton,
}
-/* Output node headers and props.
- *
- * Write HEADERS, content length headers, a blank line, and the properties
- * content section PROPS_STR (if non-null) to DUMP_STREAM.
- *
- * HEADERS is an array of headers as struct {const char *key, *val;}.
- * Write them all in the given order.
- *
- * PROPS_STR is the property content block, including a terminating
- * 'PROPS_END\n' line. Iff PROPS_STR is non-null, write a
- * Prop-content-length header and the prop content block.
- *
- * Iff HAS_TEXT is true, write a Text-content length, using the value
- * TEXT_CONTENT_LENGTH.
- *
- * Always write a Content-length header, its value being the sum of the
- * Prop- and Text- content length headers.
- * ### TODO: Make it optional (only written if props and/or text present).
- */
-static svn_error_t *
-output_node_record(svn_stream_t *dump_stream,
- apr_array_header_t *headers,
- svn_stringbuf_t *props_str,
- svn_boolean_t has_text,
- svn_filesize_t text_content_length,
- apr_pool_t *scratch_pool)
-{
- svn_filesize_t content_length = 0;
-
- /* add content-length headers */
- if (props_str)
- {
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
- "%" APR_SIZE_T_FMT, props_str->len);
- content_length += props_str->len;
- }
- if (has_text)
- {
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
- "%" SVN_FILESIZE_T_FMT, text_content_length);
- content_length += text_content_length;
- }
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
- "%" SVN_FILESIZE_T_FMT, content_length);
-
- /* write the headers */
- SVN_ERR(svn_repos__dump_headers(dump_stream, headers, TRUE, scratch_pool));
-
- /* write the props */
- if (props_str)
- {
- SVN_ERR(svn_stream_write(dump_stream, props_str->data, &props_str->len));
- }
- return SVN_NO_ERROR;
-}
-
-
/* Examine the mergeinfo in INITIAL_VAL, omitting missing merge
sources or renumbering revisions in rangelists as appropriate, and
return the (possibly new) mergeinfo in *FINAL_VAL (allocated from
@@ -924,12 +864,13 @@ set_fulltext(svn_stream_t **stream, void
{
svn_stringbuf_appendcstr(nb->props, "PROPS-END\n");
}
- SVN_ERR(output_node_record(nb->rb->pb->out_stream,
- nb->headers,
- nb->has_props ? nb->props : NULL,
- nb->has_text,
- nb->tcl,
- nb->node_pool));
+ SVN_ERR(svn_repos__dump_node_record(nb->rb->pb->out_stream,
+ nb->headers,
+ nb->has_props ? nb->props : NULL,
+ nb->has_text,
+ nb->tcl,
+ TRUE /*content_length_always*/,
+ nb->node_pool));
}
*stream = nb->rb->pb->out_stream;
}
@@ -957,12 +898,13 @@ close_node(void *node_baton)
{
svn_stringbuf_appendcstr(nb->props, "PROPS-END\n");
}
- SVN_ERR(output_node_record(nb->rb->pb->out_stream,
- nb->headers,
- nb->has_props ? nb->props : NULL,
- nb->has_text,
- nb->tcl,
- nb->node_pool));
+ SVN_ERR(svn_repos__dump_node_record(nb->rb->pb->out_stream,
+ nb->headers,
+ nb->has_props ? nb->props : NULL,
+ nb->has_text,
+ nb->tcl,
+ TRUE /*content_length_always*/,
+ nb->node_pool));
}
/* put an end to node. */
Modified: subversion/branches/pin-externals/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/svnmucc/svnmucc.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/pin-externals/subversion/svnmucc/svnmucc.c Wed Jan 28 09:22:51 2015
@@ -222,7 +222,7 @@ execute(const apr_array_header_t *action
mtcc, iterpool);
svn_pool_destroy(iterpool);
- return svn_error_trace(err);;
+ return svn_error_trace(err);
}
static svn_error_t *
Modified: subversion/branches/pin-externals/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/svnrdump/dump_editor.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/pin-externals/subversion/svnrdump/dump_editor.c Wed Jan 28 09:22:51 2015
@@ -57,6 +57,9 @@ struct dir_baton
const char *copyfrom_path; /* a relpath */
svn_revnum_t copyfrom_rev;
+ /* Headers accumulated so far for this directory */
+ apr_array_header_t *headers;
+
/* Properties which were modified during change_dir_prop. */
apr_hash_t *props;
@@ -184,6 +187,7 @@ make_dir_baton(const char *path,
? svn_relpath_canonicalize(copyfrom_path, pool)
: NULL;
new_db->copyfrom_rev = copyfrom_rev;
+ new_db->headers = NULL;
new_db->props = apr_hash_make(pool);
new_db->deleted_props = apr_hash_make(pool);
new_db->deleted_entries = apr_hash_make(pool);
@@ -243,11 +247,6 @@ get_props_content(apr_array_header_t *he
svn_repos__dumpfile_header_push(
headers, SVN_REPOS_DUMPFILE_PROP_DELTA, "true");
- /* Prop-content-length: 193 */
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
- "%" APR_SIZE_T_FMT, (*content)->len);
-
return SVN_NO_ERROR;
}
@@ -279,21 +278,26 @@ dump_node_delete(svn_stream_t *stream,
return SVN_NO_ERROR;
}
-/*
- * Write out a partial node record for PATH of type KIND.
+/* Set *HEADERS_P to contain some headers for the node at PATH of type KIND.
+ *
* ACTION describes what is happening to the node (see enum
- * svn_node_action). Write record to writable EB->STREAM.
+ * svn_node_action).
*
* If the node was itself copied, IS_COPY is TRUE and the
* path/revision of the copy source are in COPYFROM_PATH/COPYFROM_REV.
* If IS_COPY is FALSE, yet COPYFROM_PATH/COPYFROM_REV are valid, this
* node is part of a copied subtree.
-
- * Note: only when ACTION=delete, write a complete dumpfile record
- * terminated with blank lines.
+ *
+ * Iff ACTION is svn_node_action_replace and IS_COPY, then first write a
+ * complete deletion record to the dump stream.
+ *
+ * If ACTION is svn_node_action_delete, then the node record will be
+ * complete. (The caller may want to write two blank lines after the
+ * header block.)
*/
static svn_error_t *
-dump_node(struct dump_edit_baton *eb,
+dump_node(apr_array_header_t **headers_p,
+ struct dump_edit_baton *eb,
const char *repos_relpath,
struct dir_baton *db,
struct file_baton *fb,
@@ -345,13 +349,7 @@ dump_node(struct dump_edit_baton *eb,
/* Node-action: delete */
svn_repos__dumpfile_header_push(
headers, SVN_REPOS_DUMPFILE_NODE_ACTION, "delete");
-
- /* We can leave this routine quietly now. Nothing more to do-
- print the headers terminated by one blank line, and an extra
- blank line because we're not dumping props or text. */
- SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
- SVN_ERR(svn_stream_puts(eb->stream, "\n"));
- return SVN_NO_ERROR;
+ break;
case svn_node_action_replace:
if (! is_copy)
@@ -434,10 +432,10 @@ dump_node(struct dump_edit_baton *eb,
break;
}
- /* Write the headers so far. We don't necessarily have all the headers
+ /* Return the headers so far. We don't necessarily have all the headers
yet -- there may be property-related and content length headers to
- come -- so don't write a terminating blank line. */
- SVN_ERR(svn_repos__dump_headers(eb->stream, headers, FALSE, pool));
+ come, if this was not a 'delete' record. */
+ *headers_p = headers;
return SVN_NO_ERROR;
}
@@ -447,7 +445,6 @@ dump_mkdir(struct dump_edit_baton *eb,
apr_pool_t *pool)
{
svn_stringbuf_t *prop_content;
- apr_size_t len;
apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
/* Node-path: ... */
@@ -466,11 +463,9 @@ dump_mkdir(struct dump_edit_baton *eb,
SVN_ERR(get_props_content(headers, &prop_content,
apr_hash_make(pool), apr_hash_make(pool),
pool, pool));
- len = prop_content->len;
- svn_repos__dumpfile_header_pushf(headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
- "%" APR_SIZE_T_FMT, len);
- SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
- SVN_ERR(svn_stream_write(eb->stream, prop_content->data, &len));
+ SVN_ERR(svn_repos__dump_node_record(eb->stream, headers, prop_content,
+ FALSE, 0, FALSE /*content_length_always*/,
+ pool));
/* Newlines to tie it all off. */
SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
@@ -478,13 +473,14 @@ dump_mkdir(struct dump_edit_baton *eb,
return SVN_NO_ERROR;
}
-/* Dump pending headers and properties for the directory DB,
- to allow starting the dump of a child node */
+/* Dump pending headers and properties for the directory EB->pending_db (if
+ * not null), to allow starting the dump of a child node */
static svn_error_t *
dump_pending_dir(struct dump_edit_baton *eb,
apr_pool_t *scratch_pool)
{
struct dir_baton *db = eb->pending_db;
+ svn_stringbuf_t *prop_content = NULL;
if (! db)
return SVN_NO_ERROR;
@@ -492,25 +488,16 @@ dump_pending_dir(struct dump_edit_baton
/* Some pending properties to dump? */
if (db->dump_props)
{
- apr_array_header_t *headers
- = svn_repos__dumpfile_headers_create(scratch_pool);
- svn_stringbuf_t *content;
- apr_size_t len;
-
- SVN_ERR(get_props_content(headers, &content, db->props, db->deleted_props,
+ SVN_ERR(get_props_content(db->headers, &prop_content,
+ db->props, db->deleted_props,
scratch_pool, scratch_pool));
-
- /* Content-length: 14 */
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
- "%" APR_SIZE_T_FMT, content->len);
-
- SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE,
+ }
+ SVN_ERR(svn_repos__dump_node_record(eb->stream, db->headers, prop_content,
+ FALSE, 0, FALSE /*content_length_always*/,
scratch_pool));
- len = content->len;
- SVN_ERR(svn_stream_write(eb->stream, content->data, &len));
-
+ if (db->dump_props)
+ {
/* No text is going to be dumped. Write a couple of newlines and
wait for the next node/ revision. */
SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
@@ -583,7 +570,8 @@ open_root(void *edit_baton,
to letting the typical plumbing handle this task. */
new_db = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
edit_baton, NULL, pool);
- SVN_ERR(dump_node(eb, new_db->repos_relpath, new_db,
+ SVN_ERR(dump_node(&new_db->headers,
+ eb, new_db->repos_relpath, new_db,
NULL, svn_node_action_add, FALSE,
NULL, SVN_INVALID_REVNUM, pool));
@@ -649,7 +637,8 @@ add_directory(const char *path,
is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
/* Dump the node */
- SVN_ERR(dump_node(pb->eb, new_db->repos_relpath, new_db, NULL,
+ SVN_ERR(dump_node(&new_db->headers,
+ pb->eb, new_db->repos_relpath, new_db, NULL,
was_deleted ? svn_node_action_replace : svn_node_action_add,
is_copy,
is_copy ? new_db->copyfrom_path : NULL,
@@ -723,7 +712,8 @@ close_directory(void *dir_baton,
directory. */
if ((! this_pending) && (db->dump_props))
{
- SVN_ERR(dump_node(db->eb, db->repos_relpath, db, NULL,
+ SVN_ERR(dump_node(&db->headers,
+ db->eb, db->repos_relpath, db, NULL,
svn_node_action_change, FALSE,
NULL, SVN_INVALID_REVNUM, pool));
db->eb->pending_db = db;
@@ -736,8 +726,9 @@ close_directory(void *dir_baton,
{
const char *path = apr_hash_this_key(hi);
- SVN_ERR(dump_node(db->eb, path, NULL, NULL, svn_node_action_delete,
- FALSE, NULL, SVN_INVALID_REVNUM, pool));
+ SVN_ERR(dump_node_delete(db->eb->stream, path, pool));
+ /* This deletion record is complete -- write an extra newline */
+ SVN_ERR(svn_stream_puts(db->eb->stream, "\n"));
}
/* ### should be unnecessary */
@@ -904,13 +895,13 @@ close_file(void *file_baton,
struct file_baton *fb = file_baton;
struct dump_edit_baton *eb = fb->eb;
apr_finfo_t *info = apr_pcalloc(pool, sizeof(apr_finfo_t));
- svn_stringbuf_t *propstring;
- apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+ svn_stringbuf_t *propstring = NULL;
+ apr_array_header_t *headers;
SVN_ERR(dump_pending_dir(eb, pool));
- /* Dump the node. */
- SVN_ERR(dump_node(eb, fb->repos_relpath, NULL, fb,
+ /* Start dumping this node, by collecting some basic headers for it. */
+ SVN_ERR(dump_node(&headers, eb, fb->repos_relpath, NULL, fb,
fb->action, fb->is_copy, fb->copyfrom_path,
fb->copyfrom_rev, pool));
@@ -942,35 +933,19 @@ close_file(void *file_baton,
svn_repos__dumpfile_header_push(
headers, SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5, fb->base_checksum);
- /* Text-content-length: 39 */
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
- "%lu", (unsigned long)info->size);
-
/* Text-content-md5: 82705804337e04dcd0e586bfa2389a7f */
svn_repos__dumpfile_header_push(
headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5, text_checksum);
}
- /* Content-length: 1549 */
- /* If both text and props are absent, skip this header */
- if (fb->dump_props)
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
- "%lu", (unsigned long)(info->size + propstring->len));
- else if (fb->dump_text)
- svn_repos__dumpfile_header_pushf(
- headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
- "%lu", (unsigned long)info->size);
+ /* Dump the headers and props now */
+ SVN_ERR(svn_repos__dump_node_record(eb->stream, headers, propstring,
+ fb->dump_text, info->size,
+ FALSE /*content_length_always*/,
+ pool));
- SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
-
- /* Dump the props now */
if (fb->dump_props)
{
- SVN_ERR(svn_stream_write(eb->stream, propstring->data,
- &(propstring->len)));
-
/* Cleanup */
fb->dump_props = FALSE;
apr_hash_clear(fb->props);
Modified: subversion/branches/pin-externals/subversion/tests/cmdline/svntest/verify.py
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/cmdline/svntest/verify.py?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/branches/pin-externals/subversion/tests/cmdline/svntest/verify.py Wed Jan 28 09:22:51 2015
@@ -491,6 +491,22 @@ class DumpParser:
self.current += 1
return True
+ def parse_header(self, header):
+ regex = '([^:]*): (.*)$'
+ m = re.match(regex, self.lines[self.current])
+ if not m:
+ raise SVNDumpParseError("expected a header at line %d, but found:\n%s"
+ % (self.current, self.lines[self.current]))
+ self.current += 1
+ return m.groups()
+
+ def parse_headers(self):
+ headers = []
+ while self.lines[self.current] != '\n':
+ key, val = self.parse_header(self)
+ headers.append((key, val))
+ return headers
+
def parse_format(self):
return self.parse_line('SVN-fs-dump-format-version: ([0-9]+)$')
@@ -590,17 +606,43 @@ class DumpParser:
def parse_one_node(self):
node = {}
+
+ # optional 'kind' and required 'action' must be next
node['kind'] = self.parse_kind()
action = self.parse_action()
- node['copyfrom_rev'] = self.parse_copyfrom_rev()
- node['copyfrom_path'] = self.parse_copyfrom_path()
- node['copy_md5'] = self.parse_copy_md5()
- node['copy_sha1'] = self.parse_copy_sha1()
- node['prop_length'] = self.parse_prop_length(required=False)
- node['text_length'] = self.parse_text_length()
- node['text_md5'] = self.parse_text_md5()
- node['text_sha1'] = self.parse_text_sha1()
- node['content_length'] = self.parse_content_length(required=False)
+
+ # read any remaining headers
+ headers_list = self.parse_headers()
+ headers = dict(headers_list)
+
+ # Content-length must be last, if present
+ if 'Content-length' in headers and headers_list[-1][0] != 'Content-length':
+ raise SVNDumpParseError("'Content-length' header is not last, "
+ "in header block ending at line %d"
+ % (self.current,))
+
+ # parse the remaining optional headers and store in specific keys in NODE
+ for key, header, regex in [
+ ('copyfrom_rev', 'Node-copyfrom-rev', '([0-9]+)$'),
+ ('copyfrom_path', 'Node-copyfrom-path', '(.*)$'),
+ ('copy_md5', 'Text-copy-source-md5', '([0-9a-z]+)$'),
+ ('copy_sha1', 'Text-copy-source-sha1','([0-9a-z]+)$'),
+ ('prop_length', 'Prop-content-length', '([0-9]+)$'),
+ ('text_length', 'Text-content-length', '([0-9]+)$'),
+ ('text_md5', 'Text-content-md5', '([0-9a-z]+)$'),
+ ('text_sha1', 'Text-content-sha1', '([0-9a-z]+)$'),
+ ('content_length', 'Content-length', '([0-9]+)$'),
+ ]:
+ if not header in headers:
+ node[key] = None
+ continue
+ m = re.match(regex, headers[header])
+ if not m:
+ raise SVNDumpParseError("expected '%s' at line %d\n%s"
+ % (regex, self.current,
+ self.lines[self.current]))
+ node[key] = m.group(1)
+
self.parse_blank()
if node['prop_length']:
node['props'] = self.get_props()
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_diff/parse-diff-test.c Wed Jan 28 09:22:51 2015
@@ -667,7 +667,7 @@ test_parse_property_diff(apr_pool_t *poo
prop_patch = apr_hash_get(patch->prop_patches, "prop_add",
APR_HASH_KEY_STRING);
- SVN_TEST_ASSERT(!strcmp("prop_add", prop_patch->name));
+ SVN_TEST_STRING_ASSERT(prop_patch->name, "prop_add");
SVN_TEST_ASSERT(prop_patch->operation == svn_diff_op_added);
hunks = prop_patch->hunks;
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Wed Jan 28 09:22:51 2015
@@ -28,6 +28,7 @@
#include "../../libsvn_fs/fs-loader.h"
#include "../../libsvn_fs_fs/fs.h"
#include "../../libsvn_fs_fs/fs_fs.h"
+#include "../../libsvn_fs_fs/low_level.h"
#include "../../libsvn_fs_fs/util.h"
#include "svn_hash.h"
@@ -1261,7 +1262,7 @@ receive_index(const svn_fs_fs__p2l_entry
return SVN_NO_ERROR;
}
-static char *
+static apr_size_t
stringbuf_find(svn_stringbuf_t *rev_contents,
const char *substring)
{
@@ -1270,26 +1271,9 @@ stringbuf_find(svn_stringbuf_t *rev_cont
for (i = 0; i < rev_contents->len - len + 1; ++i)
if (!memcmp(rev_contents->data + i, substring, len))
- return rev_contents->data + i;
+ return i;
- return NULL;
-}
-
-
-static svn_stringbuf_t *
-get_line(svn_stringbuf_t *rev_contents,
- const char *prefix,
- apr_pool_t *pool)
-{
- char *end, *start = stringbuf_find(rev_contents, prefix);
- if (start == NULL)
- return svn_stringbuf_create_empty(pool);
-
- end = strchr(start, '\n');
- if (end == NULL)
- return svn_stringbuf_create_empty(pool);
-
- return svn_stringbuf_ncreate(start, end - start, pool);
+ return APR_SIZE_MAX;
}
static svn_error_t *
@@ -1302,10 +1286,10 @@ plain_0_length(const svn_test_opts_t *op
svn_fs_root_t *root;
svn_revnum_t rev;
const char *rev_path;
- svn_stringbuf_t *rev_contents, *props_line;
- char *text;
+ svn_stringbuf_t *rev_contents;
apr_hash_t *fs_config;
svn_filesize_t file_length;
+ apr_size_t offset;
if (strcmp(opts->fs_type, "fsfs") != 0)
return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL);
@@ -1329,19 +1313,34 @@ plain_0_length(const svn_test_opts_t *op
rev_path = svn_fs_fs__path_rev_absolute(fs, rev, pool);
SVN_ERR(svn_stringbuf_from_file2(&rev_contents, rev_path, pool));
- props_line = get_line(rev_contents, "props: ", pool);
- text = stringbuf_find(rev_contents, "text: ");
-
- if (text)
+ offset = stringbuf_find(rev_contents, "id: ");
+ if (offset != APR_SIZE_MAX)
{
- /* Explicitly set the last number before the MD5 to 0 */
- strstr(props_line->data, " 2d29")[-1] = '0';
+ node_revision_t *noderev;
+ svn_stringbuf_t *noderev_str;
- /* Add a padding space - in case we shorten the number in TEXT */
- svn_stringbuf_appendbyte(props_line, ' ');
+ /* Read the noderev. */
+ svn_stream_t *stream = svn_stream_from_stringbuf(rev_contents, pool);
+ SVN_ERR(svn_stream_skip(stream, offset));
+ SVN_ERR(svn_fs_fs__read_noderev(&noderev, stream, pool, pool));
+ SVN_ERR(svn_stream_close(stream));
+
+ /* Tweak the DATA_REP. */
+ noderev->data_rep->revision = noderev->prop_rep->revision;
+ noderev->data_rep->item_index = noderev->prop_rep->item_index;
+ noderev->data_rep->size = noderev->prop_rep->size;
+ noderev->data_rep->expanded_size = 0;
+
+ /* Serialize it back. */
+ noderev_str = svn_stringbuf_create_empty(pool);
+ stream = svn_stream_from_stringbuf(noderev_str, pool);
+ SVN_ERR(svn_fs_fs__write_noderev(stream, noderev, ffd->format,
+ svn_fs_fs__fs_supports_mergeinfo(fs),
+ pool));
+ SVN_ERR(svn_stream_close(stream));
- /* Make text point to the PLAIN data rep with no expanded size info. */
- memcpy(text + 6, props_line->data + 7, props_line->len - 7);
+ /* Patch the revision contents */
+ memcpy(rev_contents->data + offset, noderev_str->data, noderev_str->len);
}
SVN_ERR(svn_io_write_atomic(rev_path, rev_contents->data,
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_subr/auth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_subr/auth-test.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_subr/auth-test.c Wed Jan 28 09:22:51 2015
@@ -220,8 +220,8 @@ cleanup_callback(svn_boolean_t *delete_c
{
svn_auth_baton_t *b = walk_baton;
- SVN_TEST_ASSERT(strcmp(cred_kind, SVN_AUTH_CRED_SIMPLE) == 0);
- SVN_TEST_ASSERT(strcmp(realmstring, "<http://my.host> My realm") == 0);
+ SVN_TEST_STRING_ASSERT(cred_kind, SVN_AUTH_CRED_SIMPLE);
+ SVN_TEST_STRING_ASSERT(realmstring, "<http://my.host> My realm");
SVN_ERR(svn_auth_forget_credentials(b, cred_kind, realmstring, scratch_pool));
@@ -272,7 +272,7 @@ test_auth_clear(apr_pool_t *pool)
pool));
creds = credentials;
- SVN_TEST_ASSERT(strcmp(creds->username, "jrandom") == 0);
+ SVN_TEST_STRING_ASSERT(creds->username, "jrandom");
SVN_TEST_ASSERT(creds->may_save);
/* And tell that they are ok and can be saved */
@@ -292,7 +292,7 @@ test_auth_clear(apr_pool_t *pool)
SVN_TEST_ASSERT(credentials);
creds = credentials;
- SVN_TEST_ASSERT(strcmp(creds->username, "jrandom") == 0);
+ SVN_TEST_STRING_ASSERT(creds->username, "jrandom");
SVN_TEST_ASSERT(creds->may_save);
/* Use our walker function to delete credentials (and forget them
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_subr/dirent_uri-test.c Wed Jan 28 09:22:51 2015
@@ -809,6 +809,9 @@ static const testcase_canonicalize_t uri
{ "http://hst/foo/../bar","http://hst/foo/../bar" },
{ "http://hst/", "http://hst" },
{ "http:///", "http://" },
+ { "http:///example.com/", "http:///example.com" },
+ { "http:////example.com/", "http:///example.com" },
+ { "http://///////example.com/", "http:///example.com" },
{ "https://", "https://" },
{ "file:///", "file://" },
{ "file://", "file://" },
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_wc/conflict-data-test.c Wed Jan 28 09:22:51 2015
@@ -621,8 +621,8 @@ test_serialize_tree_conflict(const svn_t
SVN_TEST_ASSERT(reason == svn_wc_conflict_reason_moved_away);
SVN_TEST_ASSERT(action == svn_wc_conflict_action_delete);
- SVN_TEST_ASSERT(!strcmp(moved_away_op_root_abspath,
- sbox_wc_path(&sbox, "A/B")));
+ SVN_TEST_STRING_ASSERT(moved_away_op_root_abspath,
+ sbox_wc_path(&sbox, "A/B"));
}
return SVN_NO_ERROR;
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_wc/op-depth-test.c?rev=1655247&r1=1655246&r2=1655247&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_wc/op-depth-test.c Wed Jan 28 09:22:51 2015
@@ -5793,7 +5793,7 @@ check_tree_conflict_repos_path(svn_test_
SVN_TEST_ASSERT(version != NULL);
- SVN_TEST_ASSERT(!strcmp(version->path_in_repos, repos_path1));
+ SVN_TEST_STRING_ASSERT(version->path_in_repos, repos_path1);
}
if (repos_path2)
@@ -5803,7 +5803,7 @@ check_tree_conflict_repos_path(svn_test_
SVN_TEST_ASSERT(version != NULL);
- SVN_TEST_ASSERT(!strcmp(version->path_in_repos, repos_path2));
+ SVN_TEST_STRING_ASSERT(version->path_in_repos, repos_path2);
}
return SVN_NO_ERROR;
@@ -6808,10 +6808,25 @@ finite_move_update_bump(const svn_test_o
SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_files, FALSE));
SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_files, FALSE));
- SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", NULL, NULL));
+ {
+ conflict_info_t conflicts[] = {
+ {"A/B", FALSE, FALSE, TRUE},
+ {"P/Q", FALSE, FALSE, TRUE},
+ {0}
+ };
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
+ }
+
+ SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", "A/B", "A/B"));
+ SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", "P/Q", "P/Q"));
err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
svn_wc_conflict_choose_mine_conflict);
SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+
+ /* sbox_wc_resolve() obtains a lock on the target path, so now it
+ will apply the change on the target */
+ SVN_ERR(sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 1, ""},
@@ -6840,10 +6855,21 @@ finite_move_update_bump(const svn_test_o
SVN_ERR(sbox_wc_move(&b, "P", "P2"));
SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_immediates, FALSE));
SVN_ERR(sbox_wc_update_depth(&b, "P", 2, svn_depth_immediates, FALSE));
- SVN_ERR(check_tree_conflict_repos_path(&b, "P", NULL, NULL));
+ {
+ conflict_info_t conflicts[] = {
+ {"A/B", FALSE, FALSE, TRUE},
+ {"P", FALSE, FALSE, TRUE},
+ {0}
+ };
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
+ }
+ SVN_ERR(check_tree_conflict_repos_path(&b, "P", "P", "P"));
+ SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", "A/B", "A/B"));
err = sbox_wc_resolve(&b, "P", svn_depth_empty,
svn_wc_conflict_choose_mine_conflict);
SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+ SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 1, ""},
@@ -6874,10 +6900,21 @@ finite_move_update_bump(const svn_test_o
SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
SVN_ERR(sbox_wc_update_depth(&b, "A/B/C", 2, svn_depth_empty, FALSE));
SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_empty, FALSE));
- SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", NULL, NULL));
+ {
+ conflict_info_t conflicts[] = {
+ {"A/B/C", FALSE, FALSE, TRUE},
+ {"P/Q", FALSE, FALSE, TRUE},
+ {0}
+ };
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
+ }
+ SVN_ERR(check_tree_conflict_repos_path(&b, "A/B/C", "A/B/C", "A/B/C"));
+ SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", "P/Q", "P/Q"));
err = sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
svn_wc_conflict_choose_mine_conflict);
SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+ SVN_ERR(sbox_wc_resolve(&b, "A/B/C", svn_depth_empty,
+ svn_wc_conflict_choose_mine_conflict));
{
nodes_row_t nodes[] = {
{0, "", "normal", 1, ""},
@@ -10058,7 +10095,7 @@ static struct svn_test_descriptor_t test
"commit_moved_descendant"),
SVN_TEST_OPTS_XFAIL(commit_moved_away_descendant,
"commit_moved_away_descendant"),
- SVN_TEST_OPTS_XFAIL(finite_move_update_bump,
+ SVN_TEST_OPTS_PASS(finite_move_update_bump,
"finite_move_update_bump"),
SVN_TEST_OPTS_PASS(move_away_delete_update,
"move_away_delete_update"),