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 2013/01/22 00:37:04 UTC
svn commit: r1436688 [9/12] - in /subversion/branches/ev2-export: ./
contrib/client-side/emacs/ notes/commit-access-templates/
subversion/bindings/javahl/native/ subversion/bindings/swig/perl/native/t/
subversion/bindings/swig/ruby/test/ subversion/inc...
Modified: subversion/branches/ev2-export/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/cl-conflicts.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/ev2-export/subversion/svn/cl-conflicts.c Mon Jan 21 23:37:01 2013
@@ -252,7 +252,11 @@ svn_cl__append_conflict_info_xml(svn_str
kind = svn_token__to_word(map_conflict_kind_xml, conflict->kind);
- apr_hash_set(att_hash, "kind", APR_HASH_KEY_STRING, kind);
+ apr_hash_set(att_hash, "type", APR_HASH_KEY_STRING, kind);
+
+ apr_hash_set(att_hash, "operation", APR_HASH_KEY_STRING,
+ svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+
/* "<conflict>" */
svn_xml_make_open_tag_hash(&str, scratch_pool,
Modified: subversion/branches/ev2-export/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/cl.h?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/cl.h (original)
+++ subversion/branches/ev2-export/subversion/svn/cl.h Mon Jan 21 23:37:01 2013
@@ -65,15 +65,11 @@ typedef enum svn_cl__accept_t
svn_cl__accept_working,
/* Resolve the conflicted hunks by choosing the corresponding text
- from the pre-conflict working copy file.
-
- Note: this is a placeholder, not actually implemented in 1.5. */
+ from the pre-conflict working copy file. */
svn_cl__accept_mine_conflict,
/* Resolve the conflicted hunks by choosing the corresponding text
- from the post-conflict base copy file.
-
- Note: this is a placeholder, not actually implemented in 1.5. */
+ from the post-conflict base copy file. */
svn_cl__accept_theirs_conflict,
/* Resolve the conflict by taking the entire pre-conflict working
@@ -186,6 +182,7 @@ typedef struct svn_cl__opt_state_t
{
const char *diff_cmd; /* the external diff command to use */
svn_boolean_t internal_diff; /* override diff_cmd in config file */
+ svn_boolean_t no_diff_added; /* do not show diffs for deleted files */
svn_boolean_t no_diff_deleted; /* do not show diffs for deleted files */
svn_boolean_t show_copies_as_adds; /* do not diff copies with their source */
svn_boolean_t notice_ancestry; /* notice ancestry for diff-y operations */
Modified: subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c Mon Jan 21 23:37:01 2013
@@ -42,6 +42,8 @@
#include "svn_private_config.h"
+#define ARRAY_LEN(ary) ((sizeof (ary)) / (sizeof ((ary)[0])))
+
struct svn_cl__interactive_conflict_baton_t {
@@ -474,7 +476,7 @@ handle_text_conflict(svn_wc_conflict_res
while (TRUE)
{
- const char *options[12]; /* size of array must be big enough */
+ const char *options[ARRAY_LEN(text_conflict_options)];
const char **next_option = options;
const char *prompt;
const char *answer;
@@ -492,8 +494,10 @@ handle_text_conflict(svn_wc_conflict_res
*next_option++ = "r";
if (! desc->is_binary)
- *next_option++ = "mc";
- *next_option++ = "tc";
+ {
+ *next_option++ = "mc";
+ *next_option++ = "tc";
+ }
}
else
{
@@ -753,6 +757,130 @@ handle_prop_conflict(svn_wc_conflict_res
return SVN_NO_ERROR;
}
+/* Ask the user what to do about the tree conflict described by DESC.
+ * Return the answer in RESULT. B is the conflict baton for this
+ * conflict resolution session.
+ * SCRATCH_POOL is used for temporary allocations. */
+static svn_error_t *
+handle_tree_conflict(svn_wc_conflict_result_t *result,
+ const svn_wc_conflict_description2_t *desc,
+ svn_cl__interactive_conflict_baton_t *b,
+ apr_pool_t *scratch_pool)
+{
+ const char *prompt
+ = prompt_string(tree_conflict_options, NULL, scratch_pool);
+ const char *readable_desc;
+ apr_pool_t *iterpool;
+
+ SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
+ &readable_desc, desc, scratch_pool));
+ SVN_ERR(svn_cmdline_fprintf(
+ stderr, scratch_pool,
+ _("Tree conflict on '%s'\n > %s\n"),
+ svn_cl__local_style_skip_ancestor(b->path_prefix,
+ desc->local_abspath,
+ scratch_pool),
+ readable_desc));
+
+ iterpool = svn_pool_create(scratch_pool);
+ while (1)
+ {
+ const char *answer;
+
+ svn_pool_clear(iterpool);
+
+ SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, iterpool));
+
+ if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s",
+ help_string(tree_conflict_options,
+ iterpool)));
+ }
+ if (strcmp(answer, "p") == 0 || strcmp(answer, ":-p") == 0)
+ {
+ result->choice = svn_wc_conflict_choose_postpone;
+ break;
+ }
+ else if (strcmp(answer, "r") == 0)
+ {
+ result->choice = svn_wc_conflict_choose_merged;
+ break;
+ }
+ else if (strcmp(answer, "mc") == 0)
+ {
+ result->choice = svn_wc_conflict_choose_mine_conflict;
+ break;
+ }
+ else if (strcmp(answer, "tc") == 0)
+ {
+ result->choice = svn_wc_conflict_choose_theirs_conflict;
+ break;
+ }
+ }
+ svn_pool_destroy(iterpool);
+
+ return SVN_NO_ERROR;
+}
+
+/* Ask the user what to do about the obstructed add described by DESC.
+ * Return the answer in RESULT. B is the conflict baton for this
+ * conflict resolution session.
+ * SCRATCH_POOL is used for temporary allocations. */
+static svn_error_t *
+handle_obstructed_add(svn_wc_conflict_result_t *result,
+ const svn_wc_conflict_description2_t *desc,
+ svn_cl__interactive_conflict_baton_t *b,
+ apr_pool_t *scratch_pool)
+{
+ const char *prompt
+ = prompt_string(obstructed_add_options, NULL, scratch_pool);
+ apr_pool_t *iterpool;
+
+ SVN_ERR(svn_cmdline_fprintf(
+ stderr, scratch_pool,
+ _("Conflict discovered when trying to add '%s'.\n"
+ "An object of the same name already exists.\n"),
+ svn_cl__local_style_skip_ancestor(b->path_prefix,
+ desc->local_abspath,
+ scratch_pool)));
+
+ iterpool = svn_pool_create(scratch_pool);
+ while (1)
+ {
+ const char *answer;
+
+ svn_pool_clear(iterpool);
+
+ SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, iterpool));
+
+ if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+ help_string(obstructed_add_options,
+ iterpool)));
+ }
+ if (strcmp(answer, "p") == 0 || strcmp(answer, ":-P") == 0)
+ {
+ result->choice = svn_wc_conflict_choose_postpone;
+ break;
+ }
+ if (strcmp(answer, "mf") == 0 || strcmp(answer, ":-)") == 0)
+ {
+ result->choice = svn_wc_conflict_choose_mine_full;
+ break;
+ }
+ if (strcmp(answer, "tf") == 0 || strcmp(answer, ":-(") == 0)
+ {
+ result->choice = svn_wc_conflict_choose_theirs_full;
+ break;
+ }
+ }
+ svn_pool_destroy(iterpool);
+
+ return SVN_NO_ERROR;
+}
+
/* Implement svn_wc_conflict_resolver_func2_t; resolves based on
--accept option if given, else by prompting. */
svn_error_t *
@@ -764,7 +892,6 @@ svn_cl__conflict_func_interactive(svn_wc
{
svn_cl__interactive_conflict_baton_t *b = baton;
svn_error_t *err;
- apr_pool_t *subpool;
/* Start out assuming we're going to postpone the conflict. */
*result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
@@ -887,7 +1014,6 @@ svn_cl__conflict_func_interactive(svn_wc
/* We're in interactive mode and either the user gave no --accept
option or the option did not apply; let's prompt. */
- subpool = svn_pool_create(scratch_pool);
/* Handle the most common cases, which is either:
@@ -897,9 +1023,9 @@ svn_cl__conflict_func_interactive(svn_wc
if (((desc->node_kind == svn_node_file)
&& (desc->action == svn_wc_conflict_action_edit)
&& (desc->reason == svn_wc_conflict_reason_edited)))
- SVN_ERR(handle_text_conflict(*result, desc, b, subpool));
+ SVN_ERR(handle_text_conflict(*result, desc, b, scratch_pool));
else if (desc->kind == svn_wc_conflict_kind_property)
- SVN_ERR(handle_prop_conflict(*result, desc, b, subpool));
+ SVN_ERR(handle_prop_conflict(*result, desc, b, scratch_pool));
/*
Dealing with obstruction of additions can be tricky. The
@@ -921,107 +1047,16 @@ svn_cl__conflict_func_interactive(svn_wc
*/
else if ((desc->action == svn_wc_conflict_action_add)
&& (desc->reason == svn_wc_conflict_reason_obstructed))
- {
- const char *answer;
- const char *prompt
- = prompt_string(obstructed_add_options, NULL, scratch_pool);
-
- SVN_ERR(svn_cmdline_fprintf(
- stderr, subpool,
- _("Conflict discovered when trying to add '%s'.\n"
- "An object of the same name already exists.\n"),
- svn_cl__local_style_skip_ancestor(b->path_prefix,
- desc->local_abspath,
- subpool)));
-
- while (1)
- {
- svn_pool_clear(subpool);
-
- SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, subpool));
-
- if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, subpool, "%s\n",
- help_string(obstructed_add_options,
- subpool)));
- }
- if (strcmp(answer, "p") == 0 || strcmp(answer, ":-P") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_postpone;
- break;
- }
- if (strcmp(answer, "mf") == 0 || strcmp(answer, ":-)") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_mine_full;
- break;
- }
- if (strcmp(answer, "tf") == 0 || strcmp(answer, ":-(") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_theirs_full;
- break;
- }
- }
- }
+ SVN_ERR(handle_obstructed_add(*result, desc, b, scratch_pool));
else if (desc->kind == svn_wc_conflict_kind_tree)
- {
- const char *answer;
- const char *prompt
- = prompt_string(tree_conflict_options, NULL, scratch_pool);
- const char *readable_desc;
-
- SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
- &readable_desc, desc, scratch_pool));
- SVN_ERR(svn_cmdline_fprintf(
- stderr, subpool,
- _("Tree conflict on '%s'\n > %s\n"),
- svn_cl__local_style_skip_ancestor(b->path_prefix,
- desc->local_abspath,
- scratch_pool),
- readable_desc));
-
- while (1)
- {
- svn_pool_clear(subpool);
-
- SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, subpool));
-
- if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, subpool, "%s",
- help_string(tree_conflict_options,
- subpool)));
- }
- if (strcmp(answer, "p") == 0 || strcmp(answer, ":-p") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_postpone;
- break;
- }
- else if (strcmp(answer, "r") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_merged;
- break;
- }
- else if (strcmp(answer, "mc") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_mine_conflict;
- break;
- }
- else if (strcmp(answer, "tc") == 0)
- {
- (*result)->choice = svn_wc_conflict_choose_theirs_conflict;
- break;
- }
- }
- }
+ SVN_ERR(handle_tree_conflict(*result, desc, b, scratch_pool));
else /* other types of conflicts -- do nothing about them. */
{
(*result)->choice = svn_wc_conflict_choose_postpone;
}
- svn_pool_destroy(subpool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/ev2-export/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/diff-cmd.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/ev2-export/subversion/svn/diff-cmd.c Mon Jan 21 23:37:01 2013
@@ -394,6 +394,7 @@ svn_cl__diff(apr_getopt_t *os,
NULL,
opt_state->depth,
! opt_state->diff.notice_ancestry,
+ opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
opt_state->force,
@@ -444,6 +445,7 @@ svn_cl__diff(apr_getopt_t *os,
NULL,
opt_state->depth,
! opt_state->diff.notice_ancestry,
+ opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
opt_state->force,
Modified: subversion/branches/ev2-export/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/log-cmd.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/log-cmd.c (original)
+++ subversion/branches/ev2-export/subversion/svn/log-cmd.c Mon Jan 21 23:37:01 2013
@@ -128,13 +128,14 @@ display_diff(const svn_log_entry_t *log_
&start_revision, &end_revision,
NULL,
depth,
- FALSE, /* ignore ancestry */
- TRUE, /* no diff deleted */
- FALSE, /* show copies as adds */
- FALSE, /* ignore content type */
- FALSE, /* ignore prop diff */
- FALSE, /* properties only */
- FALSE, /* use git diff format */
+ FALSE /* ignore ancestry */,
+ FALSE /* no diff added */,
+ TRUE /* no diff deleted */,
+ FALSE /* show copies as adds */,
+ FALSE /* ignore content type */,
+ FALSE /* ignore prop diff */,
+ FALSE /* properties only */,
+ FALSE /* use git diff format */,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
Modified: subversion/branches/ev2-export/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/merge-cmd.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/ev2-export/subversion/svn/merge-cmd.c Mon Jan 21 23:37:01 2013
@@ -93,7 +93,7 @@ merge_reintegrate(const char *source_pat
SVN_ERR(svn_client_merge4(url1, &revision1, url2, &revision2,
target_wcpath, svn_depth_infinity,
FALSE /* ignore_ancestry */,
- FALSE /* force */,
+ FALSE /* force_delete */,
FALSE /* record_only */,
dry_run, TRUE /* allow_mixed_rev */,
merge_options, ctx, scratch_pool));
@@ -127,7 +127,7 @@ automatic_merge(const char *source_path_
const svn_opt_revision_t *source_revision,
const char *target_wcpath,
svn_depth_t depth,
- svn_boolean_t force,
+ svn_boolean_t force_delete,
svn_boolean_t record_only,
svn_boolean_t dry_run,
svn_boolean_t allow_mixed_rev,
@@ -171,7 +171,7 @@ automatic_merge(const char *source_path_
"and the --depth option "
"cannot be used with this kind of merge"));
- if (force)
+ if (force_delete)
return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
_("The required merge is reintegrate-like, "
"and the --force option "
@@ -189,7 +189,7 @@ automatic_merge(const char *source_path_
/* Perform the 3-way merges */
SVN_ERR(svn_client_do_automatic_merge(merge, target_wcpath, depth,
- force, record_only,
+ force_delete, record_only,
dry_run, merge_options,
ctx, scratch_pool));
@@ -212,6 +212,7 @@ svn_cl__merge(apr_getopt_t *os,
svn_opt_revision_t first_range_start, first_range_end, peg_revision1,
peg_revision2;
apr_array_header_t *options, *ranges_to_merge = opt_state->revision_ranges;
+ svn_boolean_t has_explicit_target = FALSE;
/* Merge doesn't support specifying a revision or revision range
when using --reintegrate. */
@@ -343,6 +344,7 @@ svn_cl__merge(apr_getopt_t *os,
if (targets->nelts == 2)
{
targetpath = APR_ARRAY_IDX(targets, 1, const char *);
+ has_explicit_target = TRUE;
if (svn_path_is_url(targetpath))
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Cannot specify a revision range "
@@ -378,12 +380,17 @@ svn_cl__merge(apr_getopt_t *os,
/* Decide where to apply the delta (defaulting to "."). */
if (targets->nelts == 3)
- targetpath = APR_ARRAY_IDX(targets, 2, const char *);
+ {
+ targetpath = APR_ARRAY_IDX(targets, 2, const char *);
+ has_explicit_target = TRUE;
+ }
}
/* If no targetpath was specified, see if we can infer it from the
sourcepaths. */
- if (sourcepath1 && sourcepath2 && strcmp(targetpath, "") == 0)
+ if (! has_explicit_target
+ && sourcepath1 && sourcepath2
+ && strcmp(targetpath, "") == 0)
{
/* If the sourcepath is a URL, it can only refer to a target in
the current working directory or which is the current working
@@ -484,7 +491,7 @@ svn_cl__merge(apr_getopt_t *os,
{
merge_err = automatic_merge(sourcepath1, &peg_revision1, targetpath,
opt_state->depth,
- opt_state->force,
+ opt_state->force, /* force_delete */
opt_state->record_only,
opt_state->dry_run,
opt_state->allow_mixed_rev,
@@ -531,7 +538,7 @@ svn_cl__merge(apr_getopt_t *os,
targetpath,
opt_state->depth,
opt_state->ignore_ancestry,
- opt_state->force,
+ opt_state->force, /* force_delete */
opt_state->record_only,
opt_state->dry_run,
opt_state->allow_mixed_rev,
@@ -555,7 +562,7 @@ svn_cl__merge(apr_getopt_t *os,
targetpath,
opt_state->depth,
opt_state->ignore_ancestry,
- opt_state->force,
+ opt_state->force, /* force_delete */
opt_state->record_only,
opt_state->dry_run,
opt_state->allow_mixed_rev,
Modified: subversion/branches/ev2-export/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/notify.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/notify.c (original)
+++ subversion/branches/ev2-export/subversion/svn/notify.c Mon Jan 21 23:37:01 2013
@@ -348,6 +348,11 @@ notify(void *baton, const svn_wc_notify_
{
off = n->hunk_matched_line - n->hunk_original_start;
minus = "";
+
+ /* If we are patching from the start of an empty file,
+ it is nicer to show offset 0 */
+ if (n->hunk_original_start == 0 && n->hunk_matched_line == 1)
+ off = 0; /* No offset, just adding */
}
else
{
Modified: subversion/branches/ev2-export/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/status.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/status.c (original)
+++ subversion/branches/ev2-export/subversion/svn/status.c Mon Jan 21 23:37:01 2013
@@ -288,7 +288,21 @@ print_status(const char *cwd_abspath, co
/* Note that moved-from and moved-to information is only available in STATUS
* for (op-)roots of a move. Those are exactly the nodes we want to show
* move info for in 'svn status'. See also comments in svn_wc_status3_t. */
- if (status->moved_from_abspath || status->moved_to_abspath)
+ if (status->moved_from_abspath && status->moved_to_abspath &&
+ strcmp(status->moved_from_abspath, status->moved_to_abspath) == 0)
+ {
+ const char *relpath;
+
+ relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+ pool, pool);
+ relpath = svn_dirent_local_style(relpath, pool);
+ moved_from_line = apr_pstrcat(pool, "\n > ",
+ apr_psprintf(pool,
+ _("swapped places with %s"),
+ relpath),
+ (char *)NULL);
+ }
+ else if (status->moved_from_abspath || status->moved_to_abspath)
{
const char *relpath;
Modified: subversion/branches/ev2-export/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/svn.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/svn.c (original)
+++ subversion/branches/ev2-export/subversion/svn/svn.c Mon Jan 21 23:37:01 2013
@@ -75,6 +75,7 @@ typedef enum svn_cl__longopt_t {
/* diff options */
opt_diff_cmd,
opt_internal_diff,
+ opt_no_diff_added,
opt_no_diff_deleted,
opt_show_copies_as_adds,
opt_notice_ancestry,
@@ -240,7 +241,7 @@ const apr_getopt_option_t svn_cl__option
{"dry-run", opt_dry_run, 0,
N_("try operation but make no changes")},
{"ignore-ancestry", opt_ignore_ancestry, 0,
- N_("ignore ancestry when calculating merges")},
+ N_("disable merge tracking; diff nodes as if related")},
{"ignore-externals", opt_ignore_externals, 0,
N_("ignore externals definitions")},
{"diff3-cmd", opt_merge_cmd, 1, N_("use ARG as merge command")},
@@ -337,12 +338,14 @@ const apr_getopt_option_t svn_cl__option
{"diff-cmd", opt_diff_cmd, 1, N_("use ARG as diff command")},
{"internal-diff", opt_internal_diff, 0,
N_("override diff-cmd specified in config file")},
+ {"no-diff-added", opt_no_diff_added, 0,
+ N_("do not print differences for added files")},
{"no-diff-deleted", opt_no_diff_deleted, 0,
N_("do not print differences for deleted files")},
{"show-copies-as-adds", opt_show_copies_as_adds, 0,
N_("don't diff copied or moved files with their source")},
{"notice-ancestry", opt_notice_ancestry, 0,
- N_("notice ancestry when calculating differences")},
+ N_("diff unrelated nodes as delete and add")},
{"summarize", opt_summarize, 0, N_("show a summary of the results")},
{"git", opt_use_git_diff_format, 0,
N_("use git's extended diff format")},
@@ -557,8 +560,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
"\n"
" Use just 'svn diff' to display local modifications in a working copy.\n"),
{'r', 'c', opt_old_cmd, opt_new_cmd, 'N', opt_depth, opt_diff_cmd,
- opt_internal_diff, 'x', opt_no_diff_deleted, opt_ignore_properties,
- opt_properties_only,
+ opt_internal_diff, 'x', opt_no_diff_added, opt_no_diff_deleted,
+ opt_ignore_properties, opt_properties_only,
opt_show_copies_as_adds, opt_notice_ancestry, opt_summarize, opt_changelist,
opt_force, opt_xml, opt_use_git_diff_format, opt_patch_compatible} },
{ "export", svn_cl__export, {0}, N_
@@ -1483,7 +1486,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
" svn switch --relocate http://www.example.com/repo/project \\\n"
" svn://svn.example.com/repo/project\n"),
{ 'r', 'N', opt_depth, opt_set_depth, 'q', opt_merge_cmd, opt_relocate,
- opt_ignore_externals, opt_ignore_ancestry, opt_force, opt_accept} },
+ opt_ignore_externals, opt_ignore_ancestry, opt_force, opt_accept},
+ {{opt_ignore_ancestry,
+ N_("allow switching to a node with no common ancestor")}}
+ },
{ "unlock", svn_cl__unlock, {0}, N_
("Unlock working copy paths or URLs.\n"
@@ -1998,6 +2004,9 @@ sub_main(int argc, const char *argv[], a
case opt_trust_server_cert:
opt_state.trust_server_cert = TRUE;
break;
+ case opt_no_diff_added:
+ opt_state.diff.no_diff_added = TRUE;
+ break;
case opt_no_diff_deleted:
opt_state.diff.no_diff_deleted = TRUE;
break;
@@ -2286,7 +2295,7 @@ sub_main(int argc, const char *argv[], a
first_arg, pool));
svn_error_clear
(svn_cmdline_fprintf(stderr, pool,
- _("Unknown command: '%s'\n"),
+ _("Unknown subcommand: '%s'\n"),
first_arg_utf8));
svn_cl__help(NULL, NULL, pool);
return EXIT_FAILURE;
Modified: subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c Mon Jan 21 23:37:01 2013
@@ -756,6 +756,16 @@ repos_notify_handler(void *baton,
notify->revision));
return;
+ case svn_repos_notify_verify_struc_rev:
+ if (notify->revision == SVN_INVALID_REVNUM)
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verifying global structure ...\n")));
+ else
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verifying structure at revision %ld ...\n"),
+ notify->revision));
+ return;
+
case svn_repos_notify_pack_shard_start:
{
const char *shardstr = apr_psprintf(scratch_pool,
@@ -2023,9 +2033,10 @@ sub_main(int argc, const char *argv[], a
compatible_version->patch))
{
err = svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("Cannot guaranteed compatibility "
+ _("Cannot guarantee compatibility "
"beyond the current running version "
- "(" SVN_VER_NUM ")"));
+ "(%s)"),
+ SVN_VER_NUM );
return EXIT_ERROR(err);
}
@@ -2125,9 +2136,10 @@ sub_main(int argc, const char *argv[], a
const char *first_arg_utf8;
SVN_INT_ERR(svn_utf_cstring_to_utf8(&first_arg_utf8,
first_arg, pool));
- svn_error_clear(svn_cmdline_fprintf(stderr, pool,
- _("Unknown command: '%s'\n"),
- first_arg_utf8));
+ svn_error_clear(
+ svn_cmdline_fprintf(stderr, pool,
+ _("Unknown subcommand: '%s'\n"),
+ first_arg_utf8));
SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
return EXIT_FAILURE;
}
Modified: subversion/branches/ev2-export/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svndumpfilter/svndumpfilter.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/ev2-export/subversion/svndumpfilter/svndumpfilter.c Mon Jan 21 23:37:01 2013
@@ -887,7 +887,7 @@ delete_node_property(void *node_baton, c
if (!nb->has_prop_delta)
return svn_error_createf(SVN_ERR_STREAM_MALFORMED_DATA, NULL,
_("Delta property block detected, but deltas "
- "are not enabled for node '%s' in original"
+ "are not enabled for node '%s' in original "
"revision %ld"),
nb->node_path, rb->rev_orig);
@@ -1494,9 +1494,10 @@ main(int argc, const char *argv[])
return svn_cmdline_handle_exit_error(err, pool,
"svndumpfilter: ");
- svn_error_clear(svn_cmdline_fprintf(stderr, pool,
- _("Unknown command: '%s'\n"),
- first_arg_utf8));
+ svn_error_clear(
+ svn_cmdline_fprintf(stderr, pool,
+ _("Unknown subcommand: '%s'\n"),
+ first_arg_utf8));
SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
Modified: subversion/branches/ev2-export/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnlook/svnlook.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/ev2-export/subversion/svnlook/svnlook.c Mon Jan 21 23:37:01 2013
@@ -2658,10 +2658,10 @@ main(int argc, const char *argv[])
pool);
if (err)
return svn_cmdline_handle_exit_error(err, pool, "svnlook: ");
- svn_error_clear
- (svn_cmdline_fprintf(stderr, pool,
- _("Unknown command: '%s'\n"),
- first_arg_utf8));
+ svn_error_clear(
+ svn_cmdline_fprintf(stderr, pool,
+ _("Unknown subcommand: '%s'\n"),
+ first_arg_utf8));
SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
svn_pool_destroy(pool);
return EXIT_FAILURE;
Modified: subversion/branches/ev2-export/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnmucc/svnmucc.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/ev2-export/subversion/svnmucc/svnmucc.c Mon Jan 21 23:37:01 2013
@@ -927,20 +927,20 @@ usage(apr_pool_t *pool, int exit_val)
FILE *stream = exit_val == EXIT_SUCCESS ? stdout : stderr;
svn_error_clear(svn_cmdline_fputs(
_("Subversion multiple URL command client\n"
- "usage: svnmucc [OPTION]... [ACTION]...\n"
+ "usage: svnmucc ACTION...\n"
"\n"
" Perform one or more Subversion repository URL-based ACTIONs, committing\n"
" the result as a (single) new revision.\n"
"\n"
"Actions:\n"
- " cp REV URL1 URL2 : copy URL1@REV to URL2\n"
+ " cp REV SRC-URL DST-URL : copy SRC-URL@REV to DST-URL\n"
" mkdir URL : create new directory URL\n"
- " mv URL1 URL2 : move URL1 to URL2\n"
+ " mv SRC-URL DST-URL : move SRC-URL to DST-URL\n"
" rm URL : delete URL\n"
" put SRC-FILE URL : add or modify file URL with contents copied from\n"
" SRC-FILE (use \"-\" to read from standard input)\n"
- " propset NAME VAL URL : set property NAME on URL to value VAL\n"
- " propsetf NAME VAL URL : set property NAME on URL to value from file VAL\n"
+ " propset NAME VALUE URL : set property NAME on URL to VALUE\n"
+ " propsetf NAME FILE URL : set property NAME on URL to value read from FILE\n"
" propdel NAME URL : delete property NAME from URL\n"
"\n"
"Valid options:\n"
Modified: subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/ev2-export/subversion/svnrdump/svnrdump.c Mon Jan 21 23:37:01 2013
@@ -1039,9 +1039,10 @@ main(int argc, const char **argv)
err = svn_utf_cstring_to_utf8(&first_arg_utf8, first_arg, pool);
if (err)
return svn_cmdline_handle_exit_error(err, pool, "svnrdump: ");
- svn_error_clear(svn_cmdline_fprintf(stderr, pool,
- _("Unknown command: '%s'\n"),
- first_arg_utf8));
+ svn_error_clear(
+ svn_cmdline_fprintf(stderr, pool,
+ _("Unknown subcommand: '%s'\n"),
+ first_arg_utf8));
SVNRDUMP_ERR(help_cmd(NULL, NULL, pool));
svn_pool_destroy(pool);
exit(EXIT_FAILURE);
Modified: subversion/branches/ev2-export/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnserve/serve.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnserve/serve.c (original)
+++ subversion/branches/ev2-export/subversion/svnserve/serve.c Mon Jan 21 23:37:01 2013
@@ -234,7 +234,7 @@ svn_error_t *load_pwdb_config(server_bat
server->pwdb = NULL;
if (pwdb_path)
{
- pwdb_path = svn_dirent_canonicalize(pwdb_path, pool);
+ pwdb_path = svn_dirent_internal_style(pwdb_path, pool);
pwdb_path = svn_dirent_join(server->base, pwdb_path, pool);
err = svn_config_read2(&server->pwdb, pwdb_path, TRUE, FALSE, pool);
@@ -293,7 +293,7 @@ svn_error_t *load_authz_config(server_ba
}
else if (!svn_path_is_repos_relative_url(authzdb_path))
{
- authzdb_path = svn_dirent_canonicalize(authzdb_path, pool);
+ authzdb_path = svn_dirent_internal_style(authzdb_path, pool);
authzdb_path = svn_dirent_join(server->base, authzdb_path, pool);
}
err = svn_repos_authz_read2(&server->authzdb, authzdb_path, TRUE,
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/authz_tests.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/authz_tests.py Mon Jan 21 23:37:01 2013
@@ -1223,12 +1223,13 @@ def authz_tree_conflict(sbox):
expected_output = svntest.wc.State(wc_dir, {})
expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
expected_status.tweak('A/C', status='A ', wc_rev='0')
+ expected_status.tweak('A', '', status='! ', wc_rev='1')
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
None,
expected_status,
- "Failed to mark '.*C' absent:",
+ "Failed to mark '.*C' (server|absent):",
None, None, None, None, 0,
'-r', '1', wc_dir)
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py Mon Jan 21 23:37:01 2013
@@ -400,7 +400,7 @@ def basic_commit_corruption(sbox):
# This commit should fail due to text base corruption.
svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status,
+ None, # expected_status,
"svn: E200014: Checksum",
wc_dir)
@@ -438,7 +438,9 @@ def basic_update_corruption(sbox):
# Make the "other" working copy
other_wc = sbox.add_wc_path('other')
- svntest.actions.duplicate_dir(wc_dir, other_wc)
+
+ svntest.actions.run_and_verify_svn("Checkout to wc2", None, [],
+ 'co', sbox.repo_url, other_wc)
# Make a local mod to mu
mu_path = sbox.ospath('A/mu')
@@ -465,10 +467,6 @@ def basic_update_corruption(sbox):
# Create expected disk tree for the update.
expected_disk = svntest.main.greek_state.copy()
- expected_disk.tweak('A/mu',
- contents=expected_disk.desc['A/mu'].contents
- + 'appended mu text')
-
# Create expected status tree for the update.
expected_status = svntest.actions.get_virginal_state(other_wc, 2)
@@ -487,11 +485,15 @@ def basic_update_corruption(sbox):
os.chmod(tb_dir_path, tb_dir_saved_mode)
os.chmod(mu_tb_path, mu_tb_saved_mode)
- # Do the update and check the results in three ways.
+ # Do the update and check the results in four ways.
+ fail_output = wc.State(other_wc, {
+ })
+ fail_status = svntest.actions.get_virginal_state(other_wc, 1)
+ fail_status.tweak('A', '', status='! ', wc_rev=2)
svntest.actions.run_and_verify_update(other_wc,
- expected_output,
+ fail_output,
expected_disk,
- expected_status,
+ fail_status,
"svn: E155017: Checksum", other_wc)
# Restore the uncorrupted text base.
@@ -502,8 +504,15 @@ def basic_update_corruption(sbox):
os.chmod(tb_dir_path, tb_dir_saved_mode)
os.chmod(mu_tb_path, mu_tb_saved_mode)
+ # Create expected status tree for the update.
+ expected_status = svntest.actions.get_virginal_state(other_wc, 2)
+
# This update should succeed. (Actually, I'm kind of astonished
# that this works without even an intervening "svn cleanup".)
+ expected_disk.tweak('A/mu',
+ contents=expected_disk.desc['A/mu'].contents
+ + 'appended mu text')
+
svntest.actions.run_and_verify_update(other_wc,
expected_output,
expected_disk,
@@ -2943,7 +2952,6 @@ def quiet_commits(sbox):
# Regression test for issue #4023: on Windows, 'svn rm' incorrectly deletes
# on-disk file if it is case-clashing with intended (non-on-disk) target.
@Issue(4023)
-@XFail(svntest.main.is_fs_case_insensitive)
def rm_missing_with_case_clashing_ondisk_item(sbox):
"""rm missing item with case-clashing ondisk item"""
@@ -2963,8 +2971,10 @@ def rm_missing_with_case_clashing_ondisk
})
svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status)
+ # Verify that the casing is not updated, because the path is on-disk.
+ expected_output = [ 'D %s\n' % iota_path ]
# 'svn rm' iota, should leave IOTA alone.
- svntest.actions.run_and_verify_svn(None, None, [],
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
'rm', iota_path)
# Test status: the unversioned IOTA should still be there.
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/blame_tests.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/blame_tests.py Mon Jan 21 23:37:01 2013
@@ -859,6 +859,98 @@ def blame_multiple_targets(sbox):
multiple_wc_targets()
multiple_url_targets()
+@Issue(4034)
+def blame_eol_handling(sbox):
+ "blame it on the eol handling"
+
+ sbox.build()
+
+ if os.name == 'nt':
+ native_eol = '\r\n'
+ else:
+ native_eol = '\n'
+
+ for eol, prop, rev in [ ('\r', 'CR', 2),
+ ('\n', 'LF', 4),
+ ('\r\n', 'CRLF', 6),
+ (native_eol, 'native', 8) ]:
+
+ f1 = sbox.ospath('blame-%s' % prop)
+ f2 = sbox.ospath('blame-%s-prop' % prop)
+
+ file_data = 'line 1 ' + eol + \
+ 'line 2 ' + eol + \
+ 'line 3 ' + eol + \
+ 'line 4 ' + eol + \
+ 'line 5 ' + eol
+
+ svntest.main.file_write(f1, file_data, mode='wb')
+ svntest.main.file_write(f2, file_data, mode='wb')
+
+ sbox.simple_add('blame-%s' % prop,
+ 'blame-%s-prop' % prop)
+ sbox.simple_propset('svn:eol-style', prop, 'blame-%s-prop' % prop)
+ sbox.simple_commit()
+
+ file_data = 'line 1 ' + eol + \
+ 'line 2 ' + eol + \
+ 'line 2a' + eol + \
+ 'line 3 ' + eol + \
+ 'line 4 ' + eol + \
+ 'line 4a' + eol + \
+ 'line 5 ' + eol
+
+ svntest.main.file_write(f1, file_data, mode='wb')
+ svntest.main.file_write(f2, file_data, mode='wb')
+
+ sbox.simple_commit()
+
+ expected_output = [
+ ' %d jrandom line 1 \n' % rev,
+ ' %d jrandom line 2 \n' % rev,
+ ' %d jrandom line 2a\n' % (rev + 1),
+ ' %d jrandom line 3 \n' % rev,
+ ' %d jrandom line 4 \n' % rev,
+ ' %d jrandom line 4a\n' % (rev + 1),
+ ' %d jrandom line 5 \n' % rev,
+ ]
+
+ svntest.actions.run_and_verify_svn(f1 + '-base', expected_output, [],
+ 'blame', f1)
+
+ svntest.actions.run_and_verify_svn(f2 + '-base', expected_output, [],
+ 'blame', f2)
+
+ file_data = 'line 1 ' + eol + \
+ 'line 2 ' + eol + \
+ 'line 2a' + eol + \
+ 'line 3 ' + eol + \
+ 'line 3b' + eol + \
+ 'line 4 ' + eol + \
+ 'line 4a' + eol + \
+ 'line 5 ' + eol
+
+ svntest.main.file_write(f1, file_data, mode='wb')
+ svntest.main.file_write(f2, file_data, mode='wb')
+
+ expected_output = [
+ ' %d jrandom line 1 \n' % rev,
+ ' %d jrandom line 2 \n' % rev,
+ ' %d jrandom line 2a\n' % (rev + 1),
+ ' %d jrandom line 3 \n' % rev,
+ ' - - line 3b\n',
+ ' %d jrandom line 4 \n' % rev,
+ ' %d jrandom line 4a\n' % (rev + 1),
+ ' %d jrandom line 5 \n' % rev,
+ ]
+
+ svntest.actions.run_and_verify_svn(f1 + '-modified', expected_output, [],
+ 'blame', f1)
+
+ svntest.actions.run_and_verify_svn(f2 + '-modified', expected_output, [],
+ 'blame', f2)
+
+
########################################################################
# Run the tests
@@ -881,6 +973,7 @@ test_list = [ None,
blame_output_after_merge,
merge_sensitive_blame_and_empty_mergeinfo,
blame_multiple_targets,
+ blame_eol_handling,
]
if __name__ == '__main__':
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/changelist_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/changelist_tests.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/changelist_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/changelist_tests.py Mon Jan 21 23:37:01 2013
@@ -633,9 +633,8 @@ def propmods_with_changelists(sbox):
'A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau', 'A/D/H',
'A/D/H/chi', 'A/D/H/omega', 'A/D/H/psi', 'A/D/gamma',
'A/mu', 'iota', props={ 'name' : 'value' })
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Proplist the 'i' changelist
exit_code, output, errput = svntest.main.run_svn(None, "proplist", "--depth",
@@ -653,9 +652,7 @@ def propmods_with_changelists(sbox):
wc_dir)
expected_disk.tweak('A/D/G/pi', 'A/D/G/rho', 'A/D/H/chi', 'A/D/H/psi',
props={})
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Add 'foo'='bar' property on all files under A/B to depth files and
# in changelist 'a'.
@@ -664,9 +661,7 @@ def propmods_with_changelists(sbox):
os.path.join(wc_dir, 'A', 'B'))
expected_disk.tweak('A/B/lambda', props={ 'name' : 'value',
'foo' : 'bar' })
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Add 'bloo'='blarg' property to all files in changelist 'a'.
svntest.main.run_svn(None, "pset", "--depth", "infinity",
@@ -678,9 +673,7 @@ def propmods_with_changelists(sbox):
expected_disk.tweak('A/B/E/alpha', 'A/B/E/beta', 'A/D/H/omega', 'A/D/gamma',
'iota', props={ 'name' : 'value',
'bloo' : 'blarg' })
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Propget 'name' in files in changelists 'a' and 'i' to depth files.
exit_code, output, errput = svntest.main.run_svn(None, "pget",
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py Mon Jan 21 23:37:01 2013
@@ -1589,28 +1589,28 @@ def commit_nonrecursive(sbox):
# These paths are relative to the top of the test's working copy.
file1_path = 'file1'
dir1_path = 'dir1'
- file2_path = os.path.join('dir1', 'file2')
- file3_path = os.path.join('dir1', 'file3')
- dir2_path = os.path.join('dir1', 'dir2')
- file4_path = os.path.join('dir1', 'dir2', 'file4')
+ file2_path = 'dir1/file2'
+ file3_path = 'dir1/file3'
+ dir2_path = 'dir1/dir2'
+ file4_path = 'dir1/dir2/file4'
# Create the new files and directories.
- svntest.main.file_append(os.path.join(wc_dir, file1_path), 'this is file1')
- os.mkdir(os.path.join(wc_dir, dir1_path))
- svntest.main.file_append(os.path.join(wc_dir, file2_path), 'this is file2')
- svntest.main.file_append(os.path.join(wc_dir, file3_path), 'this is file3')
- os.mkdir(os.path.join(wc_dir, dir2_path))
- svntest.main.file_append(os.path.join(wc_dir, file4_path), 'this is file4')
+ svntest.main.file_append(sbox.ospath(file1_path), 'this is file1')
+ os.mkdir(sbox.ospath(dir1_path))
+ svntest.main.file_append(sbox.ospath(file2_path), 'this is file2')
+ svntest.main.file_append(sbox.ospath(file3_path), 'this is file3')
+ os.mkdir(sbox.ospath(dir2_path))
+ svntest.main.file_append(sbox.ospath(file4_path), 'this is file4')
# Add them to version control.
svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
'add', '--depth=empty',
- os.path.join(wc_dir, file1_path),
- os.path.join(wc_dir, dir1_path),
- os.path.join(wc_dir, file2_path),
- os.path.join(wc_dir, file3_path),
- os.path.join(wc_dir, dir2_path),
- os.path.join(wc_dir, file4_path))
+ sbox.ospath(file1_path),
+ sbox.ospath(dir1_path),
+ sbox.ospath(file2_path),
+ sbox.ospath(file3_path),
+ sbox.ospath(dir2_path),
+ sbox.ospath(file4_path))
# Commit. We should see all 6 items (2 dirs, 4 files) get sent.
expected_output = svntest.wc.State(
@@ -1639,12 +1639,12 @@ def commit_nonrecursive(sbox):
expected_status,
None,
'-N',
- os.path.join(wc_dir, file1_path),
- os.path.join(wc_dir, dir1_path),
- os.path.join(wc_dir, file2_path),
- os.path.join(wc_dir, file3_path),
- os.path.join(wc_dir, dir2_path),
- os.path.join(wc_dir, file4_path))
+ sbox.ospath(file1_path),
+ sbox.ospath(dir1_path),
+ sbox.ospath(file2_path),
+ sbox.ospath(file3_path),
+ sbox.ospath(dir2_path),
+ sbox.ospath(file4_path))
#######################################################################
###
@@ -1707,28 +1707,28 @@ def commit_nonrecursive(sbox):
# Now add these directories and files, except the last:
dirA_path = 'dirA'
- fileA_path = os.path.join('dirA', 'fileA')
- fileB_path = os.path.join('dirA', 'fileB')
- dirB_path = os.path.join('dirA', 'dirB')
- nope_1_path = os.path.join(dirB_path, 'nope_1')
- nope_2_path = os.path.join(dirB_path, 'nope_2')
+ fileA_path = 'dirA/fileA'
+ fileB_path = 'dirA/fileB'
+ dirB_path = 'dirA/dirB'
+ nope_1_path = 'dirA/dirB/nope_1'
+ nope_2_path = 'dirA/dirB/nope_2'
# Create the new files and directories.
- os.mkdir(os.path.join(wc_dir, dirA_path))
- svntest.main.file_append(os.path.join(wc_dir, fileA_path), 'fileA')
- svntest.main.file_append(os.path.join(wc_dir, fileB_path), 'fileB')
- os.mkdir(os.path.join(wc_dir, dirB_path))
- svntest.main.file_append(os.path.join(wc_dir, nope_1_path), 'nope_1')
- svntest.main.file_append(os.path.join(wc_dir, nope_2_path), 'nope_2')
+ os.mkdir(sbox.ospath(dirA_path))
+ svntest.main.file_append(sbox.ospath(fileA_path), 'fileA')
+ svntest.main.file_append(sbox.ospath(fileB_path), 'fileB')
+ os.mkdir(sbox.ospath(dirB_path))
+ svntest.main.file_append(sbox.ospath(nope_1_path), 'nope_1')
+ svntest.main.file_append(sbox.ospath(nope_2_path), 'nope_2')
# Add them to version control.
svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
'add', '-N',
- os.path.join(wc_dir, dirA_path),
- os.path.join(wc_dir, fileA_path),
+ sbox.ospath(dirA_path),
+ sbox.ospath(fileA_path),
# don't add fileB
- os.path.join(wc_dir, dirB_path),
- os.path.join(wc_dir, nope_1_path),
+ sbox.ospath(dirB_path),
+ sbox.ospath(nope_1_path),
# don't add nope_2
)
@@ -1765,7 +1765,7 @@ def commit_nonrecursive(sbox):
expected_output,
expected_status,
None,
- '-N', os.path.join(wc_dir, dirA_path))
+ '-N', sbox.ospath(dirA_path))
#----------------------------------------------------------------------
# Regression for #1017: ra_neon was allowing the deletion of out-of-date
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py Mon Jan 21 23:37:01 2013
@@ -127,8 +127,7 @@ def copy_replace_with_props(sbox, wc_cop
expected_disk.tweak('A/D/G/rho',
props={ 'svn:eol-style': 'LF' })
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk, True)
# Commit props
expected_output = svntest.wc.State(wc_dir, {
@@ -172,8 +171,7 @@ def copy_replace_with_props(sbox, wc_cop
expected_disk.tweak('A/D/G/rho',
contents="This is the file 'pi'.\n",
props=props)
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 1)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
# Now commit and verify
expected_status.tweak('A/D/G/rho', status='R ', copied='+', wc_rev='-')
@@ -1376,8 +1374,7 @@ def revision_kinds_local_source(sbox):
raise svntest.Failure
# Check that the new files have the right contents
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
#-------------------------------------------------------------
@@ -2113,7 +2110,7 @@ def move_moved_file_and_dir(sbox):
# Create expected status tree
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
- 'A/D/G/E_move_moved/' : Item(status=' ', wc_rev=2),
+ 'A/D/G/E_move_moved' : Item(status=' ', wc_rev=2),
'A/D/G/E_move_moved/alpha' : Item(status=' ', wc_rev=2),
'A/D/G/E_move_moved/beta' : Item(status=' ', wc_rev=2),
'A/B/F/rho_move_moved' : Item(status=' ', wc_rev=2),
@@ -2653,12 +2650,7 @@ def copy_added_paths_with_props(sbox):
'A/D/I' : Item(props={'foo' : 'bar'}),
})
- # Read disk state with props
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
-
- # Compare actual vs. expected disk trees.
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
# Copy added dir I to dir A/C
I_copy_path = sbox.ospath('A/C/I')
@@ -2699,12 +2691,7 @@ def copy_added_paths_with_props(sbox):
expected_status,
None,
wc_dir)
- # Read disk state with props
- actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, 1)
-
- # Compare actual vs. expected disk trees.
- svntest.tree.compare_trees("disk", actual_disk_tree,
- expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
def copy_added_paths_to_URL(sbox):
"copy added path to URL"
@@ -3323,8 +3310,7 @@ def copy_peg_rev_local_files(sbox):
'sigma' : Item(contents=psi_text, props={}),
})
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 3)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
#----------------------------------------------------------------------
@@ -3406,8 +3392,7 @@ def copy_peg_rev_local_dirs(sbox):
'A/J/beta' : Item(contents="This is the file 'beta'.\n"),
})
- actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 5)
- svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
+ svntest.actions.verify_disk(wc_dir, expected_disk.old_tree(), True)
#----------------------------------------------------------------------
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/diff_tests.py?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/diff_tests.py Mon Jan 21 23:37:01 2013
@@ -3437,6 +3437,52 @@ def diff_git_format_wc_wc(sbox):
svntest.actions.run_and_verify_svn(None, expected, [], 'diff',
'--git', wc_dir)
+@Issue(4294)
+def diff_git_format_wc_wc_dir_mv(sbox):
+ "create a diff in git unidff format for wc dir mv"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ g_path = sbox.ospath('A/D/G')
+ g2_path = sbox.ospath('A/D/G2')
+ pi_path = sbox.ospath('A/D/G/pi')
+ rho_path = sbox.ospath('A/D/G/rho')
+ tau_path = sbox.ospath('A/D/G/tau')
+ new_pi_path = sbox.ospath('A/D/G2/pi')
+ new_rho_path = sbox.ospath('A/D/G2/rho')
+ new_tau_path = sbox.ospath('A/D/G2/tau')
+
+ svntest.main.run_svn(None, 'mv', g_path, g2_path)
+
+ expected_output = make_git_diff_header(pi_path, "A/D/G/pi",
+ "revision 1", "working copy",
+ delete=True) \
+ + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'pi'.\n"
+ ] + make_git_diff_header(rho_path, "A/D/G/rho",
+ "revision 1", "working copy",
+ delete=True) \
+ + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'rho'.\n"
+ ] + make_git_diff_header(tau_path, "A/D/G/tau",
+ "revision 1", "working copy",
+ delete=True) \
+ + [
+ "@@ -1 +0,0 @@\n",
+ "-This is the file 'tau'.\n"
+ ] + make_git_diff_header(new_pi_path, "A/D/G2/pi", None, None, cp=True,
+ copyfrom_path="A/D/G/pi", text_changes=False) \
+ + make_git_diff_header(new_rho_path, "A/D/G2/rho", None, None, cp=True,
+ copyfrom_path="A/D/G/rho", text_changes=False) \
+ + make_git_diff_header(new_tau_path, "A/D/G2/tau", None, None, cp=True,
+ copyfrom_path="A/D/G/tau", text_changes=False)
+
+ expected = svntest.verify.UnorderedOutput(expected_output)
+
+ svntest.actions.run_and_verify_svn(None, expected, [], 'diff',
+ '--git', wc_dir)
+
def diff_git_format_url_wc(sbox):
"create a diff in git unidiff format for url-wc"
sbox.build()
@@ -4224,6 +4270,7 @@ test_list = [ None,
diff_properties_only,
diff_properties_no_newline,
diff_arbitrary_same,
+ diff_git_format_wc_wc_dir_mv,
]
if __name__ == '__main__':
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/entries-dump.c?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/entries-dump.c Mon Jan 21 23:37:01 2013
@@ -148,7 +148,7 @@ entries_dump(const char *dir_path, apr_p
/* skip: keep_local */
int_value("depth", entry->depth);
/* skip: tree_conflict_data */
- /* skip: file_external_path */
+ bool_value("file_external", entry->file_external_path != NULL);
/* skip: file_external_peg_rev */
/* skip: file_external_rev */
bool_value("locked", locked && *entry->name == '\0');
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=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/externals_tests.py Mon Jan 21 23:37:01 2013
@@ -1055,10 +1055,51 @@ def cannot_move_or_remove_file_externals
'A/B/F', 'A/B/lambda')
expected_status.add({
- 'A/D/exdir_A' : Item(status='X '),
- 'A/D/x' : Item(status='X '),
- 'A/C/exdir_H' : Item(status='X '),
- 'A/C/exdir_G' : Item(status='X '),
+ 'A/D/exdir_A' : Item(status=' ', wc_rev='5', prev_status='X '),
+ 'A/D/exdir_A/D' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/gamma' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/chi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/psi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/omega' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/beta' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/alpha' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/F' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/lambda' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/H' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/psi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/omega' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/C' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/mu' : Item(status=' ', wc_rev='5'),
+
+ 'A/C/exdir_G' : Item(status=' ', prev_status='X ', wc_rev='5'),
+ 'A/C/exdir_G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/rho' : Item(status=' ', wc_rev='5'),
+
+ 'A/D/x' : Item(status='X '),
+ 'A/D/x/y/z/blah' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/lambda' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/beta' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/alpha': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/F' : Item(status=' ', wc_rev='5'),
+
+ 'A/C/exdir_H' : Item(status=' ', prev_status='X ', wc_rev='1'),
+ 'A/C/exdir_H/omega' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/psi' : Item(status=' ', wc_rev='1'),
})
svntest.actions.run_and_verify_commit(wc_dir,
@@ -1433,7 +1474,9 @@ def relegate_external(sbox):
})
expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
expected_status.add({
- 'A/external' : Item(status='X '),
+ 'A/external' : Item(status=' ', prev_status='X ', wc_rev='2'),
+ 'A/external/alpha' : Item(status=' ', wc_rev='2'),
+ 'A/external/beta' : Item(status=' ', wc_rev='2'),
})
svntest.actions.run_and_verify_update(wc_dir,
expected_output,
@@ -1878,10 +1921,52 @@ def exclude_externals(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 6)
expected_status.add({
'A/B/gamma' : Item(status=' ', wc_rev='6', switched='X'),
- 'A/C/exdir_H' : Item(status='X '),
- 'A/C/exdir_G' : Item(status='X '),
- 'A/D/exdir_A' : Item(status='X '),
+
+ 'A/C/exdir_H' : Item(status=' ', prev_status='X ', wc_rev='1'),
+ 'A/C/exdir_H/omega' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/C/exdir_H/psi' : Item(status=' ', wc_rev='1'),
+
+ 'A/C/exdir_G' : Item(status=' ', prev_status='X ', wc_rev='5'),
+ 'A/C/exdir_G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/C/exdir_G/tau' : Item(status=' ', wc_rev='5'),
+
+ 'A/D/exdir_A' : Item(status=' ', prev_status='X ', wc_rev='5'),
+ 'A/D/exdir_A/H' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/psi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/chi' : Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/H/omega': Item(status=' ', wc_rev='1'),
+ 'A/D/exdir_A/D' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/chi': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/omega': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/H/psi': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/pi': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/rho': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/G/tau': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/D/gamma': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/F' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/beta': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/E/alpha': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/B/lambda': Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/C' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/tau' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/rho' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/G/pi' : Item(status=' ', wc_rev='5'),
+ 'A/D/exdir_A/mu' : Item(status=' ', wc_rev='5'),
+
'A/D/x' : Item(status='X '),
+ 'A/D/x/y/z/blah' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E' : Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/alpha': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/E/beta': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/lambda': Item(status=' ', wc_rev='5'),
+ 'A/D/x/y/z/blah/F' : Item(status=' ', wc_rev='5'),
})
svntest.actions.run_and_verify_update(wc_dir,
None, None, expected_status, None,
@@ -2353,13 +2438,28 @@ def commit_include_externals(sbox):
expected_status.tweak(wc_rev='3')
expected_status.add({
- 'A/D/H/xZ' : Item(status='X '),
+ 'A/D/H/xZ' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'A/D/H/xZ/zeta' : Item(status=' ', wc_rev='3'),
+
'Xpegged/xiota' : Item(status=' ', wc_rev='1', switched='X'),
- 'Xpegged/xE' : Item(status='X '),
- 'X/Y/xH' : Item(status='X '),
+ 'Xpegged/xE' : Item(status=' ', prev_status='X ', wc_rev='1'),
+ 'Xpegged/xE/alpha' : Item(status=' ', wc_rev='1'),
+ 'Xpegged/xE/beta' : Item(status=' ', wc_rev='1'),
+
+ 'X/Y/xH' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/Y/xH/psi' : Item(status=' ', wc_rev='3'),
+ 'X/Y/xH/omega' : Item(status=' ', wc_rev='3'),
+ 'X/Y/xH/chi' : Item(status=' ', wc_rev='3'),
+ 'X/Y/xH/xZ' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/Y/xH/xZ/zeta' : Item(status=' ', wc_rev='3'),
+
'X/Y/xlambda' : Item(status=' ', wc_rev='3', switched='X'),
'X/xmu' : Item(status=' ', wc_rev='3', switched='X'),
- 'X/xG' : Item(status='X '),
+
+ 'X/xG' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/xG/rho' : Item(status=' ', wc_rev='3'),
+ 'X/xG/tau' : Item(status=' ', wc_rev='3'),
+ 'X/xG/pi' : Item(status=' ', wc_rev='3'),
})
expected_status.tweak('Xpegged/xiota', wc_rev='1')
@@ -2385,7 +2485,9 @@ def commit_include_externals(sbox):
main.file_append(X_Y_xH_xZ_zeta, 'mod\n')
# svn status
- expected_status.tweak('X/Y/xlambda', 'X/xmu', status='M ')
+ expected_status.tweak('X/Y/xlambda', 'X/xmu', 'X/Y/xH/chi',
+ 'X/Y/xH/xZ/zeta', 'Xpegged/xE/alpha',
+ 'X/xG/pi', status='M ')
actions.run_and_verify_unquiet_status(wc_dir, expected_status)
@@ -2421,9 +2523,10 @@ def commit_include_externals(sbox):
})
expected_status.tweak(status=' ')
- expected_status.tweak('X/Y/xlambda', 'X/xmu', wc_rev='4')
- expected_status.tweak('X/Y/xH', 'X/xG', 'A/D/H/xZ', 'Xpegged/xE',
- status='X ')
+ expected_status.tweak('X/xmu', 'X/Y/xlambda', 'X/Y/xH/xZ/zeta',
+ 'X/Y/xH/chi', 'X/xG/pi', wc_rev='4')
+
+ expected_status.tweak('Xpegged/xE/alpha', status='M ')
actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
None, '--include-externals', wc_dir)
@@ -2451,10 +2554,11 @@ def commit_include_externals(sbox):
expected_disk.tweak('A/B/lambda', 'X/Y/xlambda',
contents="This is the file 'lambda'.\nmod\n")
- expected_status.tweak(wc_rev='4')
- expected_status.tweak('Xpegged/xiota', wc_rev='1')
- expected_status.tweak('A/D/H/xZ', 'Xpegged/xE', 'X/Y/xH', 'X/xG',
- wc_rev=None)
+
+ # Assume everything r4, except what is pegged
+ expected_status.tweak(wc_rev='4')
+ expected_status.tweak('Xpegged/xiota', 'Xpegged/xE', 'Xpegged/xE/alpha',
+ 'Xpegged/xE/beta', wc_rev=1)
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
expected_status, None, None, None, None, None, False, wc_dir)
@@ -2476,7 +2580,8 @@ def commit_include_externals(sbox):
main.file_append(X_Y_xH_xZ_zeta, 'mod\n')
# svn status
- expected_status.tweak('X/Y/xlambda', 'X/xmu', status='M ')
+ expected_status.tweak('X/Y/xlambda', 'X/xmu', 'X/xG/pi',
+ 'X/Y/xH/chi', 'X/Y/xH/xZ/zeta', status='M ')
actions.run_and_verify_unquiet_status(wc_dir, expected_status)
@@ -2495,9 +2600,8 @@ def commit_include_externals(sbox):
expected_status.tweak(status=' ')
expected_status.tweak('X/xmu', wc_rev='5')
- expected_status.tweak('X/Y/xlambda', status='M ')
- expected_status.tweak('X/Y/xH', 'X/xG', 'A/D/H/xZ', 'Xpegged/xE',
- status='X ')
+ expected_status.tweak('X/Y/xlambda', 'X/xG/pi', 'X/Y/xH/chi',
+ 'X/Y/xH/xZ/zeta', 'Xpegged/xE/alpha', status='M ')
actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
None, '--include-externals', '--depth=files', X)
@@ -2523,8 +2627,10 @@ def commit_include_externals(sbox):
expected_status.tweak(wc_rev='5')
expected_status.tweak('Xpegged/xiota', wc_rev='1')
- expected_status.tweak('A/D/H/xZ', 'Xpegged/xE', 'X/Y/xH', 'X/xG',
- wc_rev=None)
+ expected_status.tweak('Xpegged/xiota', 'Xpegged/xE', 'Xpegged/xE/alpha',
+ 'Xpegged/xE/beta', wc_rev=1)
+
+ expected_status.tweak('X/Y/xH/chi', status='M ')
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
expected_status, None, None, None, None, None, False, wc_dir)
@@ -2543,9 +2649,9 @@ def commit_include_externals(sbox):
})
expected_status.tweak(status=' ')
- expected_status.tweak('X/Y/xlambda', wc_rev='6')
- expected_status.tweak('X/Y/xH', 'X/xG', 'A/D/H/xZ', 'Xpegged/xE',
- status='X ')
+ expected_status.tweak('X/Y/xlambda', 'X/xG/pi', wc_rev='6')
+ expected_status.tweak('X/Y/xH/chi', 'X/Y/xH/xZ/zeta', 'Xpegged/xE/alpha',
+ status='M ')
actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
None, X_Y_xlambda, X_xG)
@@ -2555,7 +2661,6 @@ def commit_include_externals(sbox):
@Issue(4252)
-@XFail()
def include_immediate_dir_externals(sbox):
"commit --include-externals --depth=immediates"
# See also comment in append_externals_as_explicit_targets() in
@@ -2646,22 +2751,22 @@ def include_immediate_dir_externals(sbox
expected_status.tweak(wc_rev='3')
expected_status.add({
- 'X/XE' : Item(status='X '),
+ 'X/XE' : Item(status=' ', prev_status='X ', wc_rev='3'),
+ 'X/XE/beta' : Item(status=' ', wc_rev='3'),
+ 'X/XE/alpha' : Item(status=' ', wc_rev='3'),
})
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
expected_status, None, None, None, None, None, False, wc_dir)
- # svn ps some change X/XE
- expected_stdout = ["property 'some' set on '" + X_XE + "'\n"]
-
- actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'ps', 'some',
- 'change', X_XE)
+ sbox.simple_propset('some', 'change', 'X/XE')
# echo mod >> X/XE/alpha
main.file_append(X_XE_alpha, 'mod\n')
# svn st X/XE
+ expected_status.tweak('X/XE', status=' M')
+ expected_status.tweak('X/XE/alpha', status='M ')
actions.run_and_verify_unquiet_status(wc_dir, expected_status)
# Expect only the propset on X/XE to be committed.
@@ -2670,6 +2775,7 @@ def include_immediate_dir_externals(sbox
expected_output = svntest.wc.State(wc_dir, {
'X/XE' : Item(verb='Sending'),
})
+ expected_status.tweak('X/XE', status=' ', wc_rev=4)
# Currently this fails because nothing is committed.
#
@@ -2801,7 +2907,9 @@ def dir_external_with_dash_r_only(sbox):
expected_status.tweak(wc_rev='2')
expected_status.tweak('', status=' M')
expected_status.add({
- 'E_ext' : Item(status='X '),
+ 'E_ext' : Item(status=' ', prev_status='X ', wc_rev=1),
+ 'E_ext/beta' : Item(status=' ', wc_rev='1'),
+ 'E_ext/alpha' : Item(status=' ', wc_rev='1'),
})
actions.run_and_verify_update(wc_dir, expected_output, expected_disk,
@@ -2992,6 +3100,92 @@ def list_include_externals(sbox):
exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2(
"OUTPUT", expected_stdout, [], 0, 'ls', '--include-externals', C_url)
+@Issue(4293)
+def move_with_file_externals(sbox):
+ "move with file externals"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ sbox.simple_propset('svn:externals', '^/A/mu@1 mu-1\n', 'A/D')
+ sbox.simple_commit()
+
+ sbox.simple_update()
+ sbox.simple_move('A/D', 'A/D_moved')
+ sbox.simple_commit()
+ sbox.simple_update()
+
+@Issue(4185)
+def pinned_externals(sbox):
+ "pinned external"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ # Create X in r2
+ sbox.simple_copy('A', 'X')
+ sbox.simple_mkdir('Z')
+ sbox.simple_commit('')
+
+ repo_X_mu = repo_url + '/X/mu'
+
+ expected_output = verify.RegexOutput([
+ '^ 1 jrandom .* mu$'
+ ])
+
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'list', repo_X_mu, '-v')
+
+ # So, we copied A/mu to X/mu in r2, but its last changed revision is
+ # still r1. It existed as A/mu at r1.
+
+ # In the old format the -r is interpreted like an @1 on checkout.
+
+ sbox.simple_propset('svn:externals',
+ 'old-plain ' + repo_X_mu + '\n' +
+ 'old-rev -r 1 ' + repo_X_mu + '\n' +
+ repo_X_mu + ' new-plain\n' +
+ '-r1 ' + repo_X_mu + ' new-rev\n' +
+ repo_X_mu + '@1 new-peg\n',
+ 'Z')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/D' : Item(status=' U'),
+ 'A/D/exdir_E/beta' : Item(status='A '),
+ 'A/D/exdir_E/alpha' : Item(status='A '),
+ })
+ expected_error = "svn: E205011: Failure.*externals"
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ # The interesting values
+ 'Z/old-plain' : Item(contents="This is the file 'mu'.\n"),
+ 'Z/new-plain' : Item(contents="This is the file 'mu'.\n"),
+
+ # And verifying X
+ 'X/D/H/psi' : Item(contents="This is the file 'psi'.\n"),
+ 'X/D/H/chi' : Item(contents="This is the file 'chi'.\n"),
+ 'X/D/H/omega' : Item(contents="This is the file 'omega'.\n"),
+ 'X/D/G/tau' : Item(contents="This is the file 'tau'.\n"),
+ 'X/D/G/pi' : Item(contents="This is the file 'pi'.\n"),
+ 'X/D/G/rho' : Item(contents="This is the file 'rho'.\n"),
+ 'X/D/gamma' : Item(contents="This is the file 'gamma'.\n"),
+ 'X/B/E/alpha' : Item(contents="This is the file 'alpha'.\n"),
+ 'X/B/E/beta' : Item(contents="This is the file 'beta'.\n"),
+ 'X/B/lambda' : Item(contents="This is the file 'lambda'.\n"),
+ 'X/B/F' : Item(),
+ 'X/C' : Item(),
+ 'X/mu' : Item(contents="This is the file 'mu'.\n"),
+ })
+
+
+ # ### Would be nice if verify update would still verify the result
+ # on exiting with an error. Why would you pass it?
+ svntest.actions.run_and_verify_update(wc_dir, None, None, None,
+ expected_error)
+
+ svntest.actions.verify_disk(wc_dir, expected_disk)
########################################################################
@@ -3043,6 +3237,8 @@ test_list = [ None,
url_to_wc_copy_of_externals,
duplicate_targets,
list_include_externals,
+ move_with_file_externals,
+ pinned_externals,
]
if __name__ == '__main__':
Modified: subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1436688&r1=1436687&r2=1436688&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Mon Jan 21 23:37:01 2013
@@ -187,7 +187,7 @@ Valid options:
--diff3-cmd ARG : use ARG as merge command
--relocate : relocate via URL-rewriting
--ignore-externals : ignore externals definitions
- --ignore-ancestry : ignore ancestry when calculating merges
+ --ignore-ancestry : allow switching to a node with no common ancestor
--force : force operation to run
--accept ARG : specify automatic conflict resolution action
('postpone', 'working', 'base', 'mine-conflict',