You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2011/07/20 15:06:16 UTC
svn commit: r1148749 [10/11] - in /subversion/branches/svn-bisect: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/
contrib/hook-scripts/ contrib/hook-scripts/enforcer/ contrib/server-side/
contrib/server-side/fsfsfixer/fixer/ not...
Modified: subversion/branches/svn-bisect/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/main.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/main.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/main.c Wed Jul 20 13:06:00 2011
@@ -1382,11 +1382,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
("Upgrade the metadata storage format for a working copy.\n"
"usage: upgrade WCPATH...\n"
"\n"
- " Local modifications are preserved.\n"
- "\n"
- " Note: Upgrading a working copy from the format used in Subversion 1.6\n"
- " to the format used in Subversion 1.7 takes much more time than checking\n"
- " out a new working copy with the 1.7 client.\n"),
+ " Local modifications are preserved.\n"),
{ 'q' } },
{ NULL, NULL, {0}, NULL, {0} }
@@ -2367,8 +2363,10 @@ main(int argc, const char *argv[])
opt_state.config_dir, pool);
if (err)
{
- /* Fallback to default config if the config directory isn't readable. */
- if (err->apr_err == APR_EACCES)
+ /* Fallback to default config if the config directory isn't readable
+ or is not a directory. */
+ if (APR_STATUS_IS_EACCES(err->apr_err)
+ || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))
{
svn_handle_warning2(stderr, err, "svn: ");
svn_error_clear(err);
Modified: subversion/branches/svn-bisect/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/notify.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/notify.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/notify.c Wed Jul 20 13:06:00 2011
@@ -162,6 +162,20 @@ notify(void *baton, const svn_wc_notify_
path_local)))
goto print_error;
break;
+ case svn_wc_notify_update_skip_access_denied:
+ nb->skipped_paths++;
+ if ((err = svn_cmdline_printf(
+ pool, _("Skipped '%s' -- Access denied\n"),
+ path_local)))
+ goto print_error;
+ break;
+ case svn_wc_notify_skip_conflicted:
+ nb->skipped_paths++;
+ if ((err = svn_cmdline_printf(
+ pool, _("Skipped '%s' -- Node remains in conflict\n"),
+ path_local)))
+ goto print_error;
+ break;
case svn_wc_notify_update_delete:
case svn_wc_notify_exclude:
nb->received_some_change = TRUE;
@@ -949,7 +963,7 @@ notify(void *baton, const svn_wc_notify_
break;
case svn_wc_notify_upgraded_path:
- err = svn_cmdline_printf(pool, _("Upgraded '%s'.\n"), path_local);
+ err = svn_cmdline_printf(pool, _("Upgraded '%s'\n"), path_local);
if (err)
goto print_error;
break;
Modified: subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c Wed Jul 20 13:06:00 2011
@@ -168,6 +168,7 @@ svn_cl__proplist(apr_getopt_t *os,
int i;
apr_pool_t *iterpool;
svn_proplist_receiver_t pl_receiver;
+ svn_boolean_t had_errors = FALSE;
if (opt_state->xml)
{
@@ -189,6 +190,7 @@ svn_cl__proplist(apr_getopt_t *os,
proplist_baton_t pl_baton;
const char *truepath;
svn_opt_revision_t peg_revision;
+ svn_boolean_t success;
svn_pool_clear(iterpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
@@ -200,22 +202,31 @@ svn_cl__proplist(apr_getopt_t *os,
SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
iterpool));
- SVN_ERR(svn_cl__try
- (svn_client_proplist3(truepath, &peg_revision,
+ SVN_ERR(svn_cl__try(
+ svn_client_proplist3(truepath, &peg_revision,
&(opt_state->start_revision),
opt_state->depth,
opt_state->changelists,
pl_receiver, &pl_baton,
ctx, iterpool),
- NULL, opt_state->quiet,
+ &success, opt_state->quiet,
SVN_ERR_UNVERSIONED_RESOURCE,
SVN_ERR_ENTRY_NOT_FOUND,
SVN_NO_ERROR));
+
+ if (!success)
+ had_errors = TRUE;
}
svn_pool_destroy(iterpool);
if (opt_state->xml)
SVN_ERR(svn_cl__xml_print_footer("properties", scratch_pool));
+
+ /* Error out *after* we closed the XML element */
+ if (had_errors)
+ return svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Could not display info for all targets "
+ "because some targets don't exist"));
}
return SVN_NO_ERROR;
Modified: subversion/branches/svn-bisect/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/status.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/status.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/status.c Wed Jul 20 13:06:00 2011
@@ -68,8 +68,15 @@ combined_status(const svn_client_status_
switch (status->node_status)
{
- case svn_wc_status_modified:
case svn_wc_status_conflicted:
+ if (!status->versioned && status->conflicted)
+ {
+ /* Report unversioned tree conflict victims as missing: '!' */
+ new_status = svn_wc_status_missing;
+ break;
+ }
+ /* fall through */
+ case svn_wc_status_modified:
/* This value might be the property status */
new_status = status->text_status;
break;
@@ -158,22 +165,32 @@ print_status(const char *path,
svn_boolean_t text_conflicted;
svn_boolean_t prop_conflicted;
svn_boolean_t tree_conflicted;
- svn_error_t *err;
- err = svn_wc_conflicted_p3(&text_conflicted,
- &prop_conflicted,
- &tree_conflicted, ctx->wc_ctx,
- local_abspath, pool);
+ if (status->versioned)
+ {
+ svn_error_t *err;
- if (err && err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
+ err = svn_wc_conflicted_p3(&text_conflicted,
+ &prop_conflicted,
+ &tree_conflicted, ctx->wc_ctx,
+ local_abspath, pool);
+
+ if (err && err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
+ {
+ svn_error_clear(err);
+ text_conflicted = FALSE;
+ prop_conflicted = FALSE;
+ tree_conflicted = FALSE;
+ }
+ else
+ SVN_ERR(err);
+ }
+ else
{
- svn_error_clear(err);
text_conflicted = FALSE;
prop_conflicted = FALSE;
- tree_conflicted = FALSE;
+ tree_conflicted = TRUE;
}
- else
- SVN_ERR(err);
if (tree_conflicted)
{
Modified: subversion/branches/svn-bisect/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/switch-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/switch-cmd.c Wed Jul 20 13:06:00 2011
@@ -97,8 +97,7 @@ svn_cl__switch(apr_getopt_t *os,
svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_array_header_t *targets;
- const char *target = NULL, *switch_url = NULL;
- const char *true_path;
+ const char *target, *switch_url;
svn_opt_revision_t peg_revision;
svn_depth_t depth;
svn_boolean_t depth_is_sticky;
@@ -122,23 +121,15 @@ svn_cl__switch(apr_getopt_t *os,
if (targets->nelts > 2)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
- /* Get the required SWITCH_URL and the optional TARGET arguments. */
+ /* Get the required SWITCH_URL and its optional PEG_REVISION, and the
+ * optional TARGET argument. */
+ SVN_ERR(svn_opt_parse_path(&peg_revision, &switch_url,
+ APR_ARRAY_IDX(targets, 0, const char *),
+ scratch_pool));
if (targets->nelts == 1)
- {
- switch_url = APR_ARRAY_IDX(targets, 0, const char *);
- target = "";
- }
+ target = "";
else
- {
- switch_url = APR_ARRAY_IDX(targets, 0, const char *);
- target = APR_ARRAY_IDX(targets, 1, const char *);
- }
-
- /* Strip peg revision if targets contains an URI. */
- SVN_ERR(svn_opt_parse_path(&peg_revision, &true_path, switch_url,
- scratch_pool));
- APR_ARRAY_IDX(targets, 0, const char *) = true_path;
- switch_url = true_path;
+ target = APR_ARRAY_IDX(targets, 1, const char *);
/* Validate the switch_url */
if (! svn_path_is_url(switch_url))
@@ -147,8 +138,6 @@ svn_cl__switch(apr_getopt_t *os,
SVN_ERR(svn_cl__check_target_is_local_path(target));
- switch_url = svn_uri_canonicalize(switch_url, scratch_pool);
-
/* Deal with depthstuffs. */
if (opt_state->set_depth != svn_depth_unknown)
{
Modified: subversion/branches/svn-bisect/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/util.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/util.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/util.c Wed Jul 20 13:06:00 2011
@@ -1361,22 +1361,6 @@ svn_cl__eat_peg_revisions(apr_array_head
}
svn_error_t *
-svn_cl__opt_parse_path(svn_opt_revision_t *rev,
- const char **truepath,
- const char *path /* UTF-8! */,
- apr_pool_t *pool)
-{
- SVN_ERR(svn_opt_parse_path(rev, truepath, path, pool));
-
- if (svn_path_is_url(*truepath))
- *truepath = svn_uri_canonicalize(*truepath, pool);
- else
- *truepath = svn_dirent_canonicalize(*truepath, pool);
-
- return SVN_NO_ERROR;
-}
-
-svn_error_t *
svn_cl__assert_homogeneous_target_type(const apr_array_header_t *targets)
{
svn_error_t *err;
Modified: subversion/branches/svn-bisect/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svnadmin/main.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svnadmin/main.c (original)
+++ subversion/branches/svn-bisect/subversion/svnadmin/main.c Wed Jul 20 13:06:00 2011
@@ -186,8 +186,7 @@ enum svnadmin__cmdline_options_t
svnadmin__wait,
svnadmin__pre_1_4_compatible,
svnadmin__pre_1_5_compatible,
- svnadmin__pre_1_6_compatible,
- svnadmin__pre_1_7_compatible
+ svnadmin__pre_1_6_compatible
};
/* Option codes and descriptions.
@@ -276,10 +275,6 @@ static const apr_getopt_option_t options
N_("use format compatible with Subversion versions\n"
" earlier than 1.6")},
- {"pre-1.7-compatible", svnadmin__pre_1_7_compatible, 0,
- N_("use format compatible with Subversion versions\n"
- " earlier than 1.7")},
-
{"memory-cache-size", 'M', 1,
N_("size of the extra in-memory cache in MB used to\n"
" minimize redundant operations. Default: 16.\n"
@@ -305,8 +300,8 @@ static const svn_opt_subcommand_desc2_t
"Create a new, empty repository at REPOS_PATH.\n"),
{svnadmin__bdb_txn_nosync, svnadmin__bdb_log_keep,
svnadmin__config_dir, svnadmin__fs_type, svnadmin__pre_1_4_compatible,
- svnadmin__pre_1_5_compatible, svnadmin__pre_1_6_compatible,
- svnadmin__pre_1_7_compatible} },
+ svnadmin__pre_1_5_compatible, svnadmin__pre_1_6_compatible
+ } },
{"deltify", subcommand_deltify, {0}, N_
("usage: svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH\n\n"
@@ -457,7 +452,6 @@ struct svnadmin_opt_state
svn_boolean_t pre_1_4_compatible; /* --pre-1.4-compatible */
svn_boolean_t pre_1_5_compatible; /* --pre-1.5-compatible */
svn_boolean_t pre_1_6_compatible; /* --pre-1.6-compatible */
- svn_boolean_t pre_1_7_compatible; /* --pre-1.7-compatible */
svn_opt_revision_t start_revision, end_revision; /* -r X[:Y] */
svn_boolean_t help; /* --help or -? */
svn_boolean_t version; /* --version */
@@ -559,9 +553,11 @@ parse_args(apr_array_header_t **args,
if (args)
{
*args = apr_array_make(pool, num_args, sizeof(const char *));
- while (os->ind < os->argc)
- APR_ARRAY_PUSH(*args, const char *) =
- apr_pstrdup(pool, os->argv[os->ind++]);
+
+ if (num_args)
+ while (os->ind < os->argc)
+ APR_ARRAY_PUSH(*args, const char *) =
+ apr_pstrdup(pool, os->argv[os->ind++]);
}
return SVN_NO_ERROR;
@@ -606,11 +602,6 @@ subcommand_create(apr_getopt_t *os, void
APR_HASH_KEY_STRING,
"1");
- if (opt_state->pre_1_7_compatible)
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_7_COMPATIBLE,
- APR_HASH_KEY_STRING,
- "1");
-
SVN_ERR(svn_repos_create(&repos, opt_state->repository_path,
NULL, NULL, NULL, fs_config, pool));
svn_fs_set_warning_func(svn_repos_fs(repos), warning_func, NULL);
@@ -1403,7 +1394,8 @@ subcommand_lslocks(apr_getopt_t *os, voi
sizeof(const char *)),
pool));
if (targets->nelts > 1)
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0,
+ _("Too many arguments given"));
if (targets->nelts)
fs_path = APR_ARRAY_IDX(targets, 0, const char *);
@@ -1730,9 +1722,6 @@ main(int argc, const char *argv[])
case svnadmin__pre_1_6_compatible:
opt_state.pre_1_6_compatible = TRUE;
break;
- case svnadmin__pre_1_7_compatible:
- opt_state.pre_1_7_compatible = TRUE;
- break;
case svnadmin__fs_type:
err = svn_utf_cstring_to_utf8(&opt_state.fs_type, opt_arg, pool);
if (err)
Modified: subversion/branches/svn-bisect/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svnrdump/dump_editor.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/svn-bisect/subversion/svnrdump/dump_editor.c Wed Jul 20 13:06:00 2011
@@ -487,7 +487,7 @@ open_directory(const char *path,
/* If the parent directory has explicit comparison path and rev,
record the same for this one. */
- if (pb && ARE_VALID_COPY_ARGS(pb->copyfrom_path, pb->copyfrom_rev))
+ if (ARE_VALID_COPY_ARGS(pb->copyfrom_path, pb->copyfrom_rev))
{
copyfrom_path = svn_relpath_join(pb->copyfrom_path,
svn_relpath_basename(path, NULL),
@@ -598,7 +598,7 @@ open_file(const char *path,
/* If the parent directory has explicit copyfrom path and rev,
record the same for this one. */
- if (pb && ARE_VALID_COPY_ARGS(pb->copyfrom_path, pb->copyfrom_rev))
+ if (ARE_VALID_COPY_ARGS(pb->copyfrom_path, pb->copyfrom_rev))
{
copyfrom_path = svn_relpath_join(pb->copyfrom_path,
svn_relpath_basename(path, NULL),
Modified: subversion/branches/svn-bisect/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svnserve/serve.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svnserve/serve.c (original)
+++ subversion/branches/svn-bisect/subversion/svnserve/serve.c Wed Jul 20 13:06:00 2011
@@ -1903,8 +1903,7 @@ static svn_error_t *get_mergeinfo(svn_ra
mergeinfo_string));
}
svn_pool_destroy(iterpool);
- SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b)",
- validate_inherited_mergeinfo));
+ SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
return SVN_NO_ERROR;
}
@@ -3230,7 +3229,12 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(cc(!",
"success", uuid, b.repos_url));
if (supports_mergeinfo)
- SVN_ERR(svn_ra_svn_write_word(conn, pool, SVN_RA_SVN_CAP_MERGEINFO));
+ {
+ SVN_ERR(svn_ra_svn_write_word(conn, pool, SVN_RA_SVN_CAP_MERGEINFO));
+ SVN_ERR(svn_ra_svn_write_word(
+ conn, pool, SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO));
+ }
+
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
}
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/changelist_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/changelist_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/changelist_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/changelist_tests.py Wed Jul 20 13:06:00 2011
@@ -1132,6 +1132,43 @@ def revert_deleted_in_changelist(sbox):
'revert', '-R', sbox.ospath('A'))
svntest.actions.run_and_verify_info(expected_infos, sbox.ospath('A/mu'))
+def add_remove_non_existent_target(sbox):
+ "add and remove non-existent target to changelist"
+
+ sbox.build(read_only = True)
+ wc_dir = sbox.wc_dir
+ bogus_path = os.path.join(wc_dir, 'A', 'bogus')
+
+ expected_err = "svn: warning: W155010: The node '" + \
+ re.escape(os.path.abspath(bogus_path)) + \
+ "' was not found"
+
+ svntest.actions.run_and_verify_svn(None, None, expected_err,
+ 'changelist', 'testlist',
+ bogus_path)
+
+ svntest.actions.run_and_verify_svn(None, None, expected_err,
+ 'changelist', bogus_path,
+ '--remove')
+
+def add_remove_unversioned_target(sbox):
+ "add and remove unversioned target to changelist"
+
+ sbox.build(read_only = True)
+ unversioned = sbox.ospath('unversioned')
+ svntest.main.file_write(unversioned, "dummy contents", 'w+')
+
+ expected_err = "svn: warning: W155010: The node '" + \
+ re.escape(os.path.abspath(unversioned)) + \
+ "' was not found"
+
+ svntest.actions.run_and_verify_svn(None, None, expected_err,
+ 'changelist', 'testlist',
+ unversioned)
+
+ svntest.actions.run_and_verify_svn(None, None, expected_err,
+ 'changelist', unversioned,
+ '--remove')
########################################################################
@@ -1153,6 +1190,8 @@ test_list = [ None,
move_added_keeps_changelist,
change_to_dir,
revert_deleted_in_changelist,
+ add_remove_non_existent_target,
+ add_remove_unversioned_target,
]
if __name__ == '__main__':
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/davautocheck.sh?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/davautocheck.sh Wed Jul 20 13:06:00 2011
@@ -67,6 +67,9 @@
#
# To prevent the server from advertising httpv2, pass USE_HTTPV1 in
# the environment.
+#
+# To use value for "SVNPathAuthz" directive set SVN_PATH_AUTHZ with
+# appropriate value in the environment.
#
# Passing --no-tests as argv[1] will have the script start a server
# but not run any tests.
@@ -160,6 +163,12 @@ if [ ${USE_HTTPV1:+set} ]; then
ADVERTISE_V2_PROTOCOL=off
fi
+# Pick up $SVN_PATH_AUTHZ
+SVN_PATH_AUTHZ_LINE=""
+if [ ${SVN_PATH_AUTHZ:+set} ]; then
+ SVN_PATH_AUTHZ_LINE="SVNPathAuthz ${SVN_PATH_AUTHZ}"
+fi
+
# Find the source and build directories. The build dir can be found if it is
# the current working dir or the source dir.
pushd ${SCRIPTDIR}/../../../ > /dev/null
@@ -326,6 +335,7 @@ CustomLog "$HTTPD_ROOT/ops" "%
AuthUserFile $HTTPD_USERS
Require valid-user
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+ ${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /svn-test-work/local_tmp/repos>
DAV svn
@@ -336,6 +346,7 @@ CustomLog "$HTTPD_ROOT/ops" "%
AuthUserFile $HTTPD_USERS
Require valid-user
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+ ${SVN_PATH_AUTHZ_LINE}
</Location>
RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)\$ /svn-test-work/repositories/\$1
RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)\$ /svn-test-work/repositories/\$1
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/info_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/info_tests.py Wed Jul 20 13:06:00 2011
@@ -412,6 +412,77 @@ def info_repos_root_url(sbox):
svntest.actions.run_and_verify_info(expected_info, sbox.repo_url,
'--depth', 'files')
+@Issue(3787)
+def info_show_exclude(sbox):
+ "tests 'info --depth' variants on excluded node"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ A_path = os.path.join(wc_dir, 'A')
+ iota = os.path.join(wc_dir, 'iota')
+ svntest.main.run_svn(None, 'up', '--set-depth', 'exclude', A_path)
+ wc_uuid = svntest.actions.get_wc_uuid(wc_dir)
+
+ expected_info = [{
+ 'Path' : re.escape(wc_dir),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : wc_uuid,
+ }]
+
+ svntest.actions.run_and_verify_info(expected_info, '--depth', 'empty',
+ wc_dir)
+
+ expected_info = [{
+ 'Path' : '.*%sA' % re.escape(os.sep),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : wc_uuid,
+ 'Depth' : 'exclude',
+ }]
+
+ svntest.actions.run_and_verify_info(expected_info, '--depth',
+ 'empty', A_path)
+ svntest.actions.run_and_verify_info(expected_info, '--depth',
+ 'infinity', A_path)
+ svntest.actions.run_and_verify_info(expected_info, '--depth',
+ 'immediates', A_path)
+
+ expected_info = [{
+ 'Path' : '.*%siota' % re.escape(os.sep),
+ 'Repository Root' : sbox.repo_url,
+ 'Repository UUID' : wc_uuid,
+ }]
+ svntest.main.run_svn(None, 'up', '--set-depth', 'exclude', iota)
+ svntest.actions.run_and_verify_info(expected_info, iota)
+
+ # And now get iota back, to allow testing other states
+ expected_output = svntest.wc.State(wc_dir, {
+ 'iota' : Item(status='A '),
+ })
+
+ expected_status = svntest.wc.State(iota, {
+ '' : Item(status=' ', wc_rev='1')
+ })
+
+ svntest.actions.run_and_verify_update(iota,
+ expected_output, None, expected_status)
+
+ sbox.simple_rm('iota')
+ sbox.simple_commit()
+
+ # Expect error on iota (status = not-present)
+ svntest.actions.run_and_verify_svn(None, [],
+ 'svn: E200009: Could not display info for all targets.*',
+ 'info', iota)
+
+ sbox.simple_update()
+
+ # Expect error on iota (unversioned)
+ svntest.actions.run_and_verify_svn(None, [],
+ 'svn: E200009: Could not display info for all targets.*',
+ 'info', iota)
+
+
########################################################################
# Run the tests
@@ -424,6 +495,7 @@ test_list = [ None,
info_url_special_characters,
info_multiple_targets,
info_repos_root_url,
+ info_show_exclude,
]
if __name__ == '__main__':
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/lock_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/lock_tests.py Wed Jul 20 13:06:00 2011
@@ -90,7 +90,7 @@ def lock_file(sbox):
# --- Meanwhile, in our other working copy... ---
err_re = "(svn\: E195022\: File '.*iota' is locked in another)|" + \
- "(svn\: E160039: User 'jconstant' does not own lock on path.*iota')"
+ "(svn\: E160039: User '?jconstant'? does not own lock on path.*iota')"
svntest.main.run_svn(None, 'update', wc_b)
# -- Try to change a file --
@@ -111,7 +111,7 @@ def lock_file(sbox):
svntest.main.run_svn(None, 'propset', 'sneakyuser', 'Sally', file_path_b)
err_re = "(svn\: E195022\: File '.*iota' is locked in another)|" + \
- "(svn\: E160039\: User 'jconstant' does not own lock on path)"
+ "(svn\: E160039\: User '?jconstant'? does not own lock on path)"
# attempt (and fail) to commit as user Sally
svntest.actions.run_and_verify_commit(wc_b, None, None, err_re,
@@ -1498,7 +1498,7 @@ def lock_path_not_in_head(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'commit',
'-m', 'Some deletions', wc_dir)
svntest.actions.run_and_verify_svn(None, None, [], 'up', '-r1', wc_dir)
- expected_lock_fail_err_re = "svn: warning:.*" \
+ expected_lock_fail_err_re = "svn:.*" \
"((Path .* doesn't exist in HEAD revision)" \
"|(Lock request failed: 405 Method Not Allowed))"
# Issue #3524 These lock attemtps were triggering an assert over ra_serf:
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/log_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/log_tests.py Wed Jul 20 13:06:00 2011
@@ -2012,7 +2012,7 @@ def log_with_unrelated_peg_and_operative
def log_on_nonexistent_path_and_valid_rev(sbox):
"log on nonexistent path does not error out"
- sbox.build()#create_wc=False)
+ sbox.build(create_wc=False)
real_path_real_rev = sbox.repo_url + '/A@1'
real_path_bad_rev = sbox.repo_url + '/A@99'
bad_url_bad_rev = sbox.repo_url + '/Z@99'
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/merge_reintegrate_tests.py Wed Jul 20 13:06:00 2011
@@ -2340,6 +2340,268 @@ def reintegrate_creates_bogus_mergeinfo(
None, None, None, None, None,
1, 1, "--reintegrate", A_path)
+
+#----------------------------------------------------------------------
+# Test for regression on 1.6.x branch, merge fails when source without
+# subtree mergeinfo is reintegrated into a target with subtree
+# mergeinfo. Deliberately written in a style that works with the 1.6
+# testsuite.
+@Issue(3957)
+def no_source_subtree_mergeinfo(sbox):
+ "source without subtree mergeinfo"
+
+ sbox.build()
+ wc_dir=sbox.wc_dir
+
+ svntest.main.file_write(os.path.join(wc_dir, 'A', 'B', 'E', 'alpha'),
+ 'AAA\n' +
+ 'BBB\n' +
+ 'CCC\n')
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+ svntest.main.run_svn(None, 'update', wc_dir)
+
+ # Create branch-1
+ svntest.main.run_svn(None, 'copy',
+ os.path.join(wc_dir, 'A', 'B'),
+ os.path.join(wc_dir, 'A', 'B1'))
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+
+ # Create branch-1
+ svntest.main.run_svn(None, 'copy',
+ os.path.join(wc_dir, 'A', 'B'),
+ os.path.join(wc_dir, 'A', 'B2'))
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+
+ # Change on trunk
+ svntest.main.file_write(os.path.join(wc_dir, 'A', 'B', 'E', 'alpha'),
+ 'AAAxx\n' +
+ 'BBB\n' +
+ 'CCC\n')
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+
+ # Change on branch-1
+ svntest.main.file_write(os.path.join(wc_dir, 'A', 'B1', 'E', 'alpha'),
+ 'AAA\n' +
+ 'BBBxx\n' +
+ 'CCC\n')
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+
+ # Change on branch-2
+ svntest.main.file_write(os.path.join(wc_dir, 'A', 'B2', 'E', 'alpha'),
+ 'AAA\n' +
+ 'BBB\n' +
+ 'CCCxx\n')
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+ svntest.main.run_svn(None, 'update', wc_dir)
+
+ # Merge trunk to branch-1
+ svntest.main.run_svn(None, 'merge', '^/A/B', os.path.join(wc_dir, 'A', 'B1'))
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+ svntest.main.run_svn(None, 'update', wc_dir)
+
+ # Reintegrate branch-1 subtree to trunk subtree
+ svntest.main.run_svn(None, 'merge', '--reintegrate',
+ '^/A/B1/E', os.path.join(wc_dir, 'A', 'B', 'E'))
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+ svntest.main.run_svn(None, 'update', wc_dir)
+
+ # Merge trunk to branch-2
+ svntest.main.run_svn(None, 'merge', '^/A/B', os.path.join(wc_dir, 'A', 'B2'))
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+ svntest.main.run_svn(None, 'update', wc_dir)
+
+ # Reverse merge branch-1 subtree to branch-2 subtree, this removes
+ # the subtree mergeinfo from branch 2
+ svntest.main.run_svn(None, 'merge', '-r8:2',
+ '^/A/B1/E', os.path.join(wc_dir, 'A', 'B2', 'E'))
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+ svntest.main.run_svn(None, 'update', wc_dir)
+
+ # Verify that merge results in no subtree mergeinfo
+ svntest.actions.run_and_verify_svn(None, [], [], 'propget', 'svn:mergeinfo',
+ sbox.repo_url + '/A/B2/E')
+
+ # Merge trunk to branch-2
+ svntest.main.run_svn(None, 'merge', '^/A/B', os.path.join(wc_dir, 'A', 'B2'))
+ svntest.main.run_svn(None, 'commit', '-m', 'log message', wc_dir)
+ svntest.main.run_svn(None, 'update', wc_dir)
+
+ # Verify that there is still no subtree mergeinfo
+ svntest.actions.run_and_verify_svn(None, [], [], 'propget', 'svn:mergeinfo',
+ sbox.repo_url + '/A/B2/E')
+
+ # Reintegrate branch-2 to trunk, this fails in 1.6.x from 1.6.13.
+ # The error message states revisions /A/B/E:3-11 are missing from
+ # /A/B2/E and yet the mergeinfo on /A/B2 is /A/B:3-11 and /A/B2/E
+ # has no mergeinfo.
+ expected_output = wc.State(os.path.join(wc_dir, 'A', 'B'), {
+ 'E' : Item(status=' U'),
+ 'E/alpha' : Item(status='U '),
+ })
+ expected_mergeinfo = wc.State(os.path.join(wc_dir, 'A', 'B'), {
+ '' : Item(status=' U'),
+ })
+ expected_elision = wc.State(os.path.join(wc_dir, 'A', 'B'), {
+ })
+ expected_disk = wc.State('', {
+ '' : Item(props={SVN_PROP_MERGEINFO : '/A/B2:3-12'}),
+ 'E' : Item(),
+ 'E/alpha' : Item("AAA\n" +
+ "BBB\n" +
+ "CCCxx\n"),
+ 'E/beta' : Item("This is the file 'beta'.\n"),
+ 'F' : Item(),
+ 'lambda' : Item("This is the file 'lambda'.\n"),
+ })
+ expected_skip = wc.State(os.path.join(wc_dir, 'A', 'B'), {
+ })
+ svntest.actions.run_and_verify_merge(os.path.join(wc_dir, 'A', 'B'),
+ None, None, '^/A/B2', None,
+ expected_output, expected_mergeinfo,
+ expected_elision, expected_disk,
+ None, expected_skip,
+ None, None, None, None, None,
+ 1, 1, '--reintegrate',
+ os.path.join(wc_dir, 'A', 'B'))
+ # For 1.6 testsuite use:
+ # svntest.actions.run_and_verify_merge(os.path.join(wc_dir, 'A', 'B'),
+ # None, None, '^/A/B2',
+ # expected_output,
+ # expected_disk,
+ # None, expected_skip,
+ # None, None, None, None, None,
+ # 1, 1, '--reintegrate')
+
+#----------------------------------------------------------------------
+@SkipUnless(server_has_mergeinfo)
+@Issue(3961)
+@XFail()
+def reintegrate_replaced_source(sbox):
+ "reintegrate a replaced source branch"
+
+ # Make A_COPY branch in r2, and do a few more commits to A in r3-6.
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ expected_disk, expected_status = set_up_branch(sbox)
+
+ A_path = os.path.join(sbox.wc_dir, "A")
+ A_COPY_path = os.path.join(sbox.wc_dir, "A_COPY")
+ beta_COPY_path = os.path.join(sbox.wc_dir, "A_COPY", "B", "E", "beta")
+ mu_COPY_path = os.path.join(sbox.wc_dir, "A_COPY", "mu")
+
+ # Using cherrypick merges, simulate a series of sync merges from A to
+ # A_COPY with a replace of A_COPY along the way.
+ #
+ # r6 - Merge r3 from A to A_COPY
+ svntest.main.run_svn(None, 'up', wc_dir)
+ svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path,
+ '-c3')
+ svntest.main.run_svn(None, 'ci', '-m', 'Merge r3 from A to A_COPY', wc_dir)
+
+ # r8 - Merge r4 from A to A_COPY
+ svntest.main.run_svn(None, 'up', wc_dir)
+ svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path,
+ '-c4')
+ svntest.main.run_svn(None, 'ci', '-m', 'Merge r4 from A to A_COPY', wc_dir)
+
+ # r9 - Merge r5 from A to A_COPY. Make an additional edit to
+ # A_COPY/B/E/beta.
+ svntest.main.run_svn(None, 'up', wc_dir)
+ svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path,
+ '-c5')
+ svntest.main.file_write(beta_COPY_path, "Branch edit mistake.\n")
+ svntest.main.run_svn(None, 'ci', '-m', 'Merge r5 from A to A_COPY', wc_dir)
+
+ # r10 - Delete A_COPY and replace it with A_COPY@8. This removes the edit
+ # we made above in r9 to A_COPY/B/E/beta.
+ svntest.main.run_svn(None, 'up', wc_dir)
+ svntest.main.run_svn(None, 'delete', A_COPY_path)
+ svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A_COPY@8',
+ A_COPY_path)
+ svntest.main.run_svn(None, 'ci', '-m', 'Replace A_COPY with A_COPY@8',
+ wc_dir)
+
+ # r11 - Make an edit on A_COPY/mu.
+ svntest.main.file_write(mu_COPY_path, "Branch edit.\n")
+ svntest.main.run_svn(None, 'ci', '-m', 'Branch edit',
+ wc_dir)
+
+ # r12 - Do a final sync merge of A to A_COPY in preparation for
+ # reintegration.
+ svntest.main.run_svn(None, 'up', wc_dir)
+ svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path)
+ svntest.main.run_svn(None, 'ci', '-m', 'Sycn A_COPY with A', wc_dir)
+
+ # Reintegrate A_COPY to A. The resulting mergeinfo should be
+ # '/A_COPY:2-8,10-12' because of the replacement which removed /A_COPY:9
+ # from the reintegrate source's history.
+ svntest.main.run_svn(None, 'up', wc_dir)
+ expected_output = wc.State(A_path, {
+ 'mu' : Item(status='U '),
+ })
+ expected_mergeinfo_output = wc.State(A_path, {
+ '' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(A_path, {
+ })
+ expected_status = wc.State(A_path, {
+ '' : Item(status=' M'),
+ 'B' : Item(status=' '),
+ 'mu' : Item(status='M '),
+ 'B/E' : Item(status=' '),
+ 'B/E/alpha' : Item(status=' '),
+ 'B/E/beta' : Item(status=' '),
+ 'B/lambda' : Item(status=' '),
+ 'B/F' : Item(status=' '),
+ 'C' : Item(status=' '),
+ 'D' : Item(status=' '),
+ 'D/G' : Item(status=' '),
+ 'D/G/pi' : Item(status=' '),
+ 'D/G/rho' : Item(status=' '),
+ 'D/G/tau' : Item(status=' '),
+ 'D/gamma' : Item(status=' '),
+ 'D/H' : Item(status=' '),
+ 'D/H/chi' : Item(status=' '),
+ 'D/H/psi' : Item(status=' '),
+ 'D/H/omega' : Item(status=' '),
+ })
+ expected_status.tweak(wc_rev=12)
+ expected_disk = wc.State('', {
+ # This test currently fails because the resulting mergeinfo is
+ # /A_COPY:2-12, even though the changes in A_COPY:9 are *not*
+ # present on A.
+ '' : Item(props={SVN_PROP_MERGEINFO : '/A_COPY:2-8,10-12'}),
+ 'B' : Item(),
+ 'mu' : Item("Branch edit.\n"),
+ 'B/E' : Item(),
+ 'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+ 'B/E/beta' : Item("New content"),
+ 'B/lambda' : Item("This is the file 'lambda'.\n"),
+ 'B/F' : Item(),
+ 'C' : Item(),
+ 'D' : Item(),
+ 'D/G' : Item(),
+ 'D/G/pi' : Item("This is the file 'pi'.\n"),
+ 'D/G/rho' : Item("New content"),
+ 'D/G/tau' : Item("This is the file 'tau'.\n"),
+ 'D/gamma' : Item("This is the file 'gamma'.\n"),
+ 'D/H' : Item(),
+ 'D/H/chi' : Item("This is the file 'chi'.\n"),
+ 'D/H/psi' : Item("New content"),
+ 'D/H/omega' : Item("New content"),
+ })
+ expected_skip = wc.State(A_path, { })
+ svntest.actions.run_and_verify_merge(A_path, None, None,
+ sbox.repo_url + '/A_COPY', None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ [], None, None, None, None, True, True,
+ '--reintegrate', A_path)
+
########################################################################
# Run the tests
@@ -2361,6 +2623,8 @@ test_list = [ None,
added_subtrees_with_mergeinfo_break_reintegrate,
two_URL_merge_removes_valid_mergeinfo_from_target,
reintegrate_creates_bogus_mergeinfo,
+ no_source_subtree_mergeinfo,
+ reintegrate_replaced_source,
]
if __name__ == '__main__':
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/merge_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/merge_tests.py Wed Jul 20 13:06:00 2011
@@ -12023,7 +12023,7 @@ def subtree_source_missing_in_requested_
sbox.build()
wc_dir = sbox.wc_dir
- # Make a branche to merge to.
+ # Make a branch to merge to.
wc_disk, wc_status = set_up_branch(sbox, False, 1)
# Some paths we'll care about.
@@ -12033,16 +12033,14 @@ def subtree_source_missing_in_requested_
psi_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "H", "psi")
omega_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "H", "omega")
- # r7 Delete a A/D/H/psi.
+ # r7 Delete A/D/H/psi.
svntest.actions.run_and_verify_svn(None, None, [],
'delete', psi_path)
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ci', '-m', 'delete psi', wc_dir)
+ sbox.simple_commit(message='delete psi')
# r8 - modify A/D/H/omega.
svntest.main.file_write(os.path.join(omega_path), "Even newer content")
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ci', '-m', 'modify omega', wc_dir)
+ sbox.simple_commit(message='modify omega')
# r9 - Merge r3 to A_COPY/D/H/psi
expected_output = expected_merge_output(
@@ -12052,9 +12050,7 @@ def subtree_source_missing_in_requested_
'merge', '-c', '3',
sbox.repo_url + '/A/D/H/psi@3',
psi_COPY_path)
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ci', '-m', 'merge r3 to A_COPY/D/H/psi',
- wc_dir)
+ sbox.simple_commit(message='merge r3 to A_COPY/D/H/psi')
# r10 - Merge r6 to A_COPY/D/H/omega.
expected_output = expected_merge_output(
@@ -12064,9 +12060,7 @@ def subtree_source_missing_in_requested_
'merge', '-c', '6',
sbox.repo_url + '/A/D/H/omega',
omega_COPY_path)
- svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
- 'merge r6 to A_COPY',
- wc_dir)
+ sbox.simple_commit(message='merge r6 to A_COPY')
svntest.actions.run_and_verify_svn(None, exp_noop_up_out(10), [], 'up',
wc_dir)
@@ -12093,17 +12087,14 @@ def subtree_source_missing_in_requested_
'merge', '-c', '8',
sbox.repo_url + '/A',
A_COPY_path, '--record-only')
- svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
- 'merge r8 to A_COPY/D/H/omega',
- wc_dir)
+ sbox.simple_commit(message='merge r8 to A_COPY/D/H/omega')
svntest.actions.run_and_verify_svn(None, exp_noop_up_out(11), [], 'up',
wc_dir)
# r12 - modify A/D/H/omega yet again.
svntest.main.file_write(os.path.join(omega_path),
"Now with fabulous new content!")
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ci', '-m', 'modify omega', wc_dir)
+ sbox.simple_commit(message='modify omega')
# r13 - Merge all available revs to A_COPY/D/H/omega.
expected_output = expected_merge_output(
@@ -12113,9 +12104,7 @@ def subtree_source_missing_in_requested_
'merge',
sbox.repo_url + '/A/D/H/omega',
omega_COPY_path)
- svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
- 'cherry harvest to A_COPY/D/H/omega',
- wc_dir)
+ sbox.simple_commit(message='cherry harvest to A_COPY/D/H/omega')
svntest.actions.run_and_verify_svn(None, exp_noop_up_out(13), [], 'up',
wc_dir)
@@ -12276,9 +12265,7 @@ def subtree_source_missing_in_requested_
'merge', '-c', '12',
sbox.repo_url + '/A',
A_COPY_path, '--record-only')
- svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
- 'Merge r12 to A_COPY',
- wc_dir)
+ sbox.simple_commit(message='Merge r12 to A_COPY')
# Update A_COPY/D/H/rho back to r13 so it's mergeinfo doesn't include
# r12. Then merge a range, -r6:12 which should delete a subtree
@@ -13759,14 +13746,12 @@ def subtree_gets_changes_even_if_ultimat
# r7: Make an additional text mod to A/D/H/psi.
svntest.main.file_write(psi_path, "Even newer content")
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ci', '-m', 'mod psi', wc_dir)
+ sbox.simple_commit(message='mod psi')
# r8: Delete A/D/H/psi.
svntest.actions.run_and_verify_svn(None, None, [],
'delete', psi_path)
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ci', '-m', 'delete psi', wc_dir)
+ sbox.simple_commit(message='delete psi')
# Update WC before merging so mergeinfo elision and inheritance
# occur smoothly.
@@ -13812,11 +13797,8 @@ def subtree_gets_changes_even_if_ultimat
['G ' + psi_COPY_path + '\n',
' G ' + psi_COPY_path + '\n',]),
[], 'merge', '-c-7', sbox.repo_url + '/A/D/H/psi@7', psi_COPY_path)
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ci', '-m',
- 'merge -c3,7 from A/D/H,' \
- 'reverse merge -c-7 from A/D/H/psi',
- wc_dir)
+ sbox.simple_commit(message='merge -c3,7 from A/D/H,' \
+ 'reverse merge -c-7 from A/D/H/psi')
# Merge all available revisions from A/D/H to A_COPY/D/H. This merge
# ultimately tries to delete A_COPY/D/H/psi, but first it should merge
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/prop_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/prop_tests.py Wed Jul 20 13:06:00 2011
@@ -138,6 +138,7 @@ def commit_props(sbox):
#----------------------------------------------------------------------
+@Issue(3951)
def update_props(sbox):
"receive properties via update"
Propchange: subversion/branches/svn-bisect/subversion/tests/cmdline/redirect_tests.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/stat_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/stat_tests.py Wed Jul 20 13:06:00 2011
@@ -797,13 +797,14 @@ def status_on_unversioned_dotdot(sbox):
sbox.build(read_only = True)
wc_dir = sbox.wc_dir
- new_dir = os.path.join(wc_dir, 'new_dir')
- new_subdir = os.path.join(new_dir, 'new_subdir')
+ new_dir = sbox.ospath('new')
+ new_sub = sbox.ospath('new/sub')
+ new_subsub = sbox.ospath('new/sub/sub')
os.mkdir(new_dir)
- os.mkdir(new_subdir)
-
- os.chdir(new_subdir)
+ os.mkdir(new_sub)
+ os.mkdir(new_subsub)
+ os.chdir(new_subsub)
exit_code, out, err = svntest.main.run_svn(1, 'st', '..')
for line in err:
if line.find('svn: warning: W155007: \'..\' is not a working copy') != -1:
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/svnadmin_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/svnadmin_tests.py Wed Jul 20 13:06:00 2011
@@ -465,7 +465,7 @@ def fsfs_file(repo_dir, kind, rev):
if svntest.main.options.fsfs_sharding is None:
return os.path.join(repo_dir, 'db', kind, '0', rev)
else:
- shard = int(rev) // svntest.main.fsfs_sharding
+ shard = int(rev) // svntest.main.options.fsfs_sharding
path = os.path.join(repo_dir, 'db', kind, str(shard), rev)
if svntest.main.options.fsfs_packing is None or kind == 'revprops':
@@ -970,7 +970,7 @@ def verify_with_invalid_revprops(sbox):
if svntest.verify.verify_outputs(
"Output of 'svnadmin verify' is unexpected.", None, errput, None,
- ".*Malformed file"):
+ ".*svnadmin: E200002:.*"):
raise svntest.Failure
#----------------------------------------------------------------------
@@ -1320,6 +1320,7 @@ text
# However, the verification triggered by this test is in the repos layer
# so it will trigger with either backend anyway.
@SkipUnless(svntest.main.is_fs_type_fsfs)
+@SkipUnless(svntest.main.server_enforces_UTF8_fspaths_in_verify)
def verify_non_utf8_paths(sbox):
"svnadmin verify with non-UTF-8 paths"
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/svnserveautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/svnserveautocheck.sh?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/svnserveautocheck.sh (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/svnserveautocheck.sh Wed Jul 20 13:06:00 2011
@@ -39,7 +39,7 @@ SCRIPT=$(basename $0)
set +e
-trap trap_cleanup SIGHUP SIGTERM SIGINT
+trap trap_cleanup HUP TERM INT
# Ensure the server uses a known locale.
LC_ALL=C
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/svnsync_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/svnsync_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/svnsync_tests.py Wed Jul 20 13:06:00 2011
@@ -28,7 +28,7 @@
import sys, os
# Test suite-specific modules
-import locale
+import locale, re
# Our testing module
import svntest
@@ -76,6 +76,9 @@ def run_sync(url, source_url=None, expec
args.append(source_prop_encoding)
exit_code, output, errput = svntest.main.run_svnsync(*args)
+ for index, line in enumerate(errput[:]):
+ if re.search("warning: W200007", line):
+ del errput[index]
if errput:
if expected_error is None:
raise SVNUnexpectedStderr(errput)
@@ -101,6 +104,9 @@ def run_copy_revprops(url, source_url, e
args.append(source_prop_encoding)
exit_code, output, errput = svntest.main.run_svnsync(*args)
+ for index, line in enumerate(errput[:]):
+ if re.search("warning: W200007", line):
+ del errput[index]
if errput:
if expected_error is None:
raise SVNUnexpectedStderr(errput)
@@ -126,6 +132,9 @@ def run_init(dst_url, src_url, source_pr
args.append(source_prop_encoding)
exit_code, output, errput = svntest.main.run_svnsync(*args)
+ for index, line in enumerate(errput[:]):
+ if re.search("warning: W200007", line):
+ del errput[index]
if errput:
raise SVNUnexpectedStderr(errput)
if output != ['Copied properties for revision 0.\n']:
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/actions.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/actions.py Wed Jul 20 13:06:00 2011
@@ -350,11 +350,37 @@ def run_and_verify_svnrdump(dumpfile_con
if sys.platform == 'win32':
err = map(lambda x : x.replace('\r\n', '\n'), err)
+ for index, line in enumerate(err[:]):
+ if re.search("warning: W200007", line):
+ del err[index]
+
verify.verify_outputs("Unexpected output", output, err,
expected_stdout, expected_stderr)
verify.verify_exit_code("Unexpected return code", exit_code, expected_exit)
return output
+
+def run_and_verify_svnmucc(message, expected_stdout, expected_stderr,
+ *varargs):
+ """Run svnmucc command and check its output"""
+
+ expected_exit = 0
+ if expected_stderr is not None and expected_stderr != []:
+ expected_exit = 1
+ return run_and_verify_svnmucc2(message, expected_stdout, expected_stderr,
+ expected_exit, *varargs)
+
+def run_and_verify_svnmucc2(message, expected_stdout, expected_stderr,
+ expected_exit, *varargs):
+ """Run svnmucc command and check its output and exit code."""
+
+ exit_code, out, err = main.run_svnmucc(*varargs)
+ verify.verify_outputs("Unexpected output", out, err,
+ expected_stdout, expected_stderr)
+ verify.verify_exit_code(message, exit_code, expected_exit)
+ return exit_code, out, err
+
+
def load_repo(sbox, dumpfile_path = None, dump_str = None,
bypass_prop_validation = False):
"Loads the dumpfile into sbox"
@@ -921,7 +947,7 @@ def run_and_verify_info(expected_infos,
if value is not None and key not in actual:
raise main.SVNLineUnequal("Expected key '%s' (with value '%s') "
"not found" % (key, value))
- if value is not None and not re.search(value, actual[key]):
+ if value is not None and not re.match(value, actual[key]):
raise verify.SVNUnexpectedStdout("Values of key '%s' don't match:\n"
" Expected: '%s' (regex)\n"
" Found: '%s' (string)\n"
Propchange: subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/err.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/main.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/main.py Wed Jul 20 13:06:00 2011
@@ -164,6 +164,8 @@ entriesdump_binary = os.path.abspath('en
atomic_ra_revprop_change_binary = os.path.abspath('atomic-ra-revprop-change' + \
_exe)
wc_lock_tester_binary = os.path.abspath('../libsvn_wc/wc-lock-tester' + _exe)
+svnmucc_binary=os.path.abspath('../../../tools/client-side/svnmucc/svnmucc' + \
+ _exe)
# Location to the pristine repository, will be calculated from test_area_url
# when we know what the user specified for --url.
@@ -579,6 +581,13 @@ def _with_auth(args):
else:
return args + ('--username', wc_author )
+def _with_log_message(args):
+
+ if '-m' in args or '--message' in args or '-F' in args:
+ return args
+ else:
+ return args + ('--message', 'default log message')
+
# For running subversion and returning the output
def run_svn(error_expected, *varargs):
"""Run svn with VARARGS; return exit code as int; stdout, stderr as
@@ -606,7 +615,7 @@ def run_svnrdump(stdin_input, *varargs):
"""Run svnrdump with VARARGS, returns exit code as int; stdout, stderr as
list of lines (including line terminators). Use binary mode for output."""
if stdin_input:
- return run_command_stdin(svnrdump_binary, 0, 1, 1, stdin_input,
+ return run_command_stdin(svnrdump_binary, 1, 1, 1, stdin_input,
*(_with_auth(_with_config_dir(varargs))))
else:
return run_command(svnrdump_binary, 1, 1,
@@ -622,6 +631,12 @@ def run_svnversion(*varargs):
as list of lines (including line terminators)."""
return run_command(svnversion_binary, 1, 0, *varargs)
+def run_svnmucc(*varargs):
+ """Run svnmucc with VARARGS, returns exit code as int; stdout, stderr as
+ list of lines (including line terminators). Use binary mode for output."""
+ return run_command(svnmucc_binary, 1, 1,
+ *(_with_auth(_with_config_dir(_with_log_message(varargs)))))
+
def run_entriesdump(path):
"""Run the entries-dump helper, returning a dict of Entry objects."""
# use spawn_process rather than run_command to avoid copying all the data
@@ -740,12 +755,12 @@ def create_repos(path):
os.makedirs(path) # this creates all the intermediate dirs, if neccessary
opts = ("--bdb-txn-nosync",)
- if options.server_minor_version < 5:
+ if options.server_minor_version < 4:
+ opts += ("--pre-1.4-compatible",)
+ elif options.server_minor_version < 5:
opts += ("--pre-1.5-compatible",)
elif options.server_minor_version < 6:
opts += ("--pre-1.6-compatible",)
- elif options.server_minor_version < 7:
- opts += ("--pre-1.7-compatible",)
if options.fs_type is not None:
opts += ("--fs-type=" + options.fs_type,)
exit_code, stdout, stderr = run_command(svnadmin_binary, 1, 0, "create",
@@ -1111,6 +1126,9 @@ def server_gets_client_capabilities():
def server_has_partial_replay():
return options.server_minor_version >= 5
+def server_enforces_UTF8_fspaths_in_verify():
+ return options.server_minor_version >= 6
+
def server_enforces_date_syntax():
return options.server_minor_version >= 5
@@ -1519,8 +1537,11 @@ def _parse_options(arglist=sys.argv[1:])
parser.error("'verbose' and 'quiet' are incompatible")
if options.fsfs_packing and not options.fsfs_sharding:
parser.error("--fsfs-packing requires --fsfs-sharding")
- if options.server_minor_version < 4 or options.server_minor_version > 7:
- parser.error("test harness only supports server minor versions 4-7")
+
+ # If you change the below condition then change
+ # ../../../../build/run_tests.py too.
+ if options.server_minor_version < 3 or options.server_minor_version > 7:
+ parser.error("test harness only supports server minor versions 3-7")
if options.url:
if options.url[-1:] == '/': # Normalize url to have no trailing slash
@@ -1600,6 +1621,7 @@ def execute_tests(test_list, serial_only
global svnsync_binary
global svndumpfilter_binary
global svnversion_binary
+ global svnmucc_binary
global options
if test_name:
@@ -1675,6 +1697,7 @@ def execute_tests(test_list, serial_only
'jsvndumpfilter' + _bat)
svnversion_binary = os.path.join(options.svn_bin,
'jsvnversion' + _bat)
+ svnversion_binary = os.path.join(options.svn_bin, 'jsvnmucc' + _bat)
else:
if options.svn_bin:
svn_binary = os.path.join(options.svn_bin, 'svn' + _exe)
@@ -1684,6 +1707,7 @@ def execute_tests(test_list, serial_only
svndumpfilter_binary = os.path.join(options.svn_bin,
'svndumpfilter' + _exe)
svnversion_binary = os.path.join(options.svn_bin, 'svnversion' + _exe)
+ svnmucc_binary = os.path.join(options.svn_bin, 'svnmucc' + _exe)
######################################################################
Propchange: subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/objects.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/sandbox.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/sandbox.py Wed Jul 20 13:06:00 2011
@@ -204,16 +204,18 @@ class Sandbox:
target = self.ospath(target)
svntest.main.run_svn(False, 'switch', url, target, '--ignore-ancestry')
- def simple_commit(self, target=None):
- """Commit the WC or TARGET with a default log message.
+ def simple_commit(self, target=None, message=None):
+ """Commit the WC or TARGET, with a default or supplied log message.
+ Raise if the exit code is non-zero or there is output on stderr.
TARGET is a relpath relative to the WC."""
assert not self.read_only
if target is None:
target = self.wc_dir
else:
target = self.ospath(target)
- svntest.main.run_svn(False, 'commit',
- '-m', svntest.main.make_log_msg(),
+ if message is None:
+ message = svntest.main.make_log_msg()
+ svntest.main.run_svn(False, 'commit', '-m', message,
target)
def simple_rm(self, *targets):
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/wc.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/svntest/wc.py Wed Jul 20 13:06:00 2011
@@ -135,10 +135,18 @@ class State:
self.desc[path] = item
def remove(self, *paths):
- "Remove a path from the state (the path must exist)."
+ "Remove PATHS from the state (the paths must exist)."
for path in paths:
del self.desc[to_relpath(path)]
+ def remove_subtree(self, *paths):
+ "Remove PATHS recursively from the state (the paths must exist)."
+ for subtree_path in paths:
+ subtree_path = to_relpath(subtree_path)
+ for path, item in self.desc.items():
+ if path == subtree_path or path[:len(subtree_path) + 1] == subtree_path + '/':
+ del self.desc[path]
+
def copy(self, new_root=None):
"""Make a deep copy of self. If NEW_ROOT is not None, then set the
copy's wc_dir NEW_ROOT instead of to self's wc_dir."""
@@ -180,13 +188,12 @@ class State:
def subtree(self, subtree_path):
"""Return a State object which is a deep copy of the sub-tree
- identified by SUBTREE_PATH (which is assumed to contain only one
- element rooted at the tree of this State object's WC_DIR)."""
+ beneath SUBTREE_PATH (which is assumed to be rooted at the tree of
+ this State object's WC_DIR). Exclude SUBTREE_PATH itself."""
desc = { }
for path, item in self.desc.items():
- path_elements = path.split("/")
- if len(path_elements) > 1 and path_elements[0] == subtree_path:
- desc["/".join(path_elements[1:])] = item.copy()
+ if path[:len(subtree_path) + 1] == subtree_path + '/':
+ desc[path[len(subtree_path) + 1:]] = item.copy()
return State(self.wc_dir, desc)
def write_to_disk(self, target_dir):
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/switch_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/switch_tests.py Wed Jul 20 13:06:00 2011
@@ -2856,6 +2856,56 @@ def up_to_old_rev_with_subtree_switched_
# Now update the WC to r1.
svntest.actions.run_and_verify_svn(None, None, [], 'up', '-r1', wc_dir)
+def different_node_kind(sbox):
+ "switch to a different node kind"
+ sbox.build(read_only = True)
+ os.chdir(sbox.wc_dir)
+ sbox.wc_dir = ''
+
+ pristine_disk = svntest.main.greek_state
+ pristine_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+ expected_disk = pristine_disk.copy()
+ expected_status = pristine_status.copy()
+
+ def switch_to_dir(sbox, rel_url, rel_path):
+ full_url = sbox.repo_url + '/' + rel_url
+ full_path = sbox.ospath(rel_path)
+ expected_disk.remove(rel_path)
+ expected_disk.add({ rel_path : pristine_disk.desc[rel_url] })
+ expected_disk.add_state(rel_path, pristine_disk.subtree(rel_url))
+ expected_status.tweak(rel_path, switched='S')
+ expected_status.add_state(rel_path, pristine_status.subtree(rel_url))
+ svntest.actions.run_and_verify_switch(sbox.wc_dir, full_path, full_url,
+ None, expected_disk, expected_status,
+ None, None, None, None, None, False,
+ '--ignore-ancestry')
+ svntest.actions.run_and_verify_svn(None, None, [], 'info', full_path)
+ if not os.path.isdir(full_path):
+ raise svntest.Failure
+
+ def switch_to_file(sbox, rel_url, rel_path):
+ full_url = sbox.repo_url + '/' + rel_url
+ full_path = sbox.ospath(rel_path)
+ expected_disk.remove_subtree(rel_path)
+ expected_disk.add({ rel_path : pristine_disk.desc[rel_url] })
+ expected_status.remove_subtree(rel_path)
+ expected_status.add({ rel_path : pristine_status.desc[rel_url] })
+ expected_status.tweak(rel_path, switched='S')
+ svntest.actions.run_and_verify_switch(sbox.wc_dir, full_path, full_url,
+ None, expected_disk, expected_status,
+ None, None, None, None, None, False,
+ '--ignore-ancestry')
+ svntest.actions.run_and_verify_svn(None, None, [], 'info', full_path)
+ if not os.path.isfile(full_path):
+ raise svntest.Failure
+
+ # Switch two files to dirs and two dirs to files.
+ # 'A/C' is an empty dir; 'A/D/G' is a non-empty dir.
+ switch_to_dir(sbox, 'A/C', 'iota')
+ switch_to_dir(sbox, 'A/D/G', 'A/D/gamma')
+ switch_to_file(sbox, 'iota', 'A/C')
+ switch_to_file(sbox, 'A/D/gamma', 'A/D/G')
+
########################################################################
# Run the tests
@@ -2895,6 +2945,7 @@ test_list = [ None,
tree_conflicts_on_switch_3,
copy_with_switched_subdir,
up_to_old_rev_with_subtree_switched_to_root,
+ different_node_kind,
]
if __name__ == '__main__':
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/tree_conflict_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/tree_conflict_tests.py Wed Jul 20 13:06:00 2011
@@ -479,7 +479,7 @@ def ensure_tree_conflict(sbox, operation
incoming_right_rev = source_right_rev
else:
incoming_right_rev = head_rev
- expected_info = { 'Tree conflict' : operation +
+ expected_info = { 'Tree conflict' : '.* upon ' + operation +
r'.* \((none|(file|dir).*' +
re.escape(victim_name + '@' + str(incoming_left_rev)) + r')' +
r'.* \((none|(file|dir).*' +
@@ -1164,10 +1164,8 @@ def actual_only_node_behaviour(sbox):
run_and_verify_svn(None, expected_stdout, expected_stderr,
"cat", "-r", "BASE", foo_path)
# changelist (cl)
- ### this does not error out -- needs review
- ### the item does not end up in the changelist so this is a cosmetic problem
expected_stdout = None
- expected_stderr = []
+ expected_stderr = ".*svn: warning: W155010: The node '.*foo' was not found."
run_and_verify_svn(None, expected_stdout, expected_stderr,
"changelist", "my_changelist", foo_path)
@@ -1226,8 +1224,6 @@ def actual_only_node_behaviour(sbox):
'Name': 'foo',
'Schedule': 'normal',
'Node Kind': 'none',
- 'Depth': 'empty', ### is this right?
- 'Copied From Rev': '0',
'Path': re.escape(sbox.ospath('A/foo')),
}
run_and_verify_info([expected_info], foo_path)
@@ -1303,11 +1299,10 @@ def actual_only_node_behaviour(sbox):
"propget", "svn:eol-style", foo_path)
# proplist (plist, pl)
- ### proplist does exit(0) -- is that expected?
expected_stdout = None
expected_stderr = ".*foo.*is not under version control.*"
- svntest.actions.run_and_verify_svn2(None, expected_stdout, expected_stderr,
- 0, "proplist", foo_path)
+ svntest.actions.run_and_verify_svn(None, expected_stdout, expected_stderr,
+ "proplist", foo_path)
# propset (pset, ps)
expected_stdout = None
@@ -1365,7 +1360,7 @@ def actual_only_node_behaviour(sbox):
# update (up)
expected_stdout = [
- "Skipped '%s'\n" % sbox.ospath('A/foo'),
+ "Skipped '%s' -- Node remains in conflict\n" % sbox.ospath('A/foo'),
"Summary of conflicts:\n",
" Skipped paths: 1\n",
]
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/update_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/update_tests.py Wed Jul 20 13:06:00 2011
@@ -5342,6 +5342,68 @@ def revive_children_of_copy(sbox):
if not os.path.exists(psi2_path):
raise svntest.Failure('psi unexpectedly non-existent')
+@SkipUnless(svntest.main.is_os_windows)
+def skip_access_denied(sbox):
+ """access denied paths should be skipped"""
+
+ # We need something to lock the file. 'msvcrt' looks common on Windows
+ try:
+ import msvcrt
+ except ImportError:
+ raise svntest.Skip
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ iota = sbox.ospath('iota')
+
+ svntest.main.file_write(iota, 'Q')
+ sbox.simple_commit()
+ sbox.simple_update() # Update to r2
+
+ # Open iota for writing to keep an handle open
+ f = open(iota, 'w')
+
+ # Write new text of exactly the same size to avoid the early out
+ # on a different size without properties.
+ f.write('R')
+ f.flush()
+
+ # And lock the first byte of the file
+ msvcrt.locking(f.fileno(), 1, 1)
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'iota' : Item(verb='Skipped'),
+ })
+
+ # Create expected status tree: iota isn't updated
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('iota', status='M ', wc_rev=2)
+
+ # And now check that update skips the path
+ # *and* status shows the path as modified.
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ None,
+ expected_status,
+ None,
+ None, None,
+ None, None, None, wc_dir, '-r', '1')
+
+ f.close()
+
+def update_to_HEAD_plus_1(sbox):
+ "updating to HEAD+1 should fail"
+
+ sbox.build(read_only = True)
+ wc_dir = sbox.wc_dir
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ None, None, None,
+ ".*No such revision",
+ None, None,
+ None, None, None, wc_dir, '-r', '2')
+
#######################################################################
# Run the tests
@@ -5407,6 +5469,8 @@ test_list = [ None,
update_with_file_lock_and_keywords_property_set,
update_nonexistent_child_of_copy,
revive_children_of_copy,
+ skip_access_denied,
+ update_to_HEAD_plus_1,
]
if __name__ == '__main__':
Modified: subversion/branches/svn-bisect/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/cmdline/upgrade_tests.py?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/svn-bisect/subversion/tests/cmdline/upgrade_tests.py Wed Jul 20 13:06:00 2011
@@ -382,6 +382,25 @@ def xml_entries_relocate(path, from_url,
if os.path.isdir(os.path.join(item_path, adm_name)):
xml_entries_relocate(item_path, from_url, to_url)
+# Poor mans relocate to fix up an working copy to refer to a
+# valid repository, so svn upgrade can do its work on it
+def simple_entries_replace(path, from_url, to_url):
+ adm_name = svntest.main.get_admin_name()
+ entries = os.path.join(path, adm_name, 'entries')
+ txt = open(entries).read().replace(from_url, to_url)
+ os.chmod(entries, 0777)
+ open(entries, 'wb').write(txt)
+
+ for dirent in os.listdir(path):
+ item_path = os.path.join(path, dirent)
+
+ if dirent == svntest.main.get_admin_name():
+ continue
+
+ if os.path.isdir(os.path.join(item_path, adm_name)):
+ simple_entries_replace(item_path, from_url, to_url)
+
+
def basic_upgrade_1_0(sbox):
"test upgrading a working copy created with 1.0.0"
@@ -630,10 +649,10 @@ def missing_dirs(sbox):
'A' : Item(status=' ', wc_rev='1'),
'A/mu' : Item(status=' ', wc_rev='1'),
'A/C' : Item(status=' ', wc_rev='1'),
- 'A/D' : Item(status='! ', wc_rev='-'),
+ 'A/D' : Item(status='! ', wc_rev='1'),
'A/B' : Item(status=' ', wc_rev='1'),
'A/B/F' : Item(status=' ', wc_rev='1'),
- 'A/B/E' : Item(status='! ', wc_rev='-'),
+ 'A/B/E' : Item(status='! ', wc_rev='1'),
'A/B/lambda' : Item(status=' ', wc_rev='1'),
'iota' : Item(status=' ', wc_rev='1'),
'A/B_new' : Item(status='A ', wc_rev='-', copied='+'),
@@ -659,10 +678,10 @@ def missing_dirs2(sbox):
'A' : Item(status=' ', wc_rev='1'),
'A/mu' : Item(status=' ', wc_rev='1'),
'A/C' : Item(status=' ', wc_rev='1'),
- 'A/D' : Item(status='! ', wc_rev='-'),
+ 'A/D' : Item(status='! ', wc_rev='1'),
'A/B' : Item(status=' ', wc_rev='1'),
'A/B/F' : Item(status=' ', wc_rev='1'),
- 'A/B/E' : Item(status='! ', wc_rev='-'),
+ 'A/B/E' : Item(status='! ', wc_rev='1'),
'A/B/lambda' : Item(status=' ', wc_rev='1'),
'iota' : Item(status=' ', wc_rev='1'),
'A/B_new' : Item(status='A ', wc_rev='-', copied='+'),
@@ -706,8 +725,8 @@ def dirs_only_upgrade(sbox):
replace_sbox_with_tarfile(sbox, 'dirs-only.tar.bz2')
- expected_output = ["Upgraded '%s'.\n" % (sbox.ospath('').rstrip(os.path.sep)),
- "Upgraded '%s'.\n" % (sbox.ospath('A'))]
+ expected_output = ["Upgraded '%s'\n" % (sbox.ospath('').rstrip(os.path.sep)),
+ "Upgraded '%s'\n" % (sbox.ospath('A'))]
svntest.actions.run_and_verify_svn(None, expected_output, [],
'upgrade', sbox.wc_dir)
@@ -1017,6 +1036,64 @@ def add_add_x2(sbox):
})
run_and_verify_status_no_server(sbox.wc_dir, expected_status)
+@Issue(3940)
+def upgrade_with_missing_subdir(sbox):
+ "test upgrading a working copy with missing subdir"
+
+ sbox.build(create_wc = False)
+ replace_sbox_with_tarfile(sbox, 'basic_upgrade.tar.bz2')
+
+ simple_entries_replace(sbox.wc_dir,
+ 'file:///Users/Hyrum/dev/test/greek-1.6.repo',
+ sbox.repo_url)
+
+ svntest.main.run_svnadmin('setuuid', sbox.repo_dir,
+ 'cafefeed-babe-face-dead-beeff00dfade')
+
+ url = sbox.repo_url
+ wc_dir = sbox.wc_dir
+
+ # Attempt to use the working copy, this should give an error
+ expected_stderr = wc_is_too_old_regex
+ svntest.actions.run_and_verify_svn(None, None, expected_stderr,
+ 'info', sbox.wc_dir)
+
+ # Now remove a subdirectory
+ svntest.main.safe_rmtree(sbox.ospath('A/B'))
+
+ # Now upgrade the working copy and expect a missing subdir
+ expected_output = [
+ "Upgraded '%s'\n" % sbox.wc_dir,
+ "Upgraded '%s'\n" % sbox.ospath('A'),
+ "Skipped '%s'\n" % sbox.ospath('A/B'),
+ "Upgraded '%s'\n" % sbox.ospath('A/C'),
+ "Upgraded '%s'\n" % sbox.ospath('A/D'),
+ "Upgraded '%s'\n" % sbox.ospath('A/D/G'),
+ "Upgraded '%s'\n" % sbox.ospath('A/D/H'),
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'upgrade', sbox.wc_dir)
+
+ # And now perform an update. (This used to fail with an assertion)
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B' : Item(verb='Restored'),
+ 'A/B/E' : Item(status='A '),
+ 'A/B/E/alpha' : Item(status='A '),
+ 'A/B/E/beta' : Item(status='A '),
+ 'A/B/lambda' : Item(status='A '),
+ 'A/B/F' : Item(status='A '),
+ })
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+
+ # Do the update and check the results in three ways.
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status)
+
+
########################################################################
# Run the tests
@@ -1063,6 +1140,7 @@ test_list = [ None,
depth_exclude_2,
add_add_del_del_tc,
add_add_x2,
+ upgrade_with_missing_subdir,
]
Modified: subversion/branches/svn-bisect/subversion/tests/libsvn_fs_base/fs-base-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/libsvn_fs_base/fs-base-test.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/libsvn_fs_base/fs-base-test.c (original)
+++ subversion/branches/svn-bisect/subversion/tests/libsvn_fs_base/fs-base-test.c Wed Jul 20 13:06:00 2011
@@ -1087,13 +1087,6 @@ delete(const svn_test_opts_t *opts,
}
-
-struct node_created_rev_args {
- const char *path;
- svn_revnum_t rev;
-};
-
-
static svn_error_t *
canonicalize_abspath(const svn_test_opts_t *opts,
apr_pool_t *pool)
@@ -1155,7 +1148,6 @@ create_within_copy(const svn_test_opts_t
svn_fs_t *fs;
svn_fs_txn_t *txn;
svn_fs_root_t *txn_root, *rev_root;
- int i;
svn_revnum_t youngest_rev = 0;
/* Create a filesystem and repository. */
@@ -1230,6 +1222,7 @@ create_within_copy(const svn_test_opts_t
"A/D3/down",
"A/D3/J" }
};
+ int i;
SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, spool));
Modified: subversion/branches/svn-bisect/subversion/tests/libsvn_subr/opt-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/libsvn_subr/opt-test.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/libsvn_subr/opt-test.c (original)
+++ subversion/branches/svn-bisect/subversion/tests/libsvn_subr/opt-test.c Wed Jul 20 13:06:00 2011
@@ -44,14 +44,19 @@ test_parse_peg_rev(apr_pool_t *pool)
{ "foo/bar@{1999-12-31}", "foo/bar", {svn_opt_revision_date, {0}} },
{ "http://a/b@27", "http://a/b", {svn_opt_revision_number, {27}} },
{ "http://a/b@COMMITTED", "http://a/b", {svn_opt_revision_committed} },
- { "foo/bar@1:2", NULL, {svn_opt_revision_unspecified} },
- { "foo/bar@baz", NULL, {svn_opt_revision_unspecified} },
+ { "http://a/b@{1999-12-31}", "http://a/b",{svn_opt_revision_date, {0}} },
+ { "http://a/b@%7B1999-12-31%7D","http://a/b",{svn_opt_revision_date, {0}} },
+ { "foo/bar@1:2", NULL, {-1} },
+ { "foo/bar@baz", NULL, {-1} },
{ "foo/bar@", "foo/bar", {svn_opt_revision_unspecified} },
+ { "foo/@bar@", "foo/@bar", {svn_opt_revision_unspecified} },
{ "foo/bar/@13", "foo/bar/", {svn_opt_revision_number, {13}} },
{ "foo/bar@@13", "foo/bar@", {svn_opt_revision_number, {13}} },
{ "foo/@bar@HEAD", "foo/@bar", {svn_opt_revision_head} },
{ "foo@/bar", "foo@/bar", {svn_opt_revision_unspecified} },
{ "foo@HEAD/bar", "foo@HEAD/bar", {svn_opt_revision_unspecified} },
+ { "@foo/bar", "@foo/bar", {svn_opt_revision_unspecified} },
+ { "@foo/bar@", "@foo/bar", {svn_opt_revision_unspecified} },
};
for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++)
Modified: subversion/branches/svn-bisect/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/libsvn_wc/db-test.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/svn-bisect/subversion/tests/libsvn_wc/db-test.c Wed Jul 20 13:06:00 2011
@@ -656,7 +656,7 @@ test_inserting_nodes(apr_pool_t *pool)
pool));
/* Replace an incomplete node with an absent file node. */
- SVN_ERR(svn_wc__db_base_add_absent_node(
+ SVN_ERR(svn_wc__db_base_add_excluded_node(
db, svn_dirent_join(local_abspath, "N/N-b", pool),
"N/N-b", ROOT_ONE, UUID_ONE, 3,
svn_wc__db_kind_file, svn_wc__db_status_server_excluded,
@@ -664,7 +664,7 @@ test_inserting_nodes(apr_pool_t *pool)
pool));
/* Create a new excluded directory node. */
- SVN_ERR(svn_wc__db_base_add_absent_node(
+ SVN_ERR(svn_wc__db_base_add_excluded_node(
db, svn_dirent_join(local_abspath, "P", pool),
"P", ROOT_ONE, UUID_ONE, 3,
svn_wc__db_kind_dir, svn_wc__db_status_excluded,
@@ -680,7 +680,7 @@ test_inserting_nodes(apr_pool_t *pool)
pool));
/* Create a new absent unknown-kind node. */
- SVN_ERR(svn_wc__db_base_add_absent_node(
+ SVN_ERR(svn_wc__db_base_add_excluded_node(
db, svn_dirent_join(local_abspath, "R", pool),
"R", ROOT_ONE, UUID_ONE, 3,
svn_wc__db_kind_unknown, svn_wc__db_status_server_excluded,
@@ -856,14 +856,14 @@ test_pdh(apr_pool_t *pool)
some internal functionality of wc_db. This is a handy driver for
debugging wc_db to ensure it manages per-directory handles properly. */
- SVN_ERR(svn_wc__db_base_add_absent_node(
+ SVN_ERR(svn_wc__db_base_add_excluded_node(
db, svn_dirent_join(local_abspath, "sub", pool),
"sub", ROOT_ONE, UUID_ONE, 1,
svn_wc__db_kind_file, svn_wc__db_status_server_excluded,
NULL, NULL,
pool));
- SVN_ERR(svn_wc__db_base_add_absent_node(
+ SVN_ERR(svn_wc__db_base_add_excluded_node(
db, svn_dirent_join(local_abspath, "sub/A", pool),
"sub/A", ROOT_ONE, UUID_ONE, 1,
svn_wc__db_kind_file, svn_wc__db_status_server_excluded,
Propchange: subversion/branches/svn-bisect/subversion/tests/manual/tree-conflicts-add-vs-add.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/svn-bisect/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/tests/svn_test_fs.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/svn-bisect/subversion/tests/svn_test_fs.c Wed Jul 20 13:06:00 2011
@@ -82,8 +82,7 @@ make_fs_config(const char *fs_type,
if (server_minor_version)
{
if (server_minor_version == 6)
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_7_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ /* no SVN_FS_CONFIG_PRE_1_7_COMPATIBLE */;
else if (server_minor_version == 5)
apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
APR_HASH_KEY_STRING, "1");
Propchange: subversion/branches/svn-bisect/tools/buildbot/master/Feeder.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/svn-bisect/tools/buildbot/master/SVNMailNotifier.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/svn-bisect/tools/buildbot/master/private-sample.py
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/svn-bisect/tools/buildbot/slaves/ubuntu-x64/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/tools/buildbot/slaves/ubuntu-x64/svncheck.sh?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/tools/buildbot/slaves/ubuntu-x64/svncheck.sh (original)
+++ subversion/branches/svn-bisect/tools/buildbot/slaves/ubuntu-x64/svncheck.sh Wed Jul 20 13:06:00 2011
@@ -29,9 +29,9 @@ if test -z "$1" ; then
fi
echo "========= mount RAM disc"
-# ignore the result: if it fails, the test will just take longer...
-mkdir -p subversion/tests/cmdline/svn-test-work
-test -e ../mount-ramdrive && ../mount-ramdrive
+test ! -e /dev/shm/svn-test-work && mkdir /dev/shm/svn-test-work
+test -e subversion/tests/cmdline/svn-test-work && rm -rf subversion/tests/cmdline/svn-test-work
+ln -s /dev/shm/svn-test-work subversion/tests/cmdline/
echo "========= make check"
make check FS_TYPE=$1 CLEANUP=1 || exit $?