You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/15 10:52:18 UTC
svn commit: r1532250 [29/37] - in /subversion/branches/cache-server: ./
build/ build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ contrib/client-side/emacs/ contrib/hook-scripts/
contrib/server-side/fsfsfixer/ contrib/se...
Modified: subversion/branches/cache-server/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/cl-conflicts.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/cache-server/subversion/svn/cl-conflicts.c Tue Oct 15 08:52:06 2013
@@ -21,6 +21,7 @@
* ====================================================================
*/
+#include "svn_private_config.h"
#include "cl-conflicts.h"
#include "svn_hash.h"
#include "svn_xml.h"
@@ -30,9 +31,6 @@
#include "cl.h"
-#include "svn_private_config.h"
-
-
/* A map for svn_wc_conflict_action_t values to XML strings */
static const svn_token_map_t map_conflict_action_xml[] =
{
Modified: subversion/branches/cache-server/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/cl.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/cl.h (original)
+++ subversion/branches/cache-server/subversion/svn/cl.h Tue Oct 15 08:52:06 2013
@@ -223,6 +223,7 @@ typedef struct svn_cl__opt_state_t
(not converted to UTF-8) */
svn_boolean_t parents; /* create intermediate directories */
svn_boolean_t use_merge_history; /* use/display extra merge information */
+ svn_boolean_t auto_moves; /* interpret unique DEL/ADD pairs as moves */
svn_cl__accept_t accept_which; /* how to handle conflicts */
svn_cl__show_revs_t show_revs; /* mergeinfo flavor */
svn_depth_t set_depth; /* new sticky ambient depth value */
@@ -239,6 +240,10 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
svn_boolean_t show_inherited_props; /* get inherited properties */
apr_array_header_t* search_patterns; /* pattern arguments for --search */
+ svn_boolean_t mergeinfo_log; /* show log message in mergeinfo command */
+ svn_boolean_t remove_unversioned;/* remove unversioned items */
+ svn_boolean_t remove_ignored; /* remove ignored items */
+ svn_boolean_t no_newline; /* do not output the trailing newline */
} svn_cl__opt_state_t;
@@ -286,7 +291,8 @@ svn_opt_subcommand_t
svn_cl__switch,
svn_cl__unlock,
svn_cl__update,
- svn_cl__upgrade;
+ svn_cl__upgrade,
+ svn_cl__youngest;
/* See definition in svn.c for documentation. */
@@ -436,12 +442,12 @@ svn_cl__time_cstring_to_human_cstring(co
Increment *TEXT_CONFLICTS, *PROP_CONFLICTS, or *TREE_CONFLICTS if
a conflict was encountered.
- Use CWD_ABSPATH -- the absolute path of the current working
- directory -- to shorten PATH into something relative to that
- directory as necessary.
+ Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+ relative to the target as necessary.
*/
svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_boolean_t suppress_externals_placeholders,
@@ -459,12 +465,12 @@ svn_cl__print_status(const char *cwd_abs
/* Print STATUS for PATH in XML to stdout. Use POOL for temporary
allocations.
- Use CWD_ABSPATH -- the absolute path of the current working
- directory -- to shorten PATH into something relative to that
- directory as necessary.
+ Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+ relative to the target as necessary.
*/
svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_client_ctx_t *ctx,
@@ -820,23 +826,6 @@ svn_cl__local_style_skip_ancestor(const
const char *path,
apr_pool_t *pool);
-/* Check that PATH_OR_URL1@REVISION1 is related to PATH_OR_URL2@REVISION2.
- * Raise an error if not.
- *
- * ### Ideally we would also check that they are on different lines of
- * history. That is easy in common cases, but to give a correct answer in
- * general we need to know the operative revision(s) as well. For example,
- * when one location is the branch point from which the other branch was
- * copied.
- */
-svn_error_t *
-svn_cl__check_related_source_and_target(const char *path_or_url1,
- const svn_opt_revision_t *revision1,
- const char *path_or_url2,
- const svn_opt_revision_t *revision2,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool);
-
/* If the user is setting a mime-type to mark one of the TARGETS as binary,
* as determined by property name PROPNAME and value PROPVAL, then check
* whether Subversion's own binary-file detection recognizes the target as
Modified: subversion/branches/cache-server/subversion/svn/cleanup-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/cleanup-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/cleanup-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/cleanup-cmd.c Tue Oct 15 08:52:06 2013
@@ -69,7 +69,10 @@ svn_cl__cleanup(apr_getopt_t *os,
svn_pool_clear(subpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
- err = svn_client_cleanup(target, ctx, subpool);
+ err = svn_client_cleanup2(target, opt_state->include_externals,
+ opt_state->remove_unversioned,
+ opt_state->remove_ignored,
+ ctx, subpool);
if (err && err->apr_err == SVN_ERR_WC_LOCKED)
{
const char *target_abspath;
@@ -79,6 +82,16 @@ svn_cl__cleanup(apr_getopt_t *os,
{
err = svn_error_compose_create(err, err2);
}
+ else if (opt_state->remove_unversioned || opt_state->remove_ignored)
+ {
+ err = svn_error_create(SVN_ERR_WC_LOCKED, err,
+ _("Working copy locked; if no other "
+ "Subversion client is currently "
+ "using the working copy, try running "
+ "'svn cleanup' without the "
+ "--remove-unversioned and "
+ "--remove-ignored options first."));
+ }
else
{
const char *wcroot_abspath;
@@ -96,6 +109,14 @@ svn_cl__cleanup(apr_getopt_t *os,
subpool));
}
}
+ else if (err && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY &&
+ (opt_state->remove_unversioned || opt_state->remove_ignored))
+ {
+ err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, err,
+ _("Cannot remove unversioned or ignored "
+ "items from something that is not a "
+ "working copy"));
+ }
SVN_ERR(err);
}
Modified: subversion/branches/cache-server/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/commit-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/commit-cmd.c Tue Oct 15 08:52:06 2013
@@ -29,6 +29,7 @@
#include <apr_general.h>
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_error.h"
#include "svn_error_codes.h"
@@ -40,8 +41,6 @@
#include "svn_config.h"
#include "cl.h"
-#include "svn_private_config.h"
-
/* Wrapper notify_func2 function and baton for warning about
Modified: subversion/branches/cache-server/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/conflict-callbacks.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/cache-server/subversion/svn/conflict-callbacks.c Tue Oct 15 08:52:06 2013
@@ -27,6 +27,7 @@
#define APR_WANT_STRFUNC
#include <apr_want.h>
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_client.h"
@@ -41,8 +42,6 @@
#include "private/svn_cmdline_private.h"
-#include "svn_private_config.h"
-
#define ARRAY_LEN(ary) ((sizeof (ary)) / (sizeof ((ary)[0])))
@@ -227,20 +226,25 @@ show_conflicts(const svn_wc_conflict_des
pool);
}
-/* Display the conflicting values of a property as a 3-way diff.
+/* Perform a 3-way merge of the conflicting values of a property,
+ * and write the result to the OUTPUT stream.
+ *
+ * If MERGED_ABSPATH is non-NULL, use it as 'my' version instead of
+ * DESC->MY_ABSPATH.
*
* Assume the values are printable UTF-8 text.
*/
static svn_error_t *
-show_prop_conflict(const svn_wc_conflict_description2_t *desc,
- apr_pool_t *pool)
+merge_prop_conflict(svn_stream_t *output,
+ const svn_wc_conflict_description2_t *desc,
+ const char *merged_abspath,
+ apr_pool_t *pool)
{
const char *base_abspath = desc->base_abspath;
const char *my_abspath = desc->my_abspath;
const char *their_abspath = desc->their_abspath;
svn_diff_file_options_t *options = svn_diff_file_options_create(pool);
svn_diff_t *diff;
- svn_stream_t *output;
/* If any of the property values is missing, use an empty file instead
* for the purpose of showing a diff. */
@@ -260,13 +264,15 @@ show_prop_conflict(const svn_wc_conflict
}
options->ignore_eol_style = TRUE;
- SVN_ERR(svn_stream_for_stdout(&output, pool));
SVN_ERR(svn_diff_file_diff3_2(&diff,
- base_abspath, my_abspath, their_abspath,
+ base_abspath,
+ merged_abspath ? merged_abspath : my_abspath,
+ their_abspath,
options, pool));
SVN_ERR(svn_diff_file_output_merge2(output, diff,
base_abspath,
- my_abspath,
+ merged_abspath ? merged_abspath
+ : my_abspath,
their_abspath,
_("||||||| ORIGINAL"),
_("<<<<<<< MINE"),
@@ -278,8 +284,27 @@ show_prop_conflict(const svn_wc_conflict
return SVN_NO_ERROR;
}
+/* Display the conflicting values of a property as a 3-way diff.
+ *
+ * If MERGED_ABSPATH is non-NULL, show it as 'my' version instead of
+ * DESC->MY_ABSPATH.
+ *
+ * Assume the values are printable UTF-8 text.
+ */
+static svn_error_t *
+show_prop_conflict(const svn_wc_conflict_description2_t *desc,
+ const char *merged_abspath,
+ apr_pool_t *pool)
+{
+ svn_stream_t *output;
+
+ SVN_ERR(svn_stream_for_stdout(&output, pool));
+ SVN_ERR(merge_prop_conflict(output, desc, merged_abspath, pool));
+
+ return SVN_NO_ERROR;
+}
-/* Run an external editor, passing it the 'merged' file in DESC, or, if the
+/* Run an external editor, passing it the MERGED_FILE, or, if the
* 'merged' file is null, return an error. The tool to use is determined by
* B->editor_cmd, B->config and environment variables; see
* svn_cl__edit_file_externally() for details.
@@ -290,15 +315,15 @@ show_prop_conflict(const svn_wc_conflict
* return that error. */
static svn_error_t *
open_editor(svn_boolean_t *performed_edit,
- const svn_wc_conflict_description2_t *desc,
+ const char *merged_file,
svn_cl__interactive_conflict_baton_t *b,
apr_pool_t *pool)
{
svn_error_t *err;
- if (desc->merged_file)
+ if (merged_file)
{
- err = svn_cmdline__edit_file_externally(desc->merged_file, b->editor_cmd,
+ err = svn_cmdline__edit_file_externally(merged_file, b->editor_cmd,
b->config, pool);
if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
{
@@ -331,6 +356,34 @@ open_editor(svn_boolean_t *performed_edi
return SVN_NO_ERROR;
}
+/* Run an external editor, passing it the 'merged' property in DESC.
+ * The tool to use is determined by B->editor_cmd, B->config and
+ * environment variables; see svn_cl__edit_file_externally() for details. */
+static svn_error_t *
+edit_prop_conflict(const char **merged_file_path,
+ const svn_wc_conflict_description2_t *desc,
+ svn_cl__interactive_conflict_baton_t *b,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ apr_file_t *file;
+ const char *file_path;
+ svn_boolean_t performed_edit = FALSE;
+ svn_stream_t *merged_prop;
+
+ SVN_ERR(svn_io_open_unique_file3(&file, &file_path, NULL,
+ svn_io_file_del_on_pool_cleanup,
+ result_pool, scratch_pool));
+ merged_prop = svn_stream_from_aprfile2(file, TRUE /* disown */,
+ scratch_pool);
+ SVN_ERR(merge_prop_conflict(merged_prop, desc, NULL, scratch_pool));
+ SVN_ERR(svn_stream_close(merged_prop));
+ SVN_ERR(svn_io_file_flush(file, scratch_pool));
+ SVN_ERR(open_editor(&performed_edit, file_path, b, scratch_pool));
+ *merged_file_path = (performed_edit ? file_path : NULL);
+
+ return SVN_NO_ERROR;
+}
/* Run an external merge tool, passing it the 'base', 'their', 'my' and
* 'merged' files in DESC. The tool to use is determined by B->config and
@@ -346,31 +399,11 @@ launch_resolver(svn_boolean_t *performed
svn_cl__interactive_conflict_baton_t *b,
apr_pool_t *pool)
{
- svn_error_t *err;
-
- err = svn_cl__merge_file_externally(desc->base_abspath, desc->their_abspath,
- desc->my_abspath, desc->merged_file,
- desc->local_abspath, b->config, NULL,
- pool);
- if (err && err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
- err->message ? err->message :
- _("No merge tool found, "
- "try '(m) merge' instead.\n")));
- svn_error_clear(err);
- }
- else if (err && err->apr_err == SVN_ERR_EXTERNAL_PROGRAM)
- {
- SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
- err->message ? err->message :
- _("Error running merge tool, "
- "try '(m) merge' instead.")));
- svn_error_clear(err);
- }
- else if (err)
- return svn_error_trace(err);
- else if (performed_edit)
+ SVN_ERR(svn_cl__merge_file_externally(desc->base_abspath, desc->their_abspath,
+ desc->my_abspath, desc->merged_file,
+ desc->local_abspath, b->config, NULL,
+ pool));
+ if (performed_edit)
*performed_edit = TRUE;
return SVN_NO_ERROR;
@@ -401,7 +434,7 @@ static const resolver_option_t text_conf
-1 },
{ "df", N_("show diff"), N_("show all changes made to merged file"),
-1 },
- { "r", N_("resolved"), N_("accept merged version of file"),
+ { "r", N_("mark resolved"), N_("accept merged version of file"),
svn_wc_conflict_choose_merged },
{ "", "", "", svn_wc_conflict_choose_unspecified },
{ "dc", N_("display conflict"), N_("show all conflicts "
@@ -421,13 +454,13 @@ static const resolver_option_t text_conf
"(same) [theirs-full]"),
svn_wc_conflict_choose_theirs_full },
{ "", "", "", svn_wc_conflict_choose_unspecified },
+ { "m", N_("merge"), N_("use merge tool to resolve conflict"),
+ -1 },
+ { "l", N_("launch tool"), N_("launch external tool to resolve "
+ "conflict [launch]"), -1 },
{ "p", N_("postpone"), N_("mark the conflict to be resolved later"
" [postpone]"),
svn_wc_conflict_choose_postpone },
- { "m", N_("merge"), N_("use internal merge tool to resolve "
- "conflict"), -1 },
- { "l", N_("launch tool"), N_("launch external tool to resolve "
- "conflict [launch]"), -1 },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
svn_wc_conflict_choose_postpone },
{ "s", N_("show all options"), N_("show this list (also 'h', '?')"), -1 },
@@ -437,9 +470,6 @@ static const resolver_option_t text_conf
/* Resolver options for a property conflict */
static const resolver_option_t prop_conflict_options[] =
{
- { "p", N_("postpone"), N_("mark the conflict to be resolved later"
- " [postpone]"),
- svn_wc_conflict_choose_postpone },
{ "mf", N_("my version"), N_("accept my version of entire property (even "
"non-conflicts) [mine-full]"),
svn_wc_conflict_choose_mine_full },
@@ -447,6 +477,13 @@ static const resolver_option_t prop_conf
"(same) [theirs-full]"),
svn_wc_conflict_choose_theirs_full },
{ "dc", N_("display conflict"), N_("show conflicts in this property"), -1 },
+ { "e", N_("edit property"), N_("change merged property value in an editor"
+ " [edit]"), -1 },
+ { "r", N_("mark resolved"), N_("accept edited version of property"),
+ svn_wc_conflict_choose_merged },
+ { "p", N_("postpone"), N_("mark the conflict to be resolved later"
+ " [postpone]"),
+ svn_wc_conflict_choose_postpone },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
svn_wc_conflict_choose_postpone },
{ "h", N_("help"), N_("show this help (also '?')"), -1 },
@@ -456,15 +493,15 @@ static const resolver_option_t prop_conf
/* Resolver options for an obstructued addition */
static const resolver_option_t obstructed_add_options[] =
{
- { "p", N_("postpone"), N_("mark the conflict to be resolved later"
- " [postpone]"),
- svn_wc_conflict_choose_postpone },
{ "mf", N_("my version"), N_("accept pre-existing item (ignore "
"upstream addition) [mine-full]"),
svn_wc_conflict_choose_mine_full },
{ "tf", N_("their version"), N_("accept incoming item (overwrite "
"pre-existing item) [theirs-full]"),
svn_wc_conflict_choose_theirs_full },
+ { "p", N_("postpone"), N_("mark the conflict to be resolved later"
+ " [postpone]"),
+ svn_wc_conflict_choose_postpone },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
svn_wc_conflict_choose_postpone },
{ "h", N_("help"), N_("show this help (also '?')"), -1 },
@@ -474,10 +511,10 @@ static const resolver_option_t obstructe
/* Resolver options for a tree conflict */
static const resolver_option_t tree_conflict_options[] =
{
+ { "r", N_("mark resolved"), N_("accept current working copy state"),
+ svn_wc_conflict_choose_merged },
{ "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
svn_wc_conflict_choose_postpone },
- { "r", N_("resolved"), N_("accept current working copy state"),
- svn_wc_conflict_choose_merged },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
svn_wc_conflict_choose_postpone },
{ "h", N_("help"), N_("show this help (also '?')"), -1 },
@@ -486,53 +523,32 @@ static const resolver_option_t tree_conf
static const resolver_option_t tree_conflict_options_update_moved_away[] =
{
- { "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
- svn_wc_conflict_choose_postpone },
- { "mc", N_("my side of conflict"), N_("apply update to the move destination"
- " [mine-conflict]"),
+ { "mc", N_("apply update to move destination (recommended)"),
+ N_("apply incoming update to move destination"
+ " [mine-conflict]"),
svn_wc_conflict_choose_mine_conflict },
- { "r", N_("resolved"), N_("mark resolved "
- "(the move will become a copy)"),
- svn_wc_conflict_choose_merged },
- { "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
- svn_wc_conflict_choose_postpone },
- { "h", N_("help"), N_("show this help (also '?')"), -1 },
- { NULL }
-};
-
-static const resolver_option_t tree_conflict_options_update_deleted[] =
-{
{ "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
svn_wc_conflict_choose_postpone },
- { "mc", N_("my side of conflict"), N_("keep any moves affected "
- "by this deletion [mine-conflict]"),
- svn_wc_conflict_choose_mine_conflict },
- { "r", N_("resolved"), N_("mark resolved (any affected moves will "
- "become copies)"),
- svn_wc_conflict_choose_merged },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
svn_wc_conflict_choose_postpone },
{ "h", N_("help"), N_("show this help (also '?')"), -1 },
{ NULL }
};
-static const resolver_option_t tree_conflict_options_update_replaced[] =
+static const resolver_option_t tree_conflict_options_update_edit_deleted_dir[] =
{
+ { "mc", N_("prepare for updating moved-away children, if any (recommended)"),
+ N_("allow updating moved-away children "
+ "with 'svn resolve' [mine-conflict]"),
+ svn_wc_conflict_choose_mine_conflict },
{ "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
svn_wc_conflict_choose_postpone },
- { "mc", N_("my side of conflict"), N_("keep any moves affected by this "
- "replacement [mine-conflict]"),
- svn_wc_conflict_choose_mine_conflict },
- { "r", N_("resolved"), N_("mark resolved (any affected moves will "
- "become copies)"),
- svn_wc_conflict_choose_merged },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
svn_wc_conflict_choose_postpone },
{ "h", N_("help"), N_("show this help (also '?')"), -1 },
{ NULL }
};
-
/* Return a pointer to the option description in OPTIONS matching the
* one- or two-character OPTION_CODE. Return NULL if not found. */
static const resolver_option_t *
@@ -792,27 +808,42 @@ handle_text_conflict(svn_wc_conflict_res
}
else if (strcmp(opt->code, "e") == 0 || strcmp(opt->code, ":-E") == 0)
{
- SVN_ERR(open_editor(&performed_edit, desc, b, iterpool));
+ SVN_ERR(open_editor(&performed_edit, desc->merged_file, b, iterpool));
if (performed_edit)
knows_something = TRUE;
}
else if (strcmp(opt->code, "m") == 0 || strcmp(opt->code, ":-g") == 0 ||
strcmp(opt->code, "=>-") == 0 || strcmp(opt->code, ":>.") == 0)
{
- if (desc->kind != svn_wc_conflict_kind_text)
+ svn_boolean_t remains_in_conflict;
+ svn_error_t *err;
+
+ err = launch_resolver(&performed_edit, desc, b, iterpool);
+ if (err)
{
- SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
- _("Invalid option; can only "
- "resolve text conflicts with "
- "the internal merge tool."
- "\n\n")));
- continue;
+ if (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL ||
+ err->apr_err == SVN_ERR_EXTERNAL_PROGRAM)
+ {
+ /* Try the internal merge tool. */
+ svn_error_clear(err);
+ }
+ else
+ return svn_error_trace(err);
}
- if (desc->base_abspath && desc->their_abspath &&
+ if (!performed_edit &&
+ desc->base_abspath && desc->their_abspath &&
desc->my_abspath && desc->merged_file)
{
- svn_boolean_t remains_in_conflict;
+ if (desc->kind != svn_wc_conflict_kind_text)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
+ _("Invalid option; can only "
+ "resolve text conflicts with "
+ "the internal merge tool."
+ "\n\n")));
+ continue;
+ }
SVN_ERR(svn_cl__merge_file(desc->base_abspath,
desc->their_abspath,
@@ -824,11 +855,13 @@ handle_text_conflict(svn_wc_conflict_res
b->config,
&remains_in_conflict,
iterpool));
- knows_something = !remains_in_conflict;
}
else
SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
_("Invalid option.\n\n")));
+
+ if (performed_edit || !remains_in_conflict)
+ knows_something = TRUE;
}
else if (strcmp(opt->code, "l") == 0 || strcmp(opt->code, ":-l") == 0)
{
@@ -839,7 +872,28 @@ handle_text_conflict(svn_wc_conflict_res
if (desc->base_abspath && desc->their_abspath &&
desc->my_abspath && desc->merged_file)
{
- SVN_ERR(launch_resolver(&performed_edit, desc, b, iterpool));
+ svn_error_t *err;
+
+ err = launch_resolver(&performed_edit, desc, b, iterpool);
+ if (err && err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+ err->message ? err->message :
+ _("No merge tool found, "
+ "try '(m) merge' instead.\n")));
+ svn_error_clear(err);
+ }
+ else if (err && err->apr_err == SVN_ERR_EXTERNAL_PROGRAM)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+ err->message ? err->message :
+ _("Error running merge tool, "
+ "try '(m) merge' instead.")));
+ svn_error_clear(err);
+ }
+ else if (err)
+ return svn_error_trace(err);
+
if (performed_edit)
knows_something = TRUE;
}
@@ -869,7 +923,7 @@ handle_text_conflict(svn_wc_conflict_res
SVN_ERR(svn_cmdline_fprintf(
stderr, iterpool,
_("Invalid option; use diff/edit/merge/launch "
- "before choosing 'resolved'.\n\n")));
+ "before choosing 'mark resolved'.\n\n")));
continue;
}
@@ -892,10 +946,13 @@ static svn_error_t *
handle_prop_conflict(svn_wc_conflict_result_t *result,
const svn_wc_conflict_description2_t *desc,
svn_cl__interactive_conflict_baton_t *b,
+ apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
apr_pool_t *iterpool;
const char *message;
+ const char *merged_file_path = NULL;
+ svn_boolean_t resolved_allowed = FALSE;
/* ### Work around a historical bug in the provider: the path to the
* conflict description file was put in the 'theirs' field, and
@@ -921,10 +978,23 @@ handle_prop_conflict(svn_wc_conflict_res
while (TRUE)
{
const resolver_option_t *opt;
+ const char *options[ARRAY_LEN(prop_conflict_options)];
+ const char **next_option = options;
+
+ *next_option++ = "p";
+ *next_option++ = "mf";
+ *next_option++ = "tf";
+ *next_option++ = "dc";
+ *next_option++ = "e";
+ if (resolved_allowed)
+ *next_option++ = "r";
+ *next_option++ = "q";
+ *next_option++ = "h";
+ *next_option++ = NULL;
svn_pool_clear(iterpool);
- SVN_ERR(prompt_user(&opt, prop_conflict_options, NULL, b->pb,
+ SVN_ERR(prompt_user(&opt, prop_conflict_options, options, b->pb,
iterpool));
if (! opt)
continue;
@@ -938,7 +1008,27 @@ handle_prop_conflict(svn_wc_conflict_res
}
else if (strcmp(opt->code, "dc") == 0)
{
- SVN_ERR(show_prop_conflict(desc, scratch_pool));
+ SVN_ERR(show_prop_conflict(desc, merged_file_path, scratch_pool));
+ }
+ else if (strcmp(opt->code, "e") == 0)
+ {
+ SVN_ERR(edit_prop_conflict(&merged_file_path, desc, b,
+ result_pool, scratch_pool));
+ resolved_allowed = (merged_file_path != NULL);
+ }
+ else if (strcmp(opt->code, "r") == 0)
+ {
+ if (! resolved_allowed)
+ {
+ SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
+ _("Invalid option; please edit the property "
+ "first.\n\n")));
+ continue;
+ }
+
+ result->merged_file = merged_file_path;
+ result->choice = svn_wc_conflict_choose_merged;
+ break;
}
else if (opt->choice != -1)
{
@@ -982,20 +1072,23 @@ handle_tree_conflict(svn_wc_conflict_res
svn_pool_clear(iterpool);
+ tc_opts = tree_conflict_options;
+
if (desc->operation == svn_wc_operation_update ||
desc->operation == svn_wc_operation_switch)
{
if (desc->reason == svn_wc_conflict_reason_moved_away)
- tc_opts = tree_conflict_options_update_moved_away;
- else if (desc->reason == svn_wc_conflict_reason_deleted)
- tc_opts = tree_conflict_options_update_deleted;
- else if (desc->reason == svn_wc_conflict_reason_replaced)
- tc_opts = tree_conflict_options_update_replaced;
- else
- tc_opts = tree_conflict_options;
+ {
+ tc_opts = tree_conflict_options_update_moved_away;
+ }
+ else if (desc->reason == svn_wc_conflict_reason_deleted ||
+ desc->reason == svn_wc_conflict_reason_replaced)
+ {
+ if (desc->action == svn_wc_conflict_action_edit &&
+ desc->node_kind == svn_node_dir)
+ tc_opts = tree_conflict_options_update_edit_deleted_dir;
+ }
}
- else
- tc_opts = tree_conflict_options;
SVN_ERR(prompt_user(&opt, tc_opts, NULL, b->pb, iterpool));
if (! opt)
@@ -1218,12 +1311,12 @@ conflict_func_interactive(svn_wc_conflic
Conflicting edits on a file's text, or
Conflicting edits on a property.
*/
- if (((desc->node_kind == svn_node_file)
+ if (((desc->kind == svn_wc_conflict_kind_text)
&& (desc->action == svn_wc_conflict_action_edit)
&& (desc->reason == svn_wc_conflict_reason_edited)))
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, scratch_pool));
+ SVN_ERR(handle_prop_conflict(*result, desc, b, result_pool, scratch_pool));
/*
Dealing with obstruction of additions can be tricky. The
@@ -1278,7 +1371,7 @@ svn_cl__conflict_func_interactive(svn_wc
b->path_prefix, desc->local_abspath, scratch_pool);
svn_cl__conflict_stats_resolved(b->conflict_stats, local_path,
- desc->kind);
+ desc->kind);
}
return SVN_NO_ERROR;
}
Modified: subversion/branches/cache-server/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/diff-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/diff-cmd.c Tue Oct 15 08:52:06 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_pools.h"
#include "svn_client.h"
#include "svn_string.h"
@@ -37,10 +38,9 @@
#include "svn_types.h"
#include "svn_cmdline.h"
#include "svn_xml.h"
+#include "svn_hash.h"
#include "cl.h"
-#include "svn_private_config.h"
-
/*** Code. ***/
@@ -179,6 +179,7 @@ svn_cl__diff(apr_getopt_t *os,
const char *old_target, *new_target;
apr_pool_t *iterpool;
svn_boolean_t pegged_diff = FALSE;
+ svn_boolean_t ignore_content_type;
svn_boolean_t show_copies_as_adds =
opt_state->diff.patch_compatible || opt_state->diff.show_copies_as_adds;
svn_boolean_t ignore_properties =
@@ -337,6 +338,21 @@ svn_cl__diff(apr_getopt_t *os,
}
+ /* Should we ignore the content-type when deciding what to diff? */
+ if (opt_state->force)
+ {
+ ignore_content_type = TRUE;
+ }
+ else
+ {
+ SVN_ERR(svn_config_get_bool(svn_hash_gets(ctx->config,
+ SVN_CONFIG_CATEGORY_CONFIG),
+ &ignore_content_type,
+ SVN_CONFIG_SECTION_MISCELLANY,
+ SVN_CONFIG_OPTION_DIFF_IGNORE_CONTENT_TYPE,
+ FALSE));
+ }
+
svn_opt_push_implicit_dot_target(targets, pool);
iterpool = svn_pool_create(pool);
@@ -399,7 +415,7 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
- opt_state->force,
+ ignore_content_type,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
@@ -450,7 +466,7 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->diff.no_diff_added,
opt_state->diff.no_diff_deleted,
show_copies_as_adds,
- opt_state->force,
+ ignore_content_type,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
Modified: subversion/branches/cache-server/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/file-merge.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/file-merge.c (original)
+++ subversion/branches/cache-server/subversion/svn/file-merge.c Tue Oct 15 08:52:06 2013
@@ -490,7 +490,7 @@ edit_chunk(apr_array_header_t **merged_c
return svn_error_create(SVN_ERR_IO_WRITE_ERROR, NULL,
_("Could not write data to temporary file"));
}
- SVN_ERR(svn_io_file_flush_to_disk(temp_file, scratch_pool));
+ SVN_ERR(svn_io_file_flush(temp_file, scratch_pool));
err = svn_cmdline__edit_file_externally(temp_file_name, editor_cmd,
config, scratch_pool);
@@ -655,6 +655,8 @@ merge_chunks(apr_array_header_t **merged
svn_stringbuf_appendcstr(
prompt,
_("Select: (1) use their version, (2) use your version,\n"
+ " (12) their version first, then yours,\n"
+ " (21) your version first, then theirs,\n"
" (e1) edit their version and use the result,\n"
" (e2) edit your version and use the result,\n"
" (eb) edit both versions and use the result,\n"
@@ -679,6 +681,24 @@ merge_chunks(apr_array_header_t **merged
*merged_chunk = chunk2;
break;
}
+ if (strcmp(answer, "12") == 0)
+ {
+ *merged_chunk = apr_array_make(result_pool,
+ chunk1->nelts + chunk2->nelts,
+ sizeof(svn_stringbuf_t *));
+ apr_array_cat(*merged_chunk, chunk1);
+ apr_array_cat(*merged_chunk, chunk2);
+ break;
+ }
+ if (strcmp(answer, "21") == 0)
+ {
+ *merged_chunk = apr_array_make(result_pool,
+ chunk1->nelts + chunk2->nelts,
+ sizeof(svn_stringbuf_t *));
+ apr_array_cat(*merged_chunk, chunk2);
+ apr_array_cat(*merged_chunk, chunk1);
+ break;
+ }
else if (strcmp(answer, "p") == 0)
{
*merged_chunk = NULL;
@@ -853,13 +873,20 @@ svn_cl__merge_file(const char *base_path
const char *merged_file_name;
struct file_merge_baton fmb;
svn_boolean_t executable;
+ const char *merged_path_local_style;
+ const char *merged_rel_path;
+ const char *wc_path_local_style;
+ const char *wc_rel_path = svn_dirent_skip_ancestor(path_prefix, wc_path);
+
+ /* PATH_PREFIX may not be an ancestor of WC_PATH, just use the
+ full WC_PATH in that case. */
+ if (wc_rel_path)
+ wc_path_local_style = svn_dirent_local_style(wc_rel_path, scratch_pool);
+ else
+ wc_path_local_style = svn_dirent_local_style(wc_path, scratch_pool);
-
- SVN_ERR(svn_cmdline_printf(
- scratch_pool, _("Merging '%s'.\n"),
- svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
- wc_path),
- scratch_pool)));
+ SVN_ERR(svn_cmdline_printf(scratch_pool, _("Merging '%s'.\n"),
+ wc_path_local_style));
SVN_ERR(svn_io_file_open(&original_file, base_path,
APR_READ | APR_BUFFERED,
@@ -905,29 +932,30 @@ svn_cl__merge_file(const char *base_path
if (fmb.abort_merge)
{
SVN_ERR(svn_io_remove_file2(merged_file_name, TRUE, scratch_pool));
- SVN_ERR(svn_cmdline_printf(
- scratch_pool, _("Merge of '%s' aborted.\n"),
- svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
- wc_path),
- scratch_pool)));
-
+ SVN_ERR(svn_cmdline_printf(scratch_pool, _("Merge of '%s' aborted.\n"),
+ wc_path_local_style));
return SVN_NO_ERROR;
}
SVN_ERR(svn_io_is_file_executable(&executable, merged_path, scratch_pool));
+
+ merged_rel_path = svn_dirent_skip_ancestor(path_prefix, merged_path);
+ if (merged_rel_path)
+ merged_path_local_style = svn_dirent_local_style(merged_rel_path,
+ scratch_pool);
+ else
+ merged_path_local_style = svn_dirent_local_style(merged_path,
+ scratch_pool);
+
SVN_ERR_W(svn_io_copy_file(merged_file_name, merged_path, FALSE,
scratch_pool),
apr_psprintf(scratch_pool,
_("Could not write merged result to '%s', saved "
"instead at '%s'.\n'%s' remains in conflict.\n"),
- svn_dirent_local_style(
- svn_dirent_skip_ancestor(path_prefix, merged_path),
- scratch_pool),
+ merged_path_local_style,
svn_dirent_local_style(merged_file_name,
scratch_pool),
- svn_dirent_local_style(
- svn_dirent_skip_ancestor(path_prefix, wc_path),
- scratch_pool)));
+ wc_path_local_style));
SVN_ERR(svn_io_set_file_executable(merged_path, executable, FALSE,
scratch_pool));
SVN_ERR(svn_io_remove_file2(merged_file_name, TRUE, scratch_pool));
@@ -941,15 +969,11 @@ svn_cl__merge_file(const char *base_path
SVN_ERR(svn_cmdline_printf(
scratch_pool,
_("Merge of '%s' completed (remains in conflict).\n"),
- svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
- wc_path),
- scratch_pool)));
+ wc_path_local_style));
else
SVN_ERR(svn_cmdline_printf(
scratch_pool, _("Merge of '%s' completed.\n"),
- svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
- wc_path),
- scratch_pool)));
+ wc_path_local_style));
return SVN_NO_ERROR;
}
Modified: subversion/branches/cache-server/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/help-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/help-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/help-cmd.c Tue Oct 15 08:52:06 2013
@@ -27,15 +27,13 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_string.h"
#include "svn_config.h"
#include "svn_error.h"
-#include "svn_version.h"
#include "cl.h"
-#include "svn_private_config.h"
-
/*** Code. ***/
@@ -48,10 +46,9 @@ svn_cl__help(apr_getopt_t *os,
svn_cl__opt_state_t *opt_state = NULL;
svn_stringbuf_t *version_footer = NULL;
- /* xgettext: the %s is for SVN_VER_NUMBER. */
- char help_header_template[] =
+ char help_header[] =
N_("usage: svn <subcommand> [options] [args]\n"
- "Subversion command-line client, version %s.\n"
+ "Subversion command-line client.\n"
"Type 'svn help <subcommand>' for help on a specific subcommand.\n"
"Type 'svn --version' to see the program version and RA modules\n"
" or 'svn --version --quiet' to see just the version number.\n"
@@ -66,9 +63,6 @@ svn_cl__help(apr_getopt_t *os,
N_("Subversion is a tool for version control.\n"
"For additional information, see http://subversion.apache.org/\n");
- char *help_header =
- apr_psprintf(pool, _(help_header_template), SVN_VER_NUMBER);
-
const char *ra_desc_start
= _("The following repository access (RA) modules are available:\n\n");
Modified: subversion/branches/cache-server/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/log-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/log-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/log-cmd.c Tue Oct 15 08:52:06 2013
@@ -681,6 +681,9 @@ svn_cl__log(apr_getopt_t *os,
const char *target;
int i;
apr_array_header_t *revprops;
+ svn_move_behavior_t move_behavior = opt_state->auto_moves
+ ? svn_move_behavior_auto_moves
+ : svn_move_behavior_explicit_moves;
if (!opt_state->xml)
{
@@ -831,13 +834,14 @@ svn_cl__log(apr_getopt_t *os,
if (!opt_state->quiet)
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
}
- SVN_ERR(svn_client_log5(targets,
+ SVN_ERR(svn_client_log6(targets,
&lb.target_peg_revision,
opt_state->revision_ranges,
opt_state->limit,
opt_state->verbose,
opt_state->stop_on_copy,
opt_state->use_merge_history,
+ move_behavior,
revprops,
log_entry_receiver_xml,
&lb,
@@ -854,13 +858,14 @@ svn_cl__log(apr_getopt_t *os,
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_DATE;
if (!opt_state->quiet)
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
- SVN_ERR(svn_client_log5(targets,
+ SVN_ERR(svn_client_log6(targets,
&lb.target_peg_revision,
opt_state->revision_ranges,
opt_state->limit,
opt_state->verbose,
opt_state->stop_on_copy,
opt_state->use_merge_history,
+ move_behavior,
revprops,
log_entry_receiver,
&lb,
Modified: subversion/branches/cache-server/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/merge-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/merge-cmd.c Tue Oct 15 08:52:06 2013
@@ -101,15 +101,6 @@ run_merge(svn_boolean_t two_sources_spec
&& (first_range_end.kind == svn_opt_revision_unspecified))
{
ranges_to_merge = NULL;
-
- /* This must be a 'sync' merge so check branch relationship. */
- if (opt_state->verbose)
- SVN_ERR(svn_cmdline_printf(
- scratch_pool, _("--- Checking branch relationship\n")));
- SVN_ERR_W(svn_cl__check_related_source_and_target(
- sourcepath1, &peg_revision1,
- targetpath, &unspecified_revision, ctx, scratch_pool),
- _("Source and target must be different but related branches"));
}
if (opt_state->verbose)
Modified: subversion/branches/cache-server/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/mergeinfo-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/mergeinfo-cmd.c Tue Oct 15 08:52:06 2013
@@ -27,7 +27,9 @@
/*** Includes. ***/
+#include "svn_compat.h"
#include "svn_pools.h"
+#include "svn_props.h"
#include "svn_client.h"
#include "svn_cmdline.h"
#include "svn_path.h"
@@ -55,6 +57,61 @@ print_log_rev(void *baton,
return SVN_NO_ERROR;
}
+/* The separator between log messages. */
+#define SEP_STRING \
+ "------------------------------------------------------------------------\n"
+
+/* Implements the svn_log_entry_receiver_t interface. */
+static svn_error_t *
+print_log_details(void *baton,
+ svn_log_entry_t *log_entry,
+ apr_pool_t *pool)
+{
+ const char *author;
+ const char *date;
+ const char *message;
+
+ svn_compat_log_revprops_out(&author, &date, &message, log_entry->revprops);
+
+ if (author == NULL)
+ author = _("(no author)");
+
+ if (date && date[0])
+ /* Convert date to a format for humans. */
+ SVN_ERR(svn_cl__time_cstring_to_human_cstring(&date, date, pool));
+ else
+ date = _("(no date)");
+
+ if (log_entry->non_inheritable)
+ SVN_ERR(svn_cmdline_printf(pool,
+ SEP_STRING "r%ld* | %s | %s",
+ log_entry->revision, author, date));
+ else
+ SVN_ERR(svn_cmdline_printf(pool,
+ SEP_STRING "r%ld | %s | %s",
+ log_entry->revision, author, date));
+
+ if (message != NULL)
+ {
+ /* Number of lines in the msg. */
+ int lines = svn_cstring_count_newlines(message) + 1;
+
+ SVN_ERR(svn_cmdline_printf(pool,
+ Q_(" | %d line", " | %d lines", lines),
+ lines));
+ }
+
+ SVN_ERR(svn_cmdline_printf(pool, "\n"));
+
+ if (message != NULL)
+ {
+ /* A blank line always precedes the log message. */
+ SVN_ERR(svn_cmdline_printf(pool, "\n%s\n", message));
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* Draw a diagram (by printing text to the console) summarizing the state
* of merging between two branches, given the merge description
* indicated by YCA, BASE, RIGHT, TARGET, REINTEGRATE_LIKE. */
@@ -238,6 +295,50 @@ mergeinfo_summary(
return SVN_NO_ERROR;
}
+static svn_error_t *
+mergeinfo_log(svn_boolean_t finding_merged,
+ const char *target,
+ const svn_opt_revision_t *tgt_peg_revision,
+ const char *source,
+ const svn_opt_revision_t *src_peg_revision,
+ const svn_opt_revision_t *src_start_revision,
+ const svn_opt_revision_t *src_end_revision,
+ svn_depth_t depth,
+ svn_boolean_t include_log_details,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ apr_array_header_t *revprops;
+ svn_log_entry_receiver_t log_reciever;
+
+ if (include_log_details)
+ {
+ revprops = apr_array_make(pool, 3, sizeof(const char *));
+ APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_AUTHOR;
+ APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_DATE;
+ APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
+
+ log_reciever = print_log_details;
+ }
+ else
+ {
+ /* We need only revisions number, not revision properties. */
+ revprops = apr_array_make(pool, 0, sizeof(const char *));
+ log_reciever = print_log_rev;
+ }
+
+ SVN_ERR(svn_client_mergeinfo_log2(finding_merged, target,
+ tgt_peg_revision,
+ source, src_peg_revision,
+ src_start_revision,
+ src_end_revision,
+ log_reciever, NULL,
+ TRUE, depth, revprops, ctx,
+ pool));
+
+ return SVN_NO_ERROR;
+}
+
/* This implements the `svn_opt_subcommand_t' interface. */
svn_error_t *
svn_cl__mergeinfo(apr_getopt_t *os,
@@ -297,11 +398,6 @@ svn_cl__mergeinfo(apr_getopt_t *os,
tgt_peg_revision.kind = svn_opt_revision_base;
}
- SVN_ERR_W(svn_cl__check_related_source_and_target(source, &src_peg_revision,
- target, &tgt_peg_revision,
- ctx, pool),
- _("Source and target must be different but related branches"));
-
src_start_revision = &(opt_state->start_revision);
if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
src_end_revision = src_start_revision;
@@ -311,23 +407,21 @@ svn_cl__mergeinfo(apr_getopt_t *os,
/* Do the real work, depending on the requested data flavor. */
if (opt_state->show_revs == svn_cl__show_revs_merged)
{
- SVN_ERR(svn_client_mergeinfo_log2(TRUE, target, &tgt_peg_revision,
- source, &src_peg_revision,
- src_start_revision,
- src_end_revision,
- print_log_rev, NULL,
- TRUE, depth, NULL, ctx,
- pool));
+ SVN_ERR(mergeinfo_log(TRUE, target, &tgt_peg_revision,
+ source, &src_peg_revision,
+ src_start_revision,
+ src_end_revision,
+ depth, opt_state->mergeinfo_log,
+ ctx, pool));
}
else if (opt_state->show_revs == svn_cl__show_revs_eligible)
{
- SVN_ERR(svn_client_mergeinfo_log2(FALSE, target, &tgt_peg_revision,
- source, &src_peg_revision,
- src_start_revision,
- src_end_revision,
- print_log_rev, NULL,
- TRUE, depth, NULL, ctx,
- pool));
+ SVN_ERR(mergeinfo_log(FALSE, target, &tgt_peg_revision,
+ source, &src_peg_revision,
+ src_start_revision,
+ src_end_revision,
+ depth, opt_state->mergeinfo_log,
+ ctx, pool));
}
else
{
@@ -340,6 +434,11 @@ svn_cl__mergeinfo(apr_getopt_t *os,
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Depth specification options valid only "
"with --show-revs option"));
+ if (opt_state->mergeinfo_log)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("--log option valid only with "
+ "--show-revs option"));
+
SVN_ERR(mergeinfo_summary(source, &src_peg_revision,
target, &tgt_peg_revision,
Modified: subversion/branches/cache-server/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/notify.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/notify.c (original)
+++ subversion/branches/cache-server/subversion/svn/notify.c Tue Oct 15 08:52:06 2013
@@ -31,6 +31,7 @@
#define APR_WANT_STRFUNC
#include <apr_want.h>
+#include "svn_private_config.h"
#include "svn_cmdline.h"
#include "svn_pools.h"
#include "svn_dirent_uri.h"
@@ -41,8 +42,6 @@
#include "private/svn_subr_private.h"
#include "private/svn_dep_compat.h"
-#include "svn_private_config.h"
-
/* Baton for notify and friends. */
struct notify_baton
@@ -1136,6 +1135,13 @@ notify(void *baton, const svn_wc_notify_
goto print_error;
break;
+ case svn_wc_notify_cleanup_external:
+ if ((err = svn_cmdline_printf
+ (pool, _("Performing cleanup on external item at '%s'.\n"),
+ path_local)))
+ goto print_error;
+ break;
+
default:
break;
}
Modified: subversion/branches/cache-server/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/propedit-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/propedit-cmd.c Tue Oct 15 08:52:06 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_wc.h"
@@ -41,7 +42,6 @@
#include "cl.h"
#include "private/svn_cmdline_private.h"
-#include "svn_private_config.h"
/*** Code. ***/
Modified: subversion/branches/cache-server/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/propget-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/propget-cmd.c Tue Oct 15 08:52:06 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_pools.h"
@@ -45,8 +46,6 @@
#include "private/svn_cmdline_private.h"
-#include "svn_private_config.h"
-
/*** Code. ***/
Modified: subversion/branches/cache-server/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/props.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/props.c (original)
+++ subversion/branches/cache-server/subversion/svn/props.c Tue Oct 15 08:52:06 2013
@@ -30,6 +30,8 @@
#include <stdlib.h>
#include <apr_hash.h>
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_string.h"
@@ -46,7 +48,6 @@
#include "private/svn_string_private.h"
#include "private/svn_cmdline_private.h"
-#include "svn_private_config.h"
svn_error_t *
Modified: subversion/branches/cache-server/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/status-cmd.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/status-cmd.c (original)
+++ subversion/branches/cache-server/subversion/svn/status-cmd.c Tue Oct 15 08:52:06 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_string.h"
#include "svn_wc.h"
@@ -40,7 +41,6 @@
#include "svn_cmdline.h"
#include "cl.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
@@ -51,7 +51,8 @@ struct status_baton
{
/* These fields all correspond to the ones in the
svn_cl__print_status() interface. */
- const char *cwd_abspath;
+ const char *target_abspath;
+ const char *target_path;
svn_boolean_t suppress_externals_placeholders;
svn_boolean_t detailed;
svn_boolean_t show_last_committed;
@@ -77,6 +78,8 @@ struct status_baton
struct status_cache
{
const char *path;
+ const char *target_abspath;
+ const char *target_path;
svn_client_status_t *status;
};
@@ -152,10 +155,11 @@ print_status_normal_or_xml(void *baton,
struct status_baton *sb = baton;
if (sb->xml_mode)
- return svn_cl__print_status_xml(sb->cwd_abspath, path, status,
- sb->ctx, pool);
+ return svn_cl__print_status_xml(sb->target_abspath, sb->target_path,
+ path, status, sb->ctx, pool);
else
- return svn_cl__print_status(sb->cwd_abspath, path, status,
+ return svn_cl__print_status(sb->target_abspath, sb->target_path,
+ path, status,
sb->suppress_externals_placeholders,
sb->detailed,
sb->show_last_committed,
@@ -239,6 +243,8 @@ print_status(void *baton,
const char *cl_key = apr_pstrdup(sb->cl_pool, status->changelist);
struct status_cache *scache = apr_pcalloc(sb->cl_pool, sizeof(*scache));
scache->path = apr_pstrdup(sb->cl_pool, path);
+ scache->target_abspath = apr_pstrdup(sb->cl_pool, sb->target_abspath);
+ scache->target_path = apr_pstrdup(sb->cl_pool, sb->target_path);
scache->status = svn_client_status_dup(status, sb->cl_pool);
path_array =
@@ -303,7 +309,6 @@ svn_cl__status(apr_getopt_t *os,
"mode"));
}
- SVN_ERR(svn_dirent_get_absolute(&(sb.cwd_abspath), "", scratch_pool));
sb.suppress_externals_placeholders = (opt_state->quiet
&& (! opt_state->verbose));
sb.detailed = (opt_state->verbose || opt_state->update);
@@ -328,6 +333,10 @@ svn_cl__status(apr_getopt_t *os,
svn_pool_clear(iterpool);
+ SVN_ERR(svn_dirent_get_absolute(&(sb.target_abspath), target,
+ scratch_pool));
+ sb.target_path = target;
+
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
if (opt_state->xml)
@@ -392,6 +401,8 @@ svn_cl__status(apr_getopt_t *os,
{
struct status_cache *scache =
APR_ARRAY_IDX(path_array, j, struct status_cache *);
+ sb.target_abspath = scache->target_abspath;
+ sb.target_path = scache->target_path;
SVN_ERR(print_status_normal_or_xml(&sb, scache->path,
scache->status, scratch_pool));
}
Modified: subversion/branches/cache-server/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/status.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/status.c (original)
+++ subversion/branches/cache-server/subversion/svn/status.c Tue Oct 15 08:52:06 2013
@@ -26,6 +26,8 @@
/*** Includes. ***/
+
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_wc.h"
@@ -33,7 +35,6 @@
#include "svn_xml.h"
#include "svn_time.h"
#include "cl.h"
-#include "svn_private_config.h"
#include "cl-conflicts.h"
#include "private/svn_wc_private.h"
@@ -137,69 +138,84 @@ generate_status_desc(enum svn_wc_status_
}
/* Make a relative path containing '..' elements as needed.
- RELATIVE_TO_PATH must be the path to a directory (not a file!) and
- TARGET_PATH must be the path to any file or directory. Both
- RELATIVE_TO_PATH and TARGET_PATH must be based on the same parent path,
- i.e. they can either both be absolute or they can both be relative to the
- same parent directory. Both paths are expected to be canonical.
+ TARGET_ABSPATH shall be the absolute version of TARGET_PATH.
+ TARGET_ABSPATH, TARGET_PATH and PATH shall be canonical.
- If above conditions are met, a relative path that leads to TARGET_ABSPATH
- from RELATIVE_TO_PATH is returned, but there is no error checking involved.
+ If above conditions are met, a relative path that leads to PATH
+ from TARGET_PATH is returned, but there is no error checking involved.
- The returned path is allocated from RESULT_POOL, all other allocations are
- made in SCRATCH_POOL. */
+ The returned path is allocated from RESULT_POOL, all other
+ allocations are made in SCRATCH_POOL. */
static const char *
-make_relpath(const char *relative_to_path,
+make_relpath(const char *target_abspath,
const char *target_path,
+ const char *path,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
const char *la;
const char *parent_dir_els = "";
+ const char *abspath, *relative;
+ svn_error_t *err = svn_dirent_get_absolute(&abspath, path, scratch_pool);
+
+ if (err)
+ {
+ /* We probably got passed some invalid path. */
+ svn_error_clear(err);
+ return apr_pstrdup(result_pool, path);
+ }
+
+ relative = svn_dirent_skip_ancestor(target_abspath, abspath);
+ if (relative)
+ {
+ return svn_dirent_join(target_path, relative, result_pool);
+ }
/* An example:
* relative_to_path = /a/b/c
- * target_path = /a/x/y/z
+ * path = /a/x/y/z
* result = ../../x/y/z
*
* Another example (Windows specific):
* relative_to_path = F:/wc
- * target_path = C:/wc
+ * path = C:/wc
* result = C:/wc
*/
/* Skip the common ancestor of both paths, here '/a'. */
- la = svn_dirent_get_longest_ancestor(relative_to_path, target_path,
+ la = svn_dirent_get_longest_ancestor(target_abspath, abspath,
scratch_pool);
if (*la == '\0')
{
/* Nothing in common: E.g. C:/ vs F:/ on Windows */
- return apr_pstrdup(result_pool, target_path);
+ return apr_pstrdup(result_pool, path);
}
- relative_to_path = svn_dirent_skip_ancestor(la, relative_to_path);
- target_path = svn_dirent_skip_ancestor(la, target_path);
+ relative = svn_dirent_skip_ancestor(la, target_abspath);
+ path = svn_dirent_skip_ancestor(la, path);
/* In above example, we'd now have:
* relative_to_path = b/c
- * target_path = x/y/z */
+ * path = x/y/z */
/* Count the elements of relative_to_path and prepend as many '..' elements
- * to target_path. */
- while (*relative_to_path)
+ * to path. */
+ while (*relative)
{
- svn_dirent_split(&relative_to_path, NULL, relative_to_path,
+ svn_dirent_split(&relative, NULL, relative,
scratch_pool);
parent_dir_els = svn_dirent_join(parent_dir_els, "..", scratch_pool);
}
- return svn_dirent_join(parent_dir_els, target_path, result_pool);
+ return svn_dirent_join(parent_dir_els, path, result_pool);
}
/* Print STATUS and PATH in a format determined by DETAILED and
SHOW_LAST_COMMITTED. */
static svn_error_t *
-print_status(const char *cwd_abspath, const char *path,
+print_status(const char *target_abspath,
+ const char *target_path,
+ const char *path,
svn_boolean_t detailed,
svn_boolean_t show_last_committed,
svn_boolean_t repos_locks,
@@ -217,7 +233,7 @@ print_status(const char *cwd_abspath, co
const char *moved_from_line = "";
const char *moved_to_line = "";
- path = make_relpath(cwd_abspath, path, pool, pool);
+ path = make_relpath(target_abspath, target_path, path, pool, pool);
/* For historic reasons svn ignores the property status for added nodes, even
if these nodes were copied and have local property changes.
@@ -269,14 +285,15 @@ print_status(const char *cwd_abspath, co
if (tree_conflicted)
{
- const svn_wc_conflict_description2_t *tree_conflict;
+ const svn_wc_conflict_description3_t *tree_conflict;
SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, ctx->wc_ctx,
local_abspath, pool, pool));
SVN_ERR_ASSERT(tree_conflict != NULL);
tree_status_code = 'C';
SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
- &desc, tree_conflict, pool));
+ &desc, svn_wc__cd3_to_cd2(tree_conflict, pool),
+ pool));
tree_desc_line = apr_psprintf(pool, "\n > %s", desc);
(*tree_conflicts)++;
}
@@ -294,7 +311,8 @@ print_status(const char *cwd_abspath, co
{
const char *relpath;
- relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
moved_from_line = apr_pstrcat(pool, "\n > ",
@@ -309,7 +327,8 @@ print_status(const char *cwd_abspath, co
if (status->moved_from_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
moved_from_line = apr_pstrcat(pool, "\n > ",
@@ -320,7 +339,8 @@ print_status(const char *cwd_abspath, co
if (status->moved_to_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_to_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
moved_to_line = apr_pstrcat(pool, "\n > ",
@@ -330,6 +350,8 @@ print_status(const char *cwd_abspath, co
}
}
+ path = svn_dirent_local_style(path, pool);
+
if (detailed)
{
char ood_status, lock_status;
@@ -447,7 +469,8 @@ print_status(const char *cwd_abspath, co
svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_client_ctx_t *ctx,
@@ -466,7 +489,7 @@ svn_cl__print_status_xml(const char *cwd
SVN_ERR(svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted,
ctx->wc_ctx, local_abspath, pool));
- path = make_relpath(cwd_abspath, path, pool, pool);
+ path = make_relpath(target_abspath, target_path, path, pool, pool);
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
"path", svn_dirent_local_style(path, pool), NULL);
@@ -499,14 +522,16 @@ svn_cl__print_status_xml(const char *cwd
if (status->moved_from_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
svn_hash_sets(att_hash, "moved-from", relpath);
}
if (status->moved_to_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_to_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
svn_hash_sets(att_hash, "moved-to", relpath);
@@ -551,7 +576,8 @@ svn_cl__print_status_xml(const char *cwd
/* Called by status-cmd.c */
svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_boolean_t suppress_externals_placeholders,
@@ -600,7 +626,7 @@ svn_cl__print_status(const char *cwd_abs
return SVN_NO_ERROR;
}
- return print_status(cwd_abspath, svn_dirent_local_style(path, pool),
+ return print_status(target_abspath, target_path, path,
detailed, show_last_committed, repos_locks, status,
text_conflicts, prop_conflicts, tree_conflicts,
ctx, pool);
Modified: subversion/branches/cache-server/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/svn/svn.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/svn/svn.c (original)
+++ subversion/branches/cache-server/subversion/svn/svn.c Tue Oct 15 08:52:06 2013
@@ -35,6 +35,7 @@
#include <apr_general.h>
#include <apr_signal.h>
+#include "svn_private_config.h"
#include "svn_cmdline.h"
#include "svn_pools.h"
#include "svn_wc.h"
@@ -57,8 +58,6 @@
#include "private/svn_opt_private.h"
#include "private/svn_cmdline_private.h"
-#include "svn_private_config.h"
-
/*** Option Processing ***/
@@ -119,6 +118,7 @@ typedef enum svn_cl__longopt_t {
opt_with_revprop,
opt_with_all_revprops,
opt_with_no_revprops,
+ opt_auto_moves,
opt_parents,
opt_accept,
opt_show_revs,
@@ -133,7 +133,11 @@ typedef enum svn_cl__longopt_t {
opt_include_externals,
opt_show_inherited_props,
opt_search,
- opt_search_and
+ opt_search_and,
+ opt_mergeinfo_log,
+ opt_remove_unversioned,
+ opt_remove_ignored,
+ opt_no_newline
} svn_cl__longopt_t;
@@ -289,6 +293,10 @@ const apr_getopt_option_t svn_cl__option
N_("set revision property ARG in new revision\n"
" "
"using the name[=value] format")},
+ {"auto-moves", opt_auto_moves, 0,
+ N_("attempt to interpret matching unique DEL+ADD\n"
+ " "
+ "pairs as moves")},
{"parents", opt_parents, 0, N_("make intermediate directories")},
{"use-merge-history", 'g', 0,
N_("use/display additional information from merge\n"
@@ -368,17 +376,21 @@ const apr_getopt_option_t svn_cl__option
" "
"Please run 'svn update' instead.")},
{"include-externals", opt_include_externals, 0,
- N_("Also commit file and dir externals reached by\n"
- " "
- "recursion. This does not include externals with a\n"
+ N_("also operate on externals defined by\n"
" "
- "fixed revision. (See the svn:externals property)")},
+ "svn:externals properties")},
{"show-inherited-props", opt_show_inherited_props, 0,
N_("retrieve target's inherited properties")},
{"search", opt_search, 1,
N_("use ARG as search pattern (glob syntax)")},
{"search-and", opt_search_and, 1,
N_("combine ARG with the previous search pattern")},
+ {"log", opt_mergeinfo_log, 0,
+ N_("show revision log message, author and date")},
+ {"remove-unversioned", opt_remove_unversioned, 0,
+ N_("remove unversioned items")},
+ {"remove-ignored", opt_remove_ignored, 0, N_("remove ignored items")},
+ {"no-newline", opt_no_newline, 0, N_("do not output trailing newline")},
/* Long-opt Aliases
*
@@ -484,10 +496,29 @@ const svn_opt_subcommand_desc2_t svn_cl_
{'r', 'q', 'N', opt_depth, opt_force, opt_ignore_externals} },
{ "cleanup", svn_cl__cleanup, {0}, N_
- ("Recursively clean up the working copy, removing locks, resuming\n"
+ ("Recursively clean up the working copy, removing write locks, resuming\n"
"unfinished operations, etc.\n"
- "usage: cleanup [WCPATH...]\n"),
- {opt_merge_cmd} },
+ "usage: cleanup [WCPATH...]\n"
+ "\n"
+ " By default, finish any unfinished business in the working copy at WCPATH,\n"
+ " and remove write locks (shown as 'L' by the 'svn status' command) from\n"
+ " the working copy. Usually, this is only necessary if a Subversion client\n"
+ " has crashed while using the working copy, leaving it in an unusable state.\n"
+ "\n"
+ " WARNING: There is no mechanism that will protect write locks still\n"
+ " being used by other Subversion clients. Running this command\n"
+ " while another client is using the working copy can corrupt\n"
+ " the working copy beyond repair!\n"
+ "\n"
+ " If the --remove-unversioned option or the --remove-ignored option\n"
+ " is given, remove any unversioned or ignored items within WCPATH.\n"
+ " To prevent accidental working copy corruption, unversioned or ignored\n"
+ " items can only be removed if the working copy is not already locked\n"
+ " for writing by another Subversion client.\n"
+ " Note that the 'svn status' command shows unversioned items as '?',\n"
+ " and ignored items as 'I' if the --no-ignore option is given to it.\n"),
+ {opt_merge_cmd, opt_remove_unversioned, opt_remove_ignored,
+ opt_include_externals, 'q'} },
{ "commit", svn_cl__commit, {"ci"},
N_("Send changes from your working copy to the repository.\n"
@@ -496,7 +527,11 @@ const svn_opt_subcommand_desc2_t svn_cl_
" A log message must be provided, but it can be empty. If it is not\n"
" given by a --message or --file option, an editor will be started.\n"
" If any targets are (or contain) locked items, those will be\n"
- " unlocked after a successful commit.\n"),
+ " unlocked after a successful commit.\n"
+ "\n"
+ " If --include-externals is given, also commit file and directory\n"
+ " externals reached by recursion. Do not commit externals with a\n"
+ " fixed revision.\n"),
{'q', 'N', opt_depth, opt_targets, opt_no_unlock, SVN_CL__LOG_MSG_OPTIONS,
opt_changelist, opt_keep_changelists, opt_include_externals} },
@@ -648,8 +683,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" Size (in bytes)\n"
" Date and time of the last commit\n"),
{'r', 'v', 'R', opt_depth, opt_incremental, opt_xml,
- opt_include_externals },
- {{opt_include_externals, N_("include externals definitions")}} },
+ opt_include_externals}, },
{ "lock", svn_cl__lock, {0}, N_
("Lock working copy paths or URLs in the repository, so that\n"
@@ -738,9 +772,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
" was created:\n"
" svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo\n"),
{'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy, opt_incremental,
- opt_xml, 'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
- opt_depth, opt_diff, opt_diff_cmd, opt_internal_diff, 'x', opt_search,
- opt_search_and, },
+ opt_xml, 'l', opt_with_all_revprops, opt_with_no_revprops,
+ opt_with_revprop, opt_auto_moves, opt_depth, opt_diff, opt_diff_cmd,
+ opt_internal_diff, 'x', opt_search, opt_search_and },
{{opt_with_revprop, N_("retrieve revision property ARG")},
{'c', N_("the change made in revision ARG")}} },
@@ -750,18 +784,18 @@ const svn_opt_subcommand_desc2_t svn_cl_
* (with quotes and newlines removed). */
"Merge changes into a working copy.\n"
"usage: 1. merge SOURCE[@REV] [TARGET_WCPATH]\n"
-" (the 'automatic' merge)\n"
+" (the 'complete' merge)\n"
" 2. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]\n"
" (the 'cherry-pick' merge)\n"
" 3. merge SOURCE1[@REV1] SOURCE2[@REV2] [TARGET_WCPATH]\n"
" (the '2-URL' merge)\n"
"\n"
" 1. This form, with one source path and no revision range, is called\n"
-" an 'automatic' merge:\n"
+" a 'complete' merge:\n"
"\n"
" svn merge SOURCE[@REV] [TARGET_WCPATH]\n"
"\n"
-" The automatic merge is used for the 'sync' and 'reintegrate' merges\n"
+" The complete merge is used for the 'sync' and 'reintegrate' merges\n"
" in the 'feature branch' pattern described below. It finds all the\n"
" changes on the source branch that have not already been merged to the\n"
" target branch, and merges them into the working copy. Merge tracking\n"
@@ -900,7 +934,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" of 'REV' is the base revision (usually the revision last updated to).\n"
"\n"
" TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
-" assumed. The special cases noted above in the 'automatic' merge form\n"
+" assumed. The special cases noted above in the 'complete' merge form\n"
" also apply here.\n"
"\n"
" The revision ranges to be merged are specified by the '-r' and/or '-c'\n"
@@ -971,7 +1005,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" The three branches involved can be completely unrelated.\n"
"\n"
" TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
-" assumed. The special cases noted above in the 'automatic' merge form\n"
+" assumed. The special cases noted above in the 'complete' merge form\n"
" also apply here.\n"
"\n"
" SOURCE1 and/or SOURCE2 can also be specified as a working copy path,\n"
@@ -1088,7 +1122,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" shows, from left to right:\n"
" the youngest common ancestor of the branches;\n"
" the latest full merge in either direction, and thus the common base\n"
- " that will be used for the next automatic merge;\n"
+ " that will be used for the next complete merge;\n"
" the repository path and revision number of the tip of each branch.\n"
"\n"
" 2. Print the revision numbers on SOURCE that have been merged to TARGET\n"
@@ -1108,7 +1142,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" and the default for TARGET is HEAD for a URL or BASE for a WC path.\n"
"\n"
" The depth can be 'empty' or 'infinity'; the default is 'empty'.\n"),
- {'r', 'R', opt_depth, opt_show_revs} },
+ {'r', 'R', opt_depth, opt_show_revs, opt_mergeinfo_log} },
{ "mkdir", svn_cl__mkdir, {0}, N_
("Create a new directory under version control.\n"
@@ -1430,9 +1464,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
" ' ' no modifications\n"
" 'C' Conflicted\n"
" 'M' Modified\n"
- " Third column: Whether the working copy directory is locked\n"
- " ' ' not locked\n"
- " 'L' locked\n"
+ " Third column: Whether the working copy is locked for writing by\n"
+ " another Subversion client modifying the working copy\n"
+ " ' ' not locked for writing\n"
+ " 'L' locked for writing\n"
" Fourth column: Scheduled commit will contain addition-with-history\n"
" ' ' no history scheduled with commit\n"
" '+' history scheduled with commit\n"
@@ -1440,16 +1475,16 @@ const svn_opt_subcommand_desc2_t svn_cl_
" ' ' normal\n"
" 'S' the item has a Switched URL relative to the parent\n"
" 'X' a versioned file created by an eXternals definition\n"
- " Sixth column: Repository lock token\n"
+ " Sixth column: Whether the item is locked in repository for exclusive commit\n"
" (without -u)\n"
- " ' ' no lock token\n"
- " 'K' lock token present\n"
+ " ' ' not locked by this working copy\n"
+ " 'K' locked by this working copy, but lock might be stolen or broken\n"
" (with -u)\n"
- " ' ' not locked in repository, no lock token\n"
- " 'K' locked in repository, lock toKen present\n"
- " 'O' locked in repository, lock token in some Other working copy\n"
- " 'T' locked in repository, lock token present but sTolen\n"
- " 'B' not locked in repository, lock token present but Broken\n"
+ " ' ' not locked in repository, not locked by this working copy\n"
+ " 'K' locked in repository, lock owned by this working copy\n"
+ " 'O' locked in repository, lock owned by another working copy\n"
+ " 'T' locked in repository, lock owned by this working copy was stolen\n"
+ " 'B' not locked in repository, lock owned by this working copy is broken\n"
" Seventh column: Whether the item is the victim of a tree conflict\n"
" ' ' normal\n"
" 'C' tree-Conflicted\n"
@@ -1609,6 +1644,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
" Local modifications are preserved.\n"),
{ 'q' } },
+ { "youngest", svn_cl__youngest, {0}, N_
+ ("Print the youngest revision number of a target's repository.\n"
+ "usage: youngest [TARGET]\n"
+ "\n"
+ " Print the revision number of the youngest revision in the repository\n"
+ " with which TARGET is associated.\n"),
+ { opt_no_newline } },
+
{ NULL, NULL, {0}, NULL, {0} }
};
@@ -1629,7 +1672,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
@@ -1648,6 +1691,8 @@ signal_handler(int signum)
svn_error_t *
svn_cl__check_cancel(void *baton)
{
+ /* Cancel baton should be always NULL in command line client. */
+ SVN_ERR_ASSERT(baton == NULL);
if (cancelled)
return svn_error_create(SVN_ERR_CANCELLED, NULL, _("Caught signal"));
else
@@ -2194,6 +2239,9 @@ sub_main(int argc, const char *argv[], a
case 'g':
opt_state.use_merge_history = TRUE;
break;
+ case opt_auto_moves:
+ opt_state.auto_moves = TRUE;
+ break;
case opt_accept:
SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
opt_state.accept_which = svn_cl__accept_from_word(utf8_opt_arg);
@@ -2212,6 +2260,9 @@ sub_main(int argc, const char *argv[], a
_("'%s' is not a valid --show-revs value"),
utf8_opt_arg));
break;
+ case opt_mergeinfo_log:
+ opt_state.mergeinfo_log = TRUE;
+ break;
case opt_reintegrate:
opt_state.reintegrate = TRUE;
break;
@@ -2274,6 +2325,15 @@ sub_main(int argc, const char *argv[], a
case opt_search_and:
SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
add_search_pattern_to_latest_group(&opt_state, utf8_opt_arg, pool);
+ case opt_remove_unversioned:
+ opt_state.remove_unversioned = TRUE;
+ break;
+ case opt_remove_ignored:
+ opt_state.remove_ignored = TRUE;
+ break;
+ case opt_no_newline:
+ opt_state.no_newline = TRUE;
+ break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */
@@ -2950,6 +3010,10 @@ sub_main(int argc, const char *argv[], a
"Subversion"));
}
+ /* Ensure that stdout is flushed, so the user will see any write errors.
+ This makes sure that output is not silently lost. */
+ SVN_INT_ERR(svn_cmdline_fflush(stdout));
+
return EXIT_ERROR(err);
}
else