You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/02/16 23:39:30 UTC
svn commit: r1245224 [4/4] - in /subversion/branches/ev2-export: ./ build/
build/generator/ build/generator/templates/ notes/api-errata/1.7/
subversion/bindings/swig/ subversion/include/ subversion/include/private/
subversion/libsvn_auth_gnome_keyring/...
Modified: subversion/branches/ev2-export/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnrdump/dump_editor.c?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/ev2-export/subversion/svnrdump/dump_editor.c Thu Feb 16 22:39:27 2012
@@ -169,58 +169,90 @@ make_dir_baton(const char *path,
return new_db;
}
+/* Return in *HEADER and *CONTENT the headers and content for PROPS. */
+static svn_error_t *
+get_props_content(svn_stringbuf_t **header,
+ svn_stringbuf_t **content,
+ apr_hash_t *props,
+ apr_hash_t *deleted_props,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_stream_t *content_stream;
+ apr_hash_t *normal_props;
+ const char *buf;
+
+ *content = svn_stringbuf_create_empty(result_pool);
+ *header = svn_stringbuf_create_empty(result_pool);
+
+ content_stream = svn_stream_from_stringbuf(*content, scratch_pool);
+
+ SVN_ERR(svn_rdump__normalize_props(&normal_props, props, scratch_pool));
+ SVN_ERR(svn_hash_write_incremental(normal_props, deleted_props,
+ content_stream, "PROPS-END",
+ scratch_pool));
+ SVN_ERR(svn_stream_close(content_stream));
+
+ /* Prop-delta: true */
+ *header = svn_stringbuf_createf(result_pool, SVN_REPOS_DUMPFILE_PROP_DELTA
+ ": true\n");
+
+ /* Prop-content-length: 193 */
+ buf = apr_psprintf(scratch_pool, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH
+ ": %" APR_SIZE_T_FMT "\n", (*content)->len);
+ svn_stringbuf_appendcstr(*header, buf);
+
+ return SVN_NO_ERROR;
+}
+
/* Extract and dump properties stored in edit baton EB, using POOL for
* any temporary allocations. If TRIGGER_VAR is not NULL, it is set to FALSE.
* Unless DUMP_DATA_TOO is set, only property headers are dumped.
*/
static svn_error_t *
-do_dump_props(struct dump_edit_baton *eb,
+do_dump_props(svn_stringbuf_t **propstring,
+ svn_stream_t *stream,
+ apr_hash_t *props,
+ apr_hash_t *deleted_props,
svn_boolean_t *trigger_var,
svn_boolean_t dump_data_too,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
- svn_stream_t *propstream;
- apr_hash_t *normal_props;
+ svn_stringbuf_t *header;
+ svn_stringbuf_t *content;
+ apr_size_t len;
if (trigger_var && !*trigger_var)
return SVN_NO_ERROR;
- SVN_ERR(svn_rdump__normalize_props(&normal_props, eb->props, eb->pool));
- svn_stringbuf_setempty(eb->propstring);
- propstream = svn_stream_from_stringbuf(eb->propstring, eb->pool);
- SVN_ERR(svn_hash_write_incremental(normal_props, eb->deleted_props,
- propstream, "PROPS-END", pool));
- SVN_ERR(svn_stream_close(propstream));
+ SVN_ERR(get_props_content(&header, &content, props, deleted_props,
+ result_pool, scratch_pool));
- /* Prop-delta: true */
- SVN_ERR(svn_stream_printf(eb->stream, pool,
- SVN_REPOS_DUMPFILE_PROP_DELTA
- ": true\n"));
+ /* This is a wacky side-effect of this function. */
+ *propstring = content;
- /* Prop-content-length: 193 */
- SVN_ERR(svn_stream_printf(eb->stream, pool,
- SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH
- ": %" APR_SIZE_T_FMT "\n", eb->propstring->len));
+ len = header->len;
+ SVN_ERR(svn_stream_write(stream, header->data, &len));
if (dump_data_too)
{
/* Content-length: 14 */
- SVN_ERR(svn_stream_printf(eb->stream, pool,
+ SVN_ERR(svn_stream_printf(stream, scratch_pool,
SVN_REPOS_DUMPFILE_CONTENT_LENGTH
": %" APR_SIZE_T_FMT "\n\n",
- eb->propstring->len));
+ content->len));
- /* The properties. */
- SVN_ERR(svn_stream_write(eb->stream, eb->propstring->data,
- &(eb->propstring->len)));
+ len = content->len;
+ SVN_ERR(svn_stream_write(stream, content->data, &len));
/* No text is going to be dumped. Write a couple of newlines and
wait for the next node/ revision. */
- SVN_ERR(svn_stream_printf(eb->stream, pool, "\n\n"));
+ SVN_ERR(svn_stream_printf(stream, scratch_pool, "\n\n"));
/* Cleanup so that data is never dumped twice. */
- SVN_ERR(svn_hash__clear(eb->props, eb->pool));
- SVN_ERR(svn_hash__clear(eb->deleted_props, eb->pool));
+ SVN_ERR(svn_hash__clear(props, scratch_pool));
+ SVN_ERR(svn_hash__clear(deleted_props, scratch_pool));
if (trigger_var)
*trigger_var = FALSE;
}
@@ -409,7 +441,9 @@ delete_entry(const char *path,
LDR_DBG(("delete_entry %s\n", path));
/* Some pending properties to dump? */
- SVN_ERR(do_dump_props(pb->eb, &(pb->eb->dump_props), TRUE, pool));
+ SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
+ pb->eb->props, pb->eb->deleted_props,
+ &(pb->eb->dump_props), TRUE, pool, pool));
/* Some pending newlines to dump? */
SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
@@ -441,7 +475,9 @@ add_directory(const char *path,
pb, TRUE, pb->eb->pool);
/* Some pending properties to dump? */
- SVN_ERR(do_dump_props(pb->eb, &(pb->eb->dump_props), TRUE, pool));
+ SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
+ pb->eb->props, pb->eb->deleted_props,
+ &(pb->eb->dump_props), TRUE, pool, pool));
/* Some pending newlines to dump? */
SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
@@ -486,7 +522,9 @@ open_directory(const char *path,
LDR_DBG(("open_directory %s\n", path));
/* Some pending properties to dump? */
- SVN_ERR(do_dump_props(pb->eb, &(pb->eb->dump_props), TRUE, pool));
+ SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
+ pb->eb->props, pb->eb->deleted_props,
+ &(pb->eb->dump_props), TRUE, pool, pool));
/* Some pending newlines to dump? */
SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
@@ -518,7 +556,9 @@ close_directory(void *dir_baton,
LDR_DBG(("close_directory %p\n", dir_baton));
/* Some pending properties to dump? */
- SVN_ERR(do_dump_props(eb, &(eb->dump_props), TRUE, pool));
+ SVN_ERR(do_dump_props(&eb->propstring, eb->stream,
+ eb->props, eb->deleted_props,
+ &(eb->dump_props), TRUE, pool, pool));
/* Some pending newlines to dump? */
SVN_ERR(do_dump_newlines(eb, &(eb->dump_newlines), pool));
@@ -552,7 +592,9 @@ add_file(const char *path,
LDR_DBG(("add_file %s\n", path));
/* Some pending properties to dump? */
- SVN_ERR(do_dump_props(pb->eb, &(pb->eb->dump_props), TRUE, pool));
+ SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
+ pb->eb->props, pb->eb->deleted_props,
+ &(pb->eb->dump_props), TRUE, pool, pool));
/* Some pending newlines to dump? */
SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
@@ -597,7 +639,9 @@ open_file(const char *path,
LDR_DBG(("open_file %s\n", path));
/* Some pending properties to dump? */
- SVN_ERR(do_dump_props(pb->eb, &(pb->eb->dump_props), TRUE, pool));
+ SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
+ pb->eb->props, pb->eb->deleted_props,
+ &(pb->eb->dump_props), TRUE, pool, pool));
/* Some pending newlines to dump? */
SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
@@ -757,7 +801,9 @@ close_file(void *file_baton,
/* Some pending properties to dump? Dump just the headers- dump the
props only after dumping the text headers too (if present) */
- SVN_ERR(do_dump_props(eb, &(eb->dump_props), FALSE, pool));
+ SVN_ERR(do_dump_props(&eb->propstring, eb->stream,
+ eb->props, eb->deleted_props,
+ &(eb->dump_props), FALSE, pool, pool));
/* Dump the text headers */
if (eb->dump_text)
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/README
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/README?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/README (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/README Thu Feb 16 22:39:27 2012
@@ -12,7 +12,7 @@ command-line client. It has no access t
looks inside the .svn/ directory; it only performs actions that a
human user would do.
-These tests require Python 2.4 or later.
+These tests require Python 2.5 or later.
[ For more general information on Subversion's testing system,
please read the README in subversion/tests/. ]
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/externals_tests.py?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/externals_tests.py Thu Feb 16 22:39:27 2012
@@ -1888,7 +1888,7 @@ def exclude_externals(sbox):
None, None, None, None, False,
'--set-depth', 'infinity', wc_dir)
-def file_externals_different_repos(sbox):
+def file_externals_different_url(sbox):
"update file externals via different url"
sbox.build()
@@ -1907,30 +1907,40 @@ def file_externals_different_repos(sbox)
r2_url + '/iota r2-e-2\n' +
'^/iota rr-e-1\n', '')
+ # All file externals appear in the working copy, with normalised URLs.
expected_output = svntest.wc.State(wc_dir, {
'r1-e-1' : Item(status='A '),
'r1-e-2' : Item(status='A '),
+ 'r2-e-1' : Item(status='A '),
+ 'r2-e-2' : Item(status='A '),
'rr-e-1' : Item(status='A '),
})
- # The externals from r2 should fail, but currently pass.
- # This creates a wc.db inconsistency
svntest.actions.run_and_verify_update(wc_dir,
- expected_output, None, None,
- 'svn: warning: W200007: Unsupported.*')
+ expected_output, None, None, None)
+
+ # Verify that all file external URLs are descendants of r1_url
+ for e in ['r1-e-1', 'r1-e-2', 'r2-e-1', 'r2-e-2', 'rr-e-1']:
+ actions.run_and_verify_info([{'Repository Root' : r1_url}],
+ os.path.join(sbox.wc_dir, e))
+
svntest.actions.run_and_verify_svn(None, None, [],
'relocate', r1_url, r2_url, wc_dir)
+ # URLs of existing file externals are silently rewritten
expected_output = svntest.wc.State(wc_dir, {
- 'r2-e-1' : Item(status='A '),
- 'r2-e-2' : Item(status='A '),
})
svntest.actions.run_and_verify_update(wc_dir,
- expected_output, None, None,
- 'svn: warning: W200007: Unsupported.*')
+ expected_output, None, None, None)
+
+ # Verify that all file external URLs are descendants of r2_url
+ for e in ['r1-e-1', 'r1-e-2', 'r2-e-1', 'r2-e-2', 'rr-e-1']:
+ actions.run_and_verify_info([{'Repository Root' : r2_url}],
+ os.path.join(sbox.wc_dir, e))
+
def file_external_in_unversioned(sbox):
"file external in unversioned dir"
@@ -2813,7 +2823,7 @@ test_list = [ None,
incoming_file_on_file_external,
incoming_file_external_on_file,
exclude_externals,
- file_externals_different_repos,
+ file_externals_different_url,
file_external_in_unversioned,
copy_file_externals,
include_externals,
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py Thu Feb 16 22:39:27 2012
@@ -2542,6 +2542,47 @@ def reintegrate_replaced_source(sbox):
[], None, None, None, None, True, True,
'--reintegrate', A_path)
+#----------------------------------------------------------------------
+@SkipUnless(svntest.main.is_posix_os)
+@XFail()
+@Issue(4052)
+def reintegrate_symlink_deletion(sbox):
+ "reintegrate symlink deletion"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ ## path vars
+ A_path = sbox.ospath('A')
+ A_omicron_path = sbox.ospath('A/omicron')
+ mu_path = sbox.ospath('A/mu')
+ A_COPY_path = sbox.ospath('A_COPY')
+ A_COPY_omicron_path = sbox.ospath('A_COPY/omicron')
+ A_url = sbox.repo_url + "/A"
+ A_COPY_url = sbox.repo_url + "/A_COPY"
+
+ ## add symlink
+ os.symlink(mu_path, A_omicron_path)
+ sbox.simple_add('A/omicron')
+ sbox.simple_commit(message='add symlink')
+
+ ## branch
+ sbox.simple_repo_copy('A', 'A_COPY')
+ sbox.simple_update()
+
+ ## branch rm
+ sbox.simple_rm('A_COPY/omicron')
+ sbox.simple_commit(message='remove symlink on branch')
+
+ ## Note: running update at this point avoids the bug.
+
+ ## reintegrate
+ # ### TODO: verify something here
+ svntest.main.run_svn(None, 'merge', '--reintegrate',
+ A_COPY_url, A_path)
+
+
+
########################################################################
# Run the tests
@@ -2565,6 +2606,7 @@ test_list = [ None,
reintegrate_creates_bogus_mergeinfo,
no_source_subtree_mergeinfo,
reintegrate_replaced_source,
+ reintegrate_symlink_deletion,
]
if __name__ == '__main__':
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py Thu Feb 16 22:39:27 2012
@@ -1422,9 +1422,12 @@ def verify_non_utf8_paths(sbox):
if line == "A\n":
# replace 'A' with a latin1 character -- the new path is not valid UTF-8
fp_new.write("\xE6\n")
- elif line == "text: 1 279 32 32 d63ecce65d8c428b86f4f8b0920921fe\n":
+ elif line == "text: 1 279 32 0 d63ecce65d8c428b86f4f8b0920921fe\n":
# fix up the representation checksum
- fp_new.write("text: 1 279 32 32 b50b1d5ed64075b5f632f3b8c30cd6b2\n")
+ fp_new.write("text: 1 279 32 0 b50b1d5ed64075b5f632f3b8c30cd6b2\n")
+ elif line == "text: 1 292 44 32 a6be7b4cf075fd39e6a99eb69a31232b\n":
+ # fix up the representation checksum
+ fp_new.write("text: 1 292 44 32 f2e93e73272cac0f18fccf16f224eb93\n")
elif line == "cpath: /A\n":
# also fix up the 'created path' field
fp_new.write("cpath: /\xE6\n")
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svnrdump_tests.py?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svnrdump_tests.py Thu Feb 16 22:39:27 2012
@@ -197,6 +197,7 @@ def run_load_test(sbox, dumpfile_name, e
######################################################################
# Tests
+@Skip(svntest.main.is_ra_type_dav_serf)
def basic_dump(sbox):
"dump: standard sbox repos"
sbox.build(read_only = True, create_wc = False)
@@ -209,6 +210,7 @@ def basic_dump(sbox):
if not out[0].startswith('SVN-fs-dump-format-version:'):
raise svntest.Failure('No valid output')
+@Skip(svntest.main.is_ra_type_dav_serf)
def revision_0_dump(sbox):
"dump: revision zero"
run_dump_test(sbox, "revision-0.dump")
@@ -227,6 +229,7 @@ def revision_0_load(sbox):
# docs/ (Added r6)
# README (Added r6)
+@Skip(svntest.main.is_ra_type_dav_serf)
def skeleton_dump(sbox):
"dump: skeleton repository"
run_dump_test(sbox, "skeleton.dump")
@@ -235,6 +238,7 @@ def skeleton_load(sbox):
"load: skeleton repository"
run_load_test(sbox, "skeleton.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def sparse_propchanges_dump(sbox):
"dump: sparse file/dir propchanges"
run_dump_test(sbox, "sparse-propchanges.dump")
@@ -244,6 +248,7 @@ def sparse_propchanges_load(sbox):
"load: sparse file/dir propchanges"
run_load_test(sbox, "sparse-propchanges.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def copy_and_modify_dump(sbox):
"dump: copy and modify"
run_dump_test(sbox, "copy-and-modify.dump")
@@ -252,6 +257,7 @@ def copy_and_modify_load(sbox):
"load: copy and modify"
run_load_test(sbox, "copy-and-modify.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def no_author_dump(sbox):
"dump: copy revs with no svn:author revprops"
run_dump_test(sbox, "no-author.dump")
@@ -260,6 +266,7 @@ def no_author_load(sbox):
"load: copy revs with no svn:author revprops"
run_load_test(sbox, "no-author.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def copy_from_previous_version_and_modify_dump(sbox):
"dump: copy from previous version and modify"
run_dump_test(sbox, "copy-from-previous-version-and-modify.dump")
@@ -268,6 +275,7 @@ def copy_from_previous_version_and_modif
"load: copy from previous version and modify"
run_load_test(sbox, "copy-from-previous-version-and-modify.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def modified_in_place_dump(sbox):
"dump: modified in place"
run_dump_test(sbox, "modified-in-place.dump")
@@ -276,6 +284,7 @@ def modified_in_place_load(sbox):
"load: modified in place"
run_load_test(sbox, "modified-in-place.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def move_and_modify_in_the_same_revision_dump(sbox):
"dump: move parent & modify child file in same rev"
run_dump_test(sbox, "move-and-modify.dump")
@@ -284,6 +293,7 @@ def move_and_modify_in_the_same_revision
"load: move parent & modify child file in same rev"
run_load_test(sbox, "move-and-modify.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def tag_empty_trunk_dump(sbox):
"dump: tag empty trunk"
run_dump_test(sbox, "tag-empty-trunk.dump")
@@ -292,6 +302,7 @@ def tag_empty_trunk_load(sbox):
"load: tag empty trunk"
run_load_test(sbox, "tag-empty-trunk.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def tag_trunk_with_file_dump(sbox):
"dump: tag trunk containing a file"
run_dump_test(sbox, "tag-trunk-with-file.dump")
@@ -300,6 +311,7 @@ def tag_trunk_with_file_load(sbox):
"load: tag trunk containing a file"
run_load_test(sbox, "tag-trunk-with-file.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def tag_trunk_with_file2_dump(sbox):
"dump: tag trunk containing a file (#2)"
run_dump_test(sbox, "tag-trunk-with-file2.dump")
@@ -308,6 +320,7 @@ def tag_trunk_with_file2_load(sbox):
"load: tag trunk containing a file (#2)"
run_load_test(sbox, "tag-trunk-with-file2.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def dir_prop_change_dump(sbox):
"dump: directory property changes"
run_dump_test(sbox, "dir-prop-change.dump")
@@ -316,6 +329,7 @@ def dir_prop_change_load(sbox):
"load: directory property changes"
run_load_test(sbox, "dir-prop-change.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def copy_parent_modify_prop_dump(sbox):
"dump: copy parent and modify prop"
run_dump_test(sbox, "copy-parent-modify-prop.dump")
@@ -324,6 +338,7 @@ def copy_parent_modify_prop_load(sbox):
"load: copy parent and modify prop"
run_load_test(sbox, "copy-parent-modify-prop.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def copy_revprops_dump(sbox):
"dump: copy revprops other than svn:*"
run_dump_test(sbox, "revprops.dump")
@@ -333,17 +348,20 @@ def copy_revprops_load(sbox):
run_load_test(sbox, "revprops.dump")
@XFail()
+@Skip(svntest.main.is_ra_type_dav_serf)
def only_trunk_dump(sbox):
"dump: subdirectory"
run_dump_test(sbox, "trunk-only.dump", subdir="/trunk",
expected_dumpfile_name="trunk-only.expected.dump")
@XFail()
+@Skip(svntest.main.is_ra_type_dav_serf)
def only_trunk_A_with_changes_dump(sbox):
"dump: subdirectory with changes on root"
run_dump_test(sbox, "trunk-A-changes.dump", subdir="/trunk/A",
expected_dumpfile_name="trunk-A-changes.expected.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def url_encoding_dump(sbox):
"dump: url encoding issues"
run_dump_test(sbox, "url-encoding-bug.dump")
@@ -352,18 +370,21 @@ def url_encoding_load(sbox):
"load: url encoding issues"
run_load_test(sbox, "url-encoding-bug.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def copy_bad_line_endings_dump(sbox):
"dump: inconsistent line endings in svn:* props"
run_dump_test(sbox, "copy-bad-line-endings.dump",
expected_dumpfile_name="copy-bad-line-endings.expected.dump",
bypass_prop_validation=True)
+@Skip(svntest.main.is_ra_type_dav_serf)
def copy_bad_line_endings2_dump(sbox):
"dump: non-LF line endings in svn:* props"
run_dump_test(sbox, "copy-bad-line-endings2.dump",
expected_dumpfile_name="copy-bad-line-endings2.expected.dump",
bypass_prop_validation=True, ignore_base_checksums=True)
+@Skip(svntest.main.is_ra_type_dav_serf)
def commit_a_copy_of_root_dump(sbox):
"dump: commit a copy of root"
run_dump_test(sbox, "repo-with-copy-of-root-dir.dump")
@@ -372,6 +393,7 @@ def commit_a_copy_of_root_load(sbox):
"load: commit a copy of root"
run_load_test(sbox, "repo-with-copy-of-root-dir.dump")
+@Skip(svntest.main.is_ra_type_dav_serf)
def descend_into_replace_dump(sbox):
"dump: descending into replaced dir looks in src"
run_dump_test(sbox, "descend-into-replace.dump", subdir='/trunk/H',
@@ -382,6 +404,7 @@ def descend_into_replace_load(sbox):
run_load_test(sbox, "descend-into-replace.dump")
@Issue(3847)
+@Skip(svntest.main.is_ra_type_dav_serf)
def add_multi_prop_dump(sbox):
"dump: add with multiple props"
run_dump_test(sbox, "add-multi-prop.dump")
@@ -396,6 +419,7 @@ def multi_prop_edit_load(sbox):
# revs in svn:mergeinfo' but uses 'svnrdump load' in place of
# 'svnadmin load'.
@Issue(3890)
+@Skip(svntest.main.is_ra_type_dav_serf)
def reflect_dropped_renumbered_revs(sbox):
"svnrdump renumbers dropped revs in mergeinfo"
@@ -459,6 +483,7 @@ def reflect_dropped_renumbered_revs(sbox
# from incremental dump' but uses 'svnrdump [dump|load]' in place of
# 'svnadmin [dump|load]'.
@Issue(3890)
+@Skip(svntest.main.is_ra_type_dav_serf)
def dont_drop_valid_mergeinfo_during_incremental_svnrdump_loads(sbox):
"don't drop mergeinfo revs in incremental svnrdump"
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svntest/__init__.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/__init__.py?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/__init__.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/__init__.py Thu Feb 16 22:39:27 2012
@@ -23,11 +23,11 @@
__all__ = [ ]
import sys
-if sys.hexversion < 0x2040000:
- sys.stderr.write('[SKIPPED] at least Python 2.4 is required\n')
+if sys.hexversion < 0x2050000:
+ sys.stderr.write('[SKIPPED] at least Python 2.5 is required\n')
# note: exiting is a bit harsh for a library module, but we really do
- # require Python 2.4. this package isn't going to work otherwise.
+ # require Python 2.5. this package isn't going to work otherwise.
# we're skipping this test, not failing, so exit with 0
sys.exit(0)
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py Thu Feb 16 22:39:27 2012
@@ -302,13 +302,11 @@ def get_start_commit_hook_path(repo_dir)
return os.path.join(repo_dir, "hooks", "start-commit")
-
def get_pre_commit_hook_path(repo_dir):
"Return the path of the pre-commit-hook conf file in REPO_DIR."
return os.path.join(repo_dir, "hooks", "pre-commit")
-
def get_post_commit_hook_path(repo_dir):
"Return the path of the post-commit-hook conf file in REPO_DIR."
Modified: subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c Thu Feb 16 22:39:27 2012
@@ -568,6 +568,165 @@ test_stream_base64(apr_pool_t *pool)
return SVN_NO_ERROR;
}
+/* This test doesn't test much unless run under valgrind when it
+ triggers the problem reported here:
+
+ http://mail-archives.apache.org/mod_mbox/subversion-dev/201202.mbox/%3C87sjik3m8q.fsf@stat.home.lan%3E
+
+ The two data writes caused the base 64 code to allocate a buffer
+ that was a byte short but exactly matched a stringbuf blocksize.
+ That meant the stringbuf didn't overallocate and a write beyond
+ the end of the buffer occured.
+ */
+static svn_error_t *
+test_stream_base64_2(apr_pool_t *pool)
+{
+ const struct data_t {
+ const char *encoded1;
+ const char *encoded2;
+ } data[] = {
+ {
+ "MTI",
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "A23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "B23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "C23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "D23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "E23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "F23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "G23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "H23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "I23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D123456789E"
+ "623456789A123456789B123456789C123456789D123456789E"
+ "723456789A123456789B123456789C123456789D123456789E"
+ "823456789A123456789B123456789C123456789D123456789E"
+ "923456789A123456789B123456789C123456789D123456789E"
+ "J23456789A123456789B123456789C123456789D123456789E"
+ "123456789A123456789B123456789C123456789D123456789E"
+ "223456789A123456789B123456789C123456789D123456789E"
+ "323456789A123456789B123456789C123456789D123456789E"
+ "423456789A123456789B123456789C123456789D123456789E"
+ "523456789A123456789B123456789C123456789D12345"
+ },
+ {
+ NULL,
+ NULL,
+ },
+ };
+ int i;
+
+ for (i = 0; data[i].encoded1; i++)
+ {
+ apr_size_t len1 = strlen(data[i].encoded1);
+
+ svn_stringbuf_t *actual = svn_stringbuf_create_empty(pool);
+ svn_stringbuf_t *expected = svn_stringbuf_create_empty(pool);
+ svn_stream_t *stream = svn_stream_from_stringbuf(actual, pool);
+
+ stream = svn_base64_encode(stream, pool);
+ stream = svn_base64_decode(stream, pool);
+
+ SVN_ERR(svn_stream_write(stream, data[i].encoded1, &len1));
+ svn_stringbuf_appendbytes(expected, data[i].encoded1, len1);
+
+ if (data[i].encoded2)
+ {
+ apr_size_t len2 = strlen(data[i].encoded2);
+ SVN_ERR(svn_stream_write(stream, data[i].encoded2, &len2));
+ svn_stringbuf_appendbytes(expected, data[i].encoded2, len2);
+ }
+
+ SVN_ERR(svn_stream_close(stream));
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
struct svn_test_descriptor_t test_funcs[] =
@@ -591,5 +750,7 @@ struct svn_test_descriptor_t test_funcs[
"test compressed streams with empty files"),
SVN_TEST_PASS2(test_stream_base64,
"test base64 encoding/decoding streams"),
+ SVN_TEST_PASS2(test_stream_base64_2,
+ "base64 decoding allocation problem"),
SVN_TEST_NULL
};
Modified: subversion/branches/ev2-export/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dist/backport.pl?rev=1245224&r1=1245223&r2=1245224&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dist/backport.pl (original)
+++ subversion/branches/ev2-export/tools/dist/backport.pl Thu Feb 16 22:39:27 2012
@@ -82,7 +82,7 @@ sub merge {
# NOTE: This doesn't escape the branch into the pattern.
$pattern = sprintf '\V\(%s branch(es)?\|branches\/%s\|Branch(es)?:\n *%s\)', $entry{branch}, $entry{branch}, $entry{branch};
$mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
- print $logmsg_fh "Reintergrate the $entry{header}:";
+ print $logmsg_fh "Reintegrate the $entry{header}:";
print $logmsg_fh "";
} elsif (@{$entry{revisions}}) {
$pattern = '^ [*] \V' . 'r' . $entry{revisions}->[0];