You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2011/11/21 08:08:07 UTC
svn commit: r1204374 [23/29] - in /subversion/branches/svn-bisect: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/ build/win32/
contrib/client-side/ contrib/client-side/emacs/ notes/ notes/wc-ng/
subversion/bindings/javahl/native...
Modified: subversion/branches/svn-bisect/subversion/svn/add-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/add-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/add-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/add-cmd.c Mon Nov 21 07:07:56 2011
@@ -51,7 +51,7 @@ svn_cl__add(apr_getopt_t *os,
apr_array_header_t *targets;
int i;
apr_pool_t *iterpool;
- svn_boolean_t seen_nonexistent_target = FALSE;
+ apr_array_header_t *errors = apr_array_make(pool, 0, sizeof(apr_status_t));
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -71,7 +71,6 @@ svn_cl__add(apr_getopt_t *os,
for (i = 0; i < targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
- svn_boolean_t success;
svn_pool_clear(iterpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
@@ -80,21 +79,34 @@ svn_cl__add(apr_getopt_t *os,
opt_state->depth,
opt_state->force, opt_state->no_ignore,
opt_state->parents, ctx, iterpool),
- &success, opt_state->quiet,
+ errors, opt_state->quiet,
SVN_ERR_ENTRY_EXISTS,
SVN_ERR_WC_PATH_NOT_FOUND,
SVN_NO_ERROR));
-
- if (! success)
- seen_nonexistent_target = TRUE;
}
svn_pool_destroy(iterpool);
- if (seen_nonexistent_target)
- return svn_error_create(
- SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Could not add all targets because some targets don't exist"));
- else
- return SVN_NO_ERROR;
+ if (errors->nelts > 0)
+ {
+ svn_error_t *err;
+
+ err = svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL, NULL);
+ for (i = 0; i < errors->nelts; i++)
+ {
+ apr_status_t status = APR_ARRAY_IDX(errors, i, apr_status_t);
+ if (status == SVN_ERR_WC_PATH_NOT_FOUND)
+ err = svn_error_quick_wrap(err,
+ _("Could not add all targets because "
+ "some targets don't exist"));
+ else if (status == SVN_ERR_ENTRY_EXISTS)
+ err = svn_error_quick_wrap(err,
+ _("Could not add all targets because "
+ "some targets are already versioned"));
+ }
+
+ return svn_error_trace(err);
+ }
+
+ return SVN_NO_ERROR;
}
Modified: subversion/branches/svn-bisect/subversion/svn/blame-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/blame-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/blame-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/blame-cmd.c Mon Nov 21 07:07:56 2011
@@ -283,7 +283,7 @@ svn_cl__blame(apr_getopt_t *os,
if (! opt_state->xml)
SVN_ERR(svn_stream_for_stdout(&bl.out, pool));
else
- bl.sbuf = svn_stringbuf_create("", pool);
+ bl.sbuf = svn_stringbuf_create_empty(pool);
bl.opt_state = opt_state;
Modified: subversion/branches/svn-bisect/subversion/svn/cat-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/cat-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/cat-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/cat-cmd.c Mon Nov 21 07:07:56 2011
@@ -50,7 +50,8 @@ svn_cl__cat(apr_getopt_t *os,
int i;
svn_stream_t *out;
apr_pool_t *subpool = svn_pool_create(pool);
- svn_boolean_t seen_nonexistent_target = FALSE;
+ apr_array_header_t *errors = apr_array_make(pool, 0, sizeof(apr_status_t));
+ svn_error_t *err;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -67,7 +68,6 @@ svn_cl__cat(apr_getopt_t *os,
const char *target = APR_ARRAY_IDX(targets, i, const char *);
const char *truepath;
svn_opt_revision_t peg_revision;
- svn_boolean_t success;
svn_pool_clear(subpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
@@ -79,21 +79,40 @@ svn_cl__cat(apr_getopt_t *os,
SVN_ERR(svn_cl__try(svn_client_cat2(out, truepath, &peg_revision,
&(opt_state->start_revision),
ctx, subpool),
- &success, opt_state->quiet,
+ errors, opt_state->quiet,
SVN_ERR_UNVERSIONED_RESOURCE,
SVN_ERR_ENTRY_NOT_FOUND,
SVN_ERR_CLIENT_IS_DIRECTORY,
SVN_ERR_FS_NOT_FOUND,
SVN_NO_ERROR));
- if (! success)
- seen_nonexistent_target = TRUE;
}
svn_pool_destroy(subpool);
- if (seen_nonexistent_target)
- return svn_error_create(
- SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Could not cat all targets because some targets don't exist"));
- else
- return SVN_NO_ERROR;
+ if (errors->nelts > 0)
+ {
+ err = svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL, NULL);
+
+ for (i = 0; i < errors->nelts; i++)
+ {
+ apr_status_t status = APR_ARRAY_IDX(errors, i, apr_status_t);
+
+ if (status == SVN_ERR_ENTRY_NOT_FOUND ||
+ status == SVN_ERR_FS_NOT_FOUND)
+ err = svn_error_quick_wrap(err,
+ _("Could not cat all targets because "
+ "some targets don't exist"));
+ else if (status == SVN_ERR_UNVERSIONED_RESOURCE)
+ err = svn_error_quick_wrap(err,
+ _("Could not cat all targets because "
+ "some targets are not versioned"));
+ else if (status == SVN_ERR_CLIENT_IS_DIRECTORY)
+ err = svn_error_quick_wrap(err,
+ _("Could not cat all targets because "
+ "some targets are directories"));
+ }
+
+ return svn_error_trace(err);
+ }
+
+ return SVN_NO_ERROR;
}
Modified: subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c Mon Nov 21 07:07:56 2011
@@ -45,7 +45,7 @@ svn_cl__changelist(apr_getopt_t *os,
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_array_header_t *targets;
svn_depth_t depth = opt_state->depth;
- svn_boolean_t success = TRUE;
+ apr_array_header_t *errors = apr_array_make(pool, 0, sizeof(apr_status_t));
/* If we're not removing changelists, then our first argument should
be the name of a changelist. */
@@ -103,7 +103,7 @@ svn_cl__changelist(apr_getopt_t *os,
svn_client_add_to_changelist(targets, changelist_name,
depth, opt_state->changelists,
ctx, pool),
- &success, opt_state->quiet,
+ errors, opt_state->quiet,
SVN_ERR_UNVERSIONED_RESOURCE,
SVN_ERR_WC_PATH_NOT_FOUND,
SVN_NO_ERROR));
@@ -114,16 +114,36 @@ svn_cl__changelist(apr_getopt_t *os,
svn_client_remove_from_changelists(targets, depth,
opt_state->changelists,
ctx, pool),
- &success, opt_state->quiet,
+ errors, opt_state->quiet,
SVN_ERR_UNVERSIONED_RESOURCE,
SVN_ERR_WC_PATH_NOT_FOUND,
SVN_NO_ERROR));
}
- if (!success)
- return svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Could not display info for all targets because "
- "some targets don't exist"));
- else
- return SVN_NO_ERROR;
+ if (errors->nelts > 0)
+ {
+ int i;
+ svn_error_t *err;
+
+ err = svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL, NULL);
+ for (i = 0; i < errors->nelts; i++)
+ {
+ apr_status_t status = APR_ARRAY_IDX(errors, i, apr_status_t);
+
+ if (status == SVN_ERR_WC_PATH_NOT_FOUND)
+ err = svn_error_quick_wrap(err,
+ _("Could not set changelists on "
+ "all targets because some targets "
+ "don't exist"));
+ else if (status == SVN_ERR_UNVERSIONED_RESOURCE)
+ err = svn_error_quick_wrap(err,
+ _("Could not set changelists on "
+ "all targets because some targets "
+ "are not versioned"));
+ }
+
+ return svn_error_trace(err);
+ }
+
+ return SVN_NO_ERROR;
}
Modified: subversion/branches/svn-bisect/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/cl.h?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/cl.h (original)
+++ subversion/branches/svn-bisect/subversion/svn/cl.h Mon Nov 21 07:07:56 2011
@@ -230,6 +230,7 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t internal_diff; /* override diff_cmd in config file */
svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
+ svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
} svn_cl__opt_state_t;
@@ -295,15 +296,14 @@ extern const apr_getopt_option_t svn_cl_
* invoked on an unversioned, nonexistent, or otherwise innocuously
* errorful resource. Meant to be wrapped with SVN_ERR().
*
- * If ERR is null, return SVN_NO_ERROR, setting *SUCCESS to TRUE
- * if SUCCESS is not NULL.
+ * If ERR is null, return SVN_NO_ERROR.
*
* Else if ERR->apr_err is one of the error codes supplied in varargs,
* then handle ERR as a warning (unless QUIET is true), clear ERR, and
- * return SVN_NO_ERROR, setting *SUCCESS to FALSE if SUCCESS is not
- * NULL.
+ * return SVN_NO_ERROR, and push the value of ERR->apr_err into the
+ * ERRORS_SEEN array, if ERRORS_SEEN is not NULL.
*
- * Else return ERR, setting *SUCCESS to FALSE if SUCCESS is not NULL.
+ * Else return ERR.
*
* Typically, error codes like SVN_ERR_UNVERSIONED_RESOURCE,
* SVN_ERR_ENTRY_NOT_FOUND, etc, are supplied in varargs. Don't
@@ -311,7 +311,7 @@ extern const apr_getopt_option_t svn_cl_
*/
svn_error_t *
svn_cl__try(svn_error_t *err,
- svn_boolean_t *success,
+ apr_array_header_t *errors_seen,
svn_boolean_t quiet,
...);
@@ -383,6 +383,9 @@ svn_cl__time_cstring_to_human_cstring(co
/* Print STATUS for PATH to stdout for human consumption. Prints in
abbreviated format by default, or DETAILED format if flag is set.
+ When SUPPRESS_EXTERNALS_PLACEHOLDERS is set, avoid printing
+ externals placeholder lines ("X lines").
+
When DETAILED is set, use SHOW_LAST_COMMITTED to toggle display of
the last-committed-revision and last-committed-author.
@@ -394,10 +397,16 @@ 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.
+*/
svn_error_t *
-svn_cl__print_status(const char *path,
+svn_cl__print_status(const char *cwd_abspath,
+ const char *path,
const svn_client_status_t *status,
+ svn_boolean_t suppress_externals_placeholders,
svn_boolean_t detailed,
svn_boolean_t show_last_committed,
svn_boolean_t skip_unrecognized,
@@ -410,9 +419,15 @@ svn_cl__print_status(const char *path,
/* Print STATUS for PATH in XML to stdout. Use POOL for temporary
- allocations. */
+ allocations.
+
+ Use CWD_ABSPATH -- the absolute path of the current working
+ directory -- to shorten PATH into something relative to that
+ directory as necessary.
+ */
svn_error_t *
-svn_cl__print_status_xml(const char *path,
+svn_cl__print_status_xml(const char *cwd_abspath,
+ const char *path,
const svn_client_status_t *status,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
@@ -554,14 +569,10 @@ svn_cl__merge_file_externally(const char
/* Set *NOTIFY_FUNC_P and *NOTIFY_BATON_P to a notifier/baton for all
* operations, allocated in POOL.
- *
- * If don't want a summary line at the end of notifications, set
- * SUPPRESS_FINAL_LINE.
*/
svn_error_t *
svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p,
void **notify_baton_p,
- svn_boolean_t suppress_final_line,
apr_pool_t *pool);
/* Make the notifier for use with BATON print the appropriate summary
@@ -768,42 +779,19 @@ svn_cl__node_description(const svn_wc_co
const char *wc_repos_root_URL,
apr_pool_t *pool);
-/* Return, in @a *true_targets_p, a copy of @a targets with peg revision
- * specifiers snipped off the end of each element.
- *
- * ### JAF TODO: This function is not good because it does not allow the
- * ### caller to detect if an invalid peg revision was specified.
- * ###
- * ### Callers should never have a need to silently *discard* all peg
- * ### revisions, even if they are doing this *after* saving any peg
- * ### revisions that might be of interest on certain arguments: I don't
- * ### think it can ever be correct to silently ignore a peg revision that
- * ### is specified, whether it makes semantic sense or not.
- * ###
- * ### Instead, callers should parse all the arguments and silently
- * ### ignore an *empty* peg revision part (just an "@", which can be
- * ### used to escape an earlier "@" in the argument) on any argument,
- * ### even an argument on which a peg revision does not make sense,
- * ### but should not silently ignore a non-empty peg when it does not
- * ### make sense.
- * ###
- * ### Something like:
- * ### For each (URL-like?) argument that doesn't accept a peg rev:
- * ### Parse into peg-rev and true-path parts;
- * ### If (peg rev != unspecified)
- * ### Error("This arg doesn't accept a peg rev.").
- * ### Use the true-path part.
+/* Return, in @a *true_targets_p, a shallow copy of @a targets with any
+ * empty peg revision specifier snipped off the end of each element. If any
+ * target has a non-empty peg revision specifier, throw an error. The user
+ * may have specified a peg revision where it doesn't make sense to do so,
+ * or may have forgotten to escape an '@' character in a filename.
*
* This function is useful for subcommands for which peg revisions
- * do not make any sense. Such subcommands still need to allow peg
- * revisions to be specified on the command line so that users of
+ * do not make any sense. Such subcommands still need to allow an empty
+ * peg revision to be specified on the command line so that users of
* the command line client can consistently escape '@' characters
* in filenames by appending an '@' character, regardless of the
* subcommand being used.
*
- * If a peg revision is present but cannot be parsed, an error is thrown.
- * The user has likely forgotten to escape an '@' character in a filename.
- *
* It is safe to pass the address of @a targets as @a true_targets_p.
*
* Do all allocations in @a pool. */
Modified: subversion/branches/svn-bisect/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/commit-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/commit-cmd.c Mon Nov 21 07:07:56 2011
@@ -166,15 +166,17 @@ svn_cl__commit(apr_getopt_t *os,
}
/* Commit. */
- err = svn_client_commit5(targets,
+ err = svn_client_commit6(targets,
opt_state->depth,
no_unlock,
opt_state->keep_changelists,
TRUE /* commit_as_operations */,
+ opt_state->include_externals, /* file externals */
+ opt_state->include_externals, /* dir externals */
opt_state->changelists,
opt_state->revprop_table,
- ! opt_state->quiet
- ? svn_cl__print_commit_info : NULL,
+ (opt_state->quiet
+ ? NULL : svn_cl__print_commit_info),
NULL,
ctx,
pool);
Modified: subversion/branches/svn-bisect/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/copy-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/copy-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/copy-cmd.c Mon Nov 21 07:07:56 2011
@@ -76,7 +76,18 @@ svn_cl__copy(apr_getopt_t *os,
APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = source;
}
- SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
+ /* Get DST_PATH (the target path or URL) and check that no peg revision is
+ * specified for it. */
+ {
+ const char *tgt = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
+ svn_opt_revision_t peg;
+
+ SVN_ERR(svn_opt_parse_path(&peg, &dst_path, tgt, pool));
+ if (peg.kind != svn_opt_revision_unspecified)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s': a peg revision is not allowed here"),
+ tgt);
+ }
/* Figure out which type of notification to use.
(There is no need to check that the src paths are homogeneous;
@@ -84,8 +95,6 @@ svn_cl__copy(apr_getopt_t *os,
error if they are not.) */
src_path = APR_ARRAY_IDX(targets, 0, const char *);
srcs_are_urls = svn_path_is_url(src_path);
- dst_path = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
- apr_array_pop(targets);
dst_is_url = svn_path_is_url(dst_path);
if ((! srcs_are_urls) && (! dst_is_url))
@@ -127,7 +136,8 @@ svn_cl__copy(apr_getopt_t *os,
err = svn_client_copy6(sources, dst_path, TRUE,
opt_state->parents, opt_state->ignore_externals,
opt_state->revprop_table,
- svn_cl__print_commit_info, NULL,
+ (opt_state->quiet ? NULL : svn_cl__print_commit_info),
+ NULL,
ctx, pool);
if (ctx->log_msg_func3)
Modified: subversion/branches/svn-bisect/subversion/svn/delete-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/delete-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/delete-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/delete-cmd.c Mon Nov 21 07:07:56 2011
@@ -79,7 +79,9 @@ svn_cl__delete(apr_getopt_t *os,
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
err = svn_client_delete4(targets, opt_state->force, opt_state->keep_local,
- opt_state->revprop_table, svn_cl__print_commit_info,
+ opt_state->revprop_table,
+ (opt_state->quiet
+ ? NULL : svn_cl__print_commit_info),
NULL, ctx, pool);
if (err)
err = svn_cl__may_need_force(err);
Modified: subversion/branches/svn-bisect/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/diff-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/diff-cmd.c Mon Nov 21 07:07:56 2011
@@ -89,7 +89,7 @@ summarize_xml(const svn_client_diff_summ
/* Full path to the object being diffed. This is created by taking the
* baton, and appending the target's relative path. */
const char *path = *(const char **)baton;
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
/* Tack on the target path, so we can differentiate between different parts
* of the output when we're given multiple targets. */
@@ -166,8 +166,8 @@ svn_cl__diff(apr_getopt_t *os,
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_array_header_t *options;
apr_array_header_t *targets;
- apr_file_t *outfile, *errfile;
- apr_status_t status;
+ svn_stream_t *outstream;
+ svn_stream_t *errstream;
const char *old_target, *new_target;
apr_pool_t *iterpool;
svn_boolean_t pegged_diff = FALSE;
@@ -180,12 +180,10 @@ svn_cl__diff(apr_getopt_t *os,
else
options = NULL;
- /* Get an apr_file_t representing stdout and stderr, which is where
+ /* Get streams representing stdout and stderr, which is where
we'll have the external 'diff' program print to. */
- if ((status = apr_file_open_stdout(&outfile, pool)))
- return svn_error_wrap_apr(status, _("Can't open stdout"));
- if ((status = apr_file_open_stderr(&errfile, pool)))
- return svn_error_wrap_apr(status, _("Can't open stderr"));
+ SVN_ERR(svn_stream_for_stdout(&outstream, pool));
+ SVN_ERR(svn_stream_for_stderr(&errstream, pool));
if (opt_state->xml)
{
@@ -199,7 +197,7 @@ svn_cl__diff(apr_getopt_t *os,
SVN_ERR(svn_cl__xml_print_header("diff", pool));
- sb = svn_stringbuf_create("", pool);
+ sb = svn_stringbuf_create_empty(pool);
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths", NULL);
SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
}
@@ -353,8 +351,8 @@ svn_cl__diff(apr_getopt_t *os,
summarize_func, &target1,
ctx, iterpool));
else
- SVN_ERR(svn_client_diff5
- (options,
+ SVN_ERR(svn_client_diff6(
+ options,
target1,
&(opt_state->start_revision),
target2,
@@ -367,8 +365,8 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->force,
opt_state->use_git_diff_format,
svn_cmdline_output_encoding(pool),
- outfile,
- errfile,
+ outstream,
+ errstream,
opt_state->changelists,
ctx, iterpool));
}
@@ -398,8 +396,8 @@ svn_cl__diff(apr_getopt_t *os,
summarize_func, &truepath,
ctx, iterpool));
else
- SVN_ERR(svn_client_diff_peg5
- (options,
+ SVN_ERR(svn_client_diff_peg6(
+ options,
truepath,
&peg_revision,
&opt_state->start_revision,
@@ -412,8 +410,8 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->force,
opt_state->use_git_diff_format,
svn_cmdline_output_encoding(pool),
- outfile,
- errfile,
+ outstream,
+ errstream,
opt_state->changelists,
ctx, iterpool));
}
@@ -421,7 +419,7 @@ svn_cl__diff(apr_getopt_t *os,
if (opt_state->xml)
{
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
svn_xml_make_close_tag(&sb, pool, "paths");
SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
SVN_ERR(svn_cl__xml_print_footer("diff", pool));
Modified: subversion/branches/svn-bisect/subversion/svn/import-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/import-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/import-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/import-cmd.c Mon Nov 21 07:07:56 2011
@@ -120,7 +120,8 @@ svn_cl__import(apr_getopt_t *os,
opt_state->no_ignore,
opt_state->force,
opt_state->revprop_table,
- svn_cl__print_commit_info,
+ (opt_state->quiet
+ ? NULL : svn_cl__print_commit_info),
NULL,
ctx,
pool), pool));
Modified: subversion/branches/svn-bisect/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/info-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/info-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/info-cmd.c Mon Nov 21 07:07:56 2011
@@ -85,7 +85,7 @@ print_info_xml(void *baton,
const svn_client_info2_t *info,
apr_pool_t *pool)
{
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
const char *rev_str;
const char *path_prefix = baton;
@@ -471,20 +471,26 @@ print_info(void *baton,
switch (conflict->kind)
{
case svn_wc_conflict_kind_text:
- SVN_ERR(svn_cmdline_printf(pool,
- _("Conflict Previous Base File: %s\n"),
- svn_dirent_local_style(conflict->base_abspath,
- pool)));
-
- SVN_ERR(svn_cmdline_printf(pool,
- _("Conflict Previous Working File: %s\n"),
- svn_dirent_local_style(conflict->my_abspath,
- pool)));
-
- SVN_ERR(svn_cmdline_printf(pool,
- _("Conflict Current Base File: %s\n"),
- svn_dirent_local_style(conflict->their_abspath,
- pool)));
+ if (conflict->base_abspath)
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Conflict Previous Base File: %s\n"),
+ svn_cl__local_style_skip_ancestor(
+ path_prefix, conflict->base_abspath,
+ pool)));
+
+ if (conflict->my_abspath)
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Conflict Previous Working File: %s\n"),
+ svn_cl__local_style_skip_ancestor(
+ path_prefix, conflict->my_abspath,
+ pool)));
+
+ if (conflict->their_abspath)
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Conflict Current Base File: %s\n"),
+ svn_cl__local_style_skip_ancestor(
+ path_prefix, conflict->their_abspath,
+ pool)));
break;
case svn_wc_conflict_kind_property:
Modified: subversion/branches/svn-bisect/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/list-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/list-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/list-cmd.c Mon Nov 21 07:07:56 2011
@@ -156,7 +156,7 @@ print_dirent_xml(void *baton,
if (pb->ctx->cancel_func)
SVN_ERR(pb->ctx->cancel_func(pb->ctx->cancel_baton));
- sb = svn_stringbuf_create("", pool);
+ sb = svn_stringbuf_create_empty(pool);
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
"kind", svn_cl__node_kind_str_xml(dirent->kind),
@@ -276,7 +276,7 @@ svn_cl__list(apr_getopt_t *os,
if (opt_state->xml)
{
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "list",
"path", truepath[0] == '\0' ? "." : truepath,
NULL);
@@ -308,7 +308,7 @@ svn_cl__list(apr_getopt_t *os,
if (opt_state->xml)
{
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
svn_xml_make_close_tag(&sb, pool, "list");
SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
}
Modified: subversion/branches/svn-bisect/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/log-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/log-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/log-cmd.c Mon Nov 21 07:07:56 2011
@@ -227,8 +227,7 @@ log_entry_receiver(void *baton,
svn_sort__item_t *item = &(APR_ARRAY_IDX(sorted_paths, i,
svn_sort__item_t));
const char *path = item->key;
- svn_log_changed_path2_t *log_item
- = apr_hash_get(log_entry->changed_paths2, item->key, item->klen);
+ svn_log_changed_path2_t *log_item = item->value;
const char *copy_data = "";
if (lb->ctx->cancel_func)
@@ -277,18 +276,14 @@ log_entry_receiver(void *baton,
/* Print a diff if requested. */
if (lb->show_diff)
{
- apr_file_t *outfile;
- apr_file_t *errfile;
+ svn_stream_t *outstream;
+ svn_stream_t *errstream;
apr_array_header_t *diff_options;
- apr_status_t status;
svn_opt_revision_t start_revision;
svn_opt_revision_t end_revision;
- svn_error_t *err;
- if ((status = apr_file_open_stdout(&outfile, pool)))
- return svn_error_wrap_apr(status, _("Can't open stdout"));
- if ((status = apr_file_open_stderr(&errfile, pool)))
- return svn_error_wrap_apr(status, _("Can't open stderr"));
+ SVN_ERR(svn_stream_for_stdout(&outstream, pool));
+ SVN_ERR(svn_stream_for_stderr(&errstream, pool));
/* Fall back to "" to get options initialized either way. */
if (lb->diff_extensions)
@@ -303,82 +298,23 @@ log_entry_receiver(void *baton,
end_revision.value.number = log_entry->revision;
SVN_ERR(svn_cmdline_printf(pool, _("\n")));
- err = svn_client_diff5(diff_options,
- lb->target_url,
- &start_revision,
- lb->target_url,
- &end_revision,
- NULL,
- lb->depth,
- FALSE, /* ignore ancestry */
- TRUE, /* no diff deleted */
- FALSE, /* show copies as adds */
- FALSE, /* ignore content type */
- FALSE, /* use git diff format */
- svn_cmdline_output_encoding(pool),
- outfile,
- errfile,
- NULL,
- lb->ctx, pool);
- if (err)
- {
- /* We get a "path not found" error in case the revision created
- * lb->target_url. Try to show a diff from the parent instead. */
- if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
- {
- const char *parent;
- apr_pool_t *iterpool;
-
- svn_error_clear(err);
-
- parent = svn_uri_dirname(lb->target_url, pool);
- iterpool = svn_pool_create(pool);
- while (strcmp(parent, lb->target_url) != 0)
- {
- svn_pool_clear(iterpool);
- err = svn_client_diff5(diff_options,
- parent,
- &start_revision,
- parent,
- &end_revision,
- NULL,
- lb->depth,
- FALSE, /* ignore ancestry */
- TRUE, /* no diff deleted */
- FALSE, /* show copies as adds */
- FALSE, /* ignore content type */
- FALSE, /* use git diff format */
- svn_cmdline_output_encoding(iterpool),
- outfile,
- errfile,
- NULL,
- lb->ctx, iterpool);
- if (err == SVN_NO_ERROR)
- break;
- else
- {
- if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
- {
- svn_error_clear(err);
- parent = svn_uri_dirname(parent, pool);
- continue;
- }
- if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL ||
- err->apr_err == SVN_ERR_AUTHZ_UNREADABLE ||
- err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED)
- {
- svn_error_clear(err);
- break;
- }
- return svn_error_trace(err);
- }
- }
- svn_pool_destroy(iterpool);
- }
- else
- return svn_error_trace(err);
- }
-
+ SVN_ERR(svn_client_diff6(diff_options,
+ lb->target_url,
+ &start_revision,
+ lb->target_url,
+ &end_revision,
+ NULL,
+ lb->depth,
+ FALSE, /* ignore ancestry */
+ TRUE, /* no diff deleted */
+ FALSE, /* show copies as adds */
+ FALSE, /* ignore content type */
+ FALSE, /* use git diff format */
+ svn_cmdline_output_encoding(pool),
+ outstream,
+ errstream,
+ NULL,
+ lb->ctx, pool));
SVN_ERR(svn_cmdline_printf(pool, _("\n")));
}
@@ -435,7 +371,7 @@ log_entry_receiver_xml(void *baton,
{
struct log_receiver_baton *lb = baton;
/* Collate whole log message into sb before printing. */
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
char *revstr;
const char *author;
const char *date;
Modified: subversion/branches/svn-bisect/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/main.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/main.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/main.c Mon Nov 21 07:07:56 2011
@@ -53,8 +53,8 @@
#include "svn_hash.h"
#include "svn_version.h"
#include "cl.h"
-#include "svn_cache_config.h"
+#include "private/svn_opt_private.h"
#include "private/svn_wc_private.h"
#include "private/svn_cmdline_private.h"
@@ -125,6 +125,7 @@ typedef enum svn_cl__longopt_t {
opt_internal_diff,
opt_use_git_diff_format,
opt_allow_mixed_revisions,
+ opt_include_externals,
} svn_cl__longopt_t;
@@ -146,7 +147,11 @@ const apr_getopt_option_t svn_cl__option
{"change", 'c', 1,
N_("the change made by revision ARG (like -r ARG-1:ARG)\n"
" "
- "If ARG is negative this is like -r ARG:ARG-1")},
+ "If ARG is negative this is like -r ARG:ARG-1\n"
+ " "
+ "If ARG is of the form ARG1-ARG2 then this is like\n"
+ " "
+ "ARG1:ARG2, where ARG1 is inclusive")},
{"revision", 'r', 1,
N_("ARG (some commands also take ARG1:ARG2 range)\n"
" "
@@ -342,6 +347,12 @@ const apr_getopt_option_t svn_cl__option
"Use of this option is not recommended!\n"
" "
"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"
+ " "
+ "fixed revision. (See the svn:externals property)")},
/* Long-opt Aliases
*
@@ -364,7 +375,7 @@ const apr_getopt_option_t svn_cl__option
*
* In most of the help text "PATH" is used where a working copy path is
* required, "URL" where a repository URL is required and "TARGET" when
- * either a path or an url can be used. Hmm, should this be part of the
+ * either a path or a url can be used. Hmm, should this be part of the
* help text?
*/
@@ -466,7 +477,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" If any targets are (or contain) locked items, those will be\n"
" unlocked after a successful commit.\n"),
{'q', 'N', opt_depth, opt_targets, opt_no_unlock, SVN_CL__LOG_MSG_OPTIONS,
- opt_changelist, opt_keep_changelists} },
+ opt_changelist, opt_keep_changelists, opt_include_externals} },
{ "copy", svn_cl__copy, {"cp"}, N_
("Duplicate something in working copy or repository, remembering\n"
@@ -666,56 +677,47 @@ const svn_opt_subcommand_desc2_t svn_cl_
{'c', N_("the change made in revision ARG")}} },
{ "merge", svn_cl__merge, {0}, N_
- ("Apply the differences between two sources to a working copy path.\n"
- "usage: 1. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]\n"
+ ("Merge changes into a working copy.\n"
+ "usage: 0. merge SOURCE[@REV] [TARGET_WCPATH]\n"
+ " (the 'sync' merge)\n"
+ " 1. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]\n"
+ " (the 'cherry-pick' merge)\n"
" 2. merge --reintegrate SOURCE[@REV] [TARGET_WCPATH]\n"
+ " (the 'reintegrate' merge)\n"
" 3. merge SOURCE1[@N] SOURCE2[@M] [TARGET_WCPATH]\n"
+ " (the '2-URL' merge)\n"
"\n"
- " 1. The first form is called a \"sync\", or \"cherry-pick\", merge:\n"
- " svn merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]\n"
+ " 0. This form is called a 'sync' (aka 'catch-up') merge:\n"
"\n"
- " A sync merge is used to merge into a branch any unmerged changes\n"
- " made on its immediate ancestor branch.\n"
+ " svn merge SOURCE[@REV] [TARGET_WCPATH]\n"
"\n"
- " A cherry-picking merge is used to merge specific revisions from\n"
- " one branch to another.\n"
+ " A sync merge is used to merge into a branch any unmerged changes\n"
+ " made on its immediate ancestor branch. This uses merge tracking\n"
+ " to find which changes need to be merged.\n"
"\n"
- " SOURCE is usually a URL. The source of a cherry-picking merge can\n"
- " also be a working copy path, in which case the corresponding URL\n"
- " of the path is used.\n"
- "\n"
- " If REV is specified, it is used as the peg revision for SOURCE,\n"
- " i.e. SOURCE is looked up in the repository at revision REV.\n"
- " If REV is not specified, the HEAD revision is assumed.\n"
+ " SOURCE specifies the branch from where the changes will be pulled,\n"
+ " and TARGET_WCPATH specifies the working copy of the target branch,\n"
+ " into which the changes will be applied. Normally SOURCE and\n"
+ " TARGET_WCPATH should each point to the root of a branch. If changes\n"
+ " need to be merged from and to only a subtree of the branch, then\n"
+ " the path to that subtree must be included in both SOURCE and\n"
+ " TARGET_WCPATH.\n"
+ "\n"
+ " SOURCE is usually a URL. The optional '@REV' specifies both the peg\n"
+ " revision of the URL and the latest revision that will be considered\n"
+ " for merging; the default value is the HEAD revision. If SOURCE is a\n"
+ " working copy path, the corresponding URL of the path is used, and\n"
+ " the default value of 'REV' is the base revision.\n"
"\n"
- " TARGET_WCPATH is a working copy of the branch the changes will\n"
- " be applied to.\n"
- "\n"
- " '-r N:M' specifies a revision range to be merged. The difference\n"
- " between SOURCE@REV as it existed at revision N, and SOURCE@REV at\n"
- " it existed at revision M, is merged into TARGET_WCPATH. If no\n"
- " revision range is specified, the default range of 0:REV is used.\n"
- " \n"
- " If mergeinfo within TARGET_WCPATH indicates that revisions within\n"
- " the range were already merged, changes made in those revisions\n"
- " are not merged again. If needed, the range is broken into multiple\n"
- " sub-ranges, and each sub-range is merged separately.\n"
- "\n"
- " If N is greater than M, the range is a \"reverse range\".\n"
- " A reverse range can be used to undo changes made to SOURCE\n"
- " between revisions N and M.\n"
- "\n"
- " '-c M' is equivalent to the range '-r <M-1>:M'.\n"
- " '-c -M' does the reverse: '-r M:<M-1>'.\n"
- " \n"
- " Multiple '-c' and/or '-r' options may be specified and mixing of\n"
- " forward and reverse ranges is allowed.\n"
+ " TARGET_WCPATH is a working copy path; the default is '.'.\n"
"\n"
" - Sync Merge Example -\n"
"\n"
- " A feature is being developed on a branch called \"feature\".\n"
- " The feature branch is regularly synced with trunk to keep up with\n"
- " changes made there.\n"
+ " A feature is being developed on a branch called 'feature'. The\n"
+ " feature branch is regularly synced with trunk to keep up with the\n"
+ " changes made there. The previous sync merges are not shown on this\n"
+ " diagram, and the last of them was done when HEAD was r100, and now\n"
+ " HEAD is r200.\n"
"\n"
" feature +------------------------o-----\n"
" / ^\n"
@@ -723,19 +725,53 @@ const svn_opt_subcommand_desc2_t svn_cl_
" / .............../\n"
" trunk ------+------------L--------------R------\n"
" r100 r200\n"
- " \n"
- " In the above diagram, L marks the \"left\" side of the merge\n"
- " (trunk@100), and R marks the \"right\" side of the merge (trunk@200).\n"
- " The difference between the left and right side is merged into the target.\n"
"\n"
- " To perform the merge, check out a working copy of the feature\n"
+ " Subversion will locate all the changes on 'trunk' that have not yet\n"
+ " been merged into the target. In this case that is a single range,\n"
+ " r100:200. In the diagram above, L marks the 'left' side of the\n"
+ " range (trunk@100) and R marks the 'right' side of the range\n"
+ " (trunk@200). The difference between L and R will be merged into\n"
+ " the target.\n"
+ "\n"
+ " To perform this sync merge, check out a working copy of the feature\n"
" branch and run the following command in the top-level directory\n"
" of the working copy:\n"
"\n"
" svn merge ^/trunk\n"
"\n"
- " The default revision range is -r0:HEAD, so any unmerged changes\n"
- " will be merged.\n"
+ "\n"
+ " 1. This form is called a 'cherry-pick' merge:\n"
+ "\n"
+ " svn merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]\n"
+ "\n"
+ " A cherry-picking merge is used to merge specific revisions (or\n"
+ " revision ranges) from one branch to another. By default, this form\n"
+ " of merge uses merge tracking to avoid re-merging any of the specified\n"
+ " revisions that have already been merged. If the --ignore-ancestry\n"
+ " option is given then that does not happen.\n"
+ "\n"
+ " The SOURCE and TARGET_WCPATH arguments are the same as for a 'sync'\n"
+ " merge, except that REV acts only as a peg and does not specify the\n"
+ " latest revision that will be considered for merging.\n"
+ "\n"
+ " The revision ranges to be merged are specified by the '-r' and/or\n"
+ " '-c' options. '-r N:M' refers to the difference in the history of\n"
+ " the source branch between revision N and revision M. '-c M' is\n"
+ " equivalent to '-r <M-1>:M'. Each such difference is merged into\n"
+ " TARGET_WCPATH.\n"
+ "\n"
+ " If mergeinfo within TARGET_WCPATH indicates that revisions within\n"
+ " the range were already merged, changes made in those revisions\n"
+ " are not merged again. If needed, the range is broken into multiple\n"
+ " sub-ranges, and each sub-range is merged separately.\n"
+ "\n"
+ " If N is greater than M in '-r N:M', or with '-c -M' which is\n"
+ " equivalent to '-r M:<M-1>', the range is a 'reverse range'.\n"
+ " A reverse range can be used to undo changes made to SOURCE\n"
+ " between revisions N and M.\n"
+ "\n"
+ " Multiple '-c' and/or '-r' options may be specified and mixing of\n"
+ " forward and reverse ranges is allowed.\n"
"\n"
" - Cherry-picking Merge Example -\n"
"\n"
@@ -748,10 +784,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
" / |\n"
" trunk ------+--------------------------LR-----\n"
" r50\n"
- " \n"
+ "\n"
" In the above diagram, L marks the left side of the merge (trunk@49)\n"
- " and R marks the right side of the merge (trunk@50).\n"
- " The difference between the left and right side is merged into the target.\n"
+ " and R marks the right side of the merge (trunk@50). The difference\n"
+ " between the left and right side is merged into the target.\n"
"\n"
" To perform the merge, check out a working copy of the release\n"
" branch and run the following command in the top-level directory\n"
@@ -765,8 +801,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
" svn merge -c50,54,60 ^/trunk\n"
"\n"
"\n"
- " 2. The second form is called a \"reintegrate merge\":\n"
- " svn merge --reintegrate SOURCE[@REV] [TARGET_WCPATH]\n"
+ " 2. This form is called a 'reintegrate merge':\n"
+ "\n"
+ " svn merge --reintegrate SOURCE[@REV] [TARGET_WCPATH]\n"
"\n"
" SOURCE is the URL of a branch to be merged back into (usually) its\n"
" immediate ancestor branch. If REV is specified, it is used a\n"
@@ -779,10 +816,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
"\n"
" - Reintegrate Merge Example -\n"
"\n"
- " A feature has been developed on a branch called \"feature\".\n"
+ " A feature has been developed on a branch called 'feature'.\n"
" The feature branch started as a copy of trunk@W. Work on the\n"
" feature has completed and it should be merged back into the trunk.\n"
- " \n"
+ "\n"
" The feature branch was last synced with its immediate ancestor,\n"
" the trunk, in revision X. So the difference between trunk@X and\n"
" feature@HEAD contains the complete set of changes that implement\n"
@@ -820,8 +857,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
" be done on the feature branch, it should be deleted and then re-created.\n"
"\n"
"\n"
- " 3. The third form is called a \"2-URL merge\":\n"
- " svn merge SOURCE1[@N] SOURCE2[@M] [TARGET_WCPATH]\n"
+ " 3. This form is called a '2-URL merge':\n"
+ "\n"
+ " svn merge SOURCE1[@N] SOURCE2[@M] [TARGET_WCPATH]\n"
"\n"
" Two source URLs are specified, together with two revisions N and M.\n"
" The two sources to be compared at the specified revisions, and the\n"
@@ -847,9 +885,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
"\n"
" - 2-URL Merge Example -\n"
"\n"
- " A feature has been developed on a branch called \"feature\".\n"
+ " A feature has been developed on a branch called 'feature'.\n"
" Development for the upcoming 3.0 release has happened in parallel on\n"
- " the \"3.x-release\" branch. The work on the feature branch must be\n"
+ " the '3.x-release' branch. The work on the feature branch must be\n"
" merged to the 3.x-release branch. However, the feature branch and\n"
" the 3.x-release branch are not directly related, so a 2-URL merge\n"
" is needed.\n"
@@ -876,7 +914,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" To perform the merge, check out a working copy of the 3.x-release\n"
" branch and run the following command in the top-level directory\n"
" of the working copy:\n"
- " \n"
+ "\n"
" svn merge ^/trunk@500 ^/feature\n"
"\n"
" Before performing a 2-URL merge, it is a good idea to preview the\n"
@@ -1012,6 +1050,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
" for deletion. If the patch creates a new file, that file is scheduled\n"
" for addition. Use 'svn revert' to undo deletions and additions you\n"
" do not agree with.\n"
+ "\n"
+ " Hint: If the patch file was created with Subversion, it will contain\n"
+ " the number of a revision N the patch will cleanly apply to\n"
+ " (look for lines like '--- foo/bar.txt (revision N)').\n"
+ " To avoid rejects, first update to the revision N using\n"
+ " 'svn update -r N', apply the patch, and then update back to the\n"
+ " HEAD revision. This way, conflicts can be resolved interactively.\n"
),
{'q', opt_dry_run, opt_strip, opt_reverse_diff,
opt_ignore_whitespace} },
@@ -1146,7 +1191,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" 2. relocate TO-URL [PATH]\n"
"\n"
" Rewrite working copy URL metadata to reflect a syntactic change only.\n"
- " This is used when repository's root URL changes (such as a scheme\n"
+ " This is used when a repository's root URL changes (such as a scheme\n"
" or hostname change) but your working copy still reflects the same\n"
" directory within the same repository.\n"
"\n"
@@ -1190,7 +1235,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
"usage: revert PATH...\n"
"\n"
" Note: this subcommand does not require network access, and resolves\n"
- " any conflicted states. However, it does not restore removed directories.\n"),
+ " any conflicted states.\n"),
{opt_targets, 'R', opt_depth, 'q', opt_changelist} },
{ "status", svn_cl__status, {"stat", "st"}, N_
@@ -1390,7 +1435,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
{ "upgrade", svn_cl__upgrade, {0}, N_
("Upgrade the metadata storage format for a working copy.\n"
- "usage: upgrade WCPATH...\n"
+ "usage: upgrade [WCPATH...]\n"
"\n"
" Local modifications are preserved.\n"),
{ 'q' } },
@@ -1449,7 +1494,6 @@ main(int argc, const char *argv[])
svn_error_t *err;
apr_allocator_t *allocator;
apr_pool_t *pool;
- svn_cache_config_t settings;
int opt_id;
apr_getopt_t *os;
svn_cl__opt_state_t opt_state = { 0, { 0 } };
@@ -1463,6 +1507,7 @@ main(int argc, const char *argv[])
svn_config_t *cfg_config;
svn_boolean_t descend = TRUE;
svn_boolean_t interactive_conflicts = FALSE;
+ svn_boolean_t use_notifier = TRUE;
apr_hash_t *changelists;
/* Initialize the app. */
@@ -1497,17 +1542,6 @@ main(int argc, const char *argv[])
}
#endif
- /* Per default, disable large expensive FS caching on the client side.
- * We can still chose a different size for that cache later in the
- * startup phase, e.g. after reading config files. If that does not
- * happen until the first FSFS repository get opened, low initialization
- * overhead caches will be used for the most time-critical structures.
- *
- * This is only relevant for FSFS over ra_local. */
- settings = *svn_cache_config_get();
- settings.cache_size = 0x0;
- svn_cache_config_set(&settings);
-
/* Initialize the RA library. */
err = svn_ra_initialize(pool);
if (err)
@@ -1602,7 +1636,6 @@ main(int argc, const char *argv[])
{
char *end;
svn_revnum_t changeno, changeno_end;
- svn_opt_revision_range_t *range;
const char *change_str =
APR_ARRAY_IDX(change_revs, i, const char *);
const char *s = change_str;
@@ -1674,15 +1707,11 @@ main(int argc, const char *argv[])
changeno_end = changeno - 1;
}
- range = apr_palloc(pool, sizeof(*range));
- range->start.value.number = changeno;
- range->end.value.number = changeno_end;
-
opt_state.used_change_arg = TRUE;
- range->start.kind = svn_opt_revision_number;
- range->end.kind = svn_opt_revision_number;
APR_ARRAY_PUSH(opt_state.revision_ranges,
- svn_opt_revision_range_t *) = range;
+ svn_opt_revision_range_t *)
+ = svn_opt__revision_range_from_revnums(changeno, changeno_end,
+ pool);
}
}
break;
@@ -1942,12 +1971,6 @@ main(int argc, const char *argv[])
break;
case opt_changelist:
opt_state.changelist = apr_pstrdup(pool, opt_arg);
- if (opt_state.changelist[0] == '\0')
- {
- err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("Changelist names must not be empty"));
- return svn_cmdline_handle_exit_error(err, pool, "svn: ");
- }
apr_hash_set(changelists, opt_state.changelist,
APR_HASH_KEY_STRING, (void *)1);
break;
@@ -2035,6 +2058,9 @@ main(int argc, const char *argv[])
case opt_allow_mixed_revisions:
opt_state.allow_mixed_rev = TRUE;
break;
+ case opt_include_externals:
+ opt_state.include_externals = TRUE;
+ break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */
@@ -2195,6 +2221,19 @@ main(int argc, const char *argv[])
return svn_cmdline_handle_exit_error(err, pool, "svn: ");
}
+ /* Disallow simultaneous use of both -m and -F, when they are
+ both used to pass a commit message or lock comment. ('propset'
+ takes the property value, not a commit message, from -F.)
+ */
+ if (opt_state.filedata && opt_state.message
+ && subcommand->cmd_func != svn_cl__propset)
+ {
+ err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("--message (-m) and --file (-F) "
+ "are mutually exclusive"));
+ return svn_cmdline_handle_exit_error(err, pool, "svn: ");
+ }
+
/* --trust-server-cert can only be used with --non-interactive */
if (opt_state.trust_server_cert && !opt_state.non_interactive)
{
@@ -2486,12 +2525,21 @@ main(int argc, const char *argv[])
subcommands will populate the ctx->log_msg_baton3. */
ctx->log_msg_func3 = svn_cl__get_log_message;
- /* Set up the notifier. */
- if (((subcommand->cmd_func != svn_cl__status) && !opt_state.quiet)
- || ((subcommand->cmd_func == svn_cl__status) && !opt_state.xml))
+ /* Set up the notifier.
+
+ In general, we use it any time we aren't in --quiet mode. 'svn
+ status' is unique, though, in that we don't want it in --quiet mode
+ unless we're also in --verbose mode. When in --xml mode,
+ though, we never want it. */
+ if (opt_state.quiet)
+ use_notifier = FALSE;
+ if ((subcommand->cmd_func == svn_cl__status) && opt_state.verbose)
+ use_notifier = TRUE;
+ if (opt_state.xml)
+ use_notifier = FALSE;
+ if (use_notifier)
{
- err = svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, pool);
+ err = svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, pool);
if (err)
return svn_cmdline_handle_exit_error(err, pool, "svn: ");
}
Modified: subversion/branches/svn-bisect/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/merge-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/merge-cmd.c Mon Nov 21 07:07:56 2011
@@ -175,28 +175,21 @@ svn_cl__merge(apr_getopt_t *os,
_("Too many arguments given"));
/* Set the default value for unspecified paths and peg revision. */
- if (targets->nelts == 0)
- {
- peg_revision1.kind = svn_opt_revision_head;
- }
- else
- {
- /* targets->nelts is 1 ("svn merge SOURCE") or 2 ("svn merge
- SOURCE WCPATH") here. */
- sourcepath2 = sourcepath1;
-
- if (peg_revision1.kind == svn_opt_revision_unspecified)
- peg_revision1.kind = svn_path_is_url(sourcepath1)
- ? svn_opt_revision_head : svn_opt_revision_working;
-
- if (targets->nelts == 2)
- {
- targetpath = APR_ARRAY_IDX(targets, 1, const char *);
- if (svn_path_is_url(targetpath))
- return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("Cannot specify a revision range "
- "with two URLs"));
- }
+ /* targets->nelts is 1 ("svn merge SOURCE") or 2 ("svn merge
+ SOURCE WCPATH") here. */
+ sourcepath2 = sourcepath1;
+
+ if (peg_revision1.kind == svn_opt_revision_unspecified)
+ peg_revision1.kind = svn_path_is_url(sourcepath1)
+ ? svn_opt_revision_head : svn_opt_revision_working;
+
+ if (targets->nelts == 2)
+ {
+ targetpath = APR_ARRAY_IDX(targets, 1, const char *);
+ if (svn_path_is_url(targetpath))
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Cannot specify a revision range "
+ "with two URLs"));
}
}
else /* using @rev syntax */
@@ -298,12 +291,16 @@ svn_cl__merge(apr_getopt_t *os,
"with --reintegrate"));
}
- if (! two_sources_specified) /* TODO: Switch order of if */
+ if (opt_state->reintegrate)
+ {
+ err = svn_client_merge_reintegrate(sourcepath1,
+ &peg_revision1,
+ targetpath,
+ opt_state->dry_run,
+ options, ctx, pool);
+ }
+ else if (! two_sources_specified)
{
- /* If we don't have a source, use the target as the source. */
- if (! sourcepath1)
- sourcepath1 = targetpath;
-
/* If we don't have at least one valid revision range, pick a
good one that spans the entire set of revisions on our
source. */
@@ -318,26 +315,19 @@ svn_cl__merge(apr_getopt_t *os,
APR_ARRAY_PUSH(ranges_to_merge, svn_opt_revision_range_t *) = range;
}
- if (opt_state->reintegrate)
- err = svn_client_merge_reintegrate(sourcepath1,
- &peg_revision1,
- targetpath,
- opt_state->dry_run,
- options, ctx, pool);
- else
- err = svn_client_merge_peg4(sourcepath1,
- ranges_to_merge,
- &peg_revision1,
- targetpath,
- opt_state->depth,
- opt_state->ignore_ancestry,
- opt_state->force,
- opt_state->record_only,
- opt_state->dry_run,
- opt_state->allow_mixed_rev,
- options,
- ctx,
- pool);
+ err = svn_client_merge_peg4(sourcepath1,
+ ranges_to_merge,
+ &peg_revision1,
+ targetpath,
+ opt_state->depth,
+ opt_state->ignore_ancestry,
+ opt_state->force,
+ opt_state->record_only,
+ opt_state->dry_run,
+ opt_state->allow_mixed_rev,
+ options,
+ ctx,
+ pool);
}
else
{
Modified: subversion/branches/svn-bisect/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/mergeinfo-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/mergeinfo-cmd.c Mon Nov 21 07:07:56 2011
@@ -67,8 +67,8 @@ svn_cl__mergeinfo(apr_getopt_t *os,
const char *source, *target;
svn_opt_revision_t src_peg_revision, tgt_peg_revision;
/* Default to depth empty. */
- svn_depth_t depth = opt_state->depth == svn_depth_unknown
- ? svn_depth_empty : opt_state->depth;
+ svn_depth_t depth = (opt_state->depth == svn_depth_unknown)
+ ? svn_depth_empty : opt_state->depth;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
Modified: subversion/branches/svn-bisect/subversion/svn/mkdir-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/mkdir-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/mkdir-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/mkdir-cmd.c Mon Nov 21 07:07:56 2011
@@ -78,7 +78,8 @@ svn_cl__mkdir(apr_getopt_t *os,
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
err = svn_client_mkdir4(targets, opt_state->parents,
- opt_state->revprop_table, svn_cl__print_commit_info,
+ opt_state->revprop_table,
+ (opt_state->quiet ? NULL : svn_cl__print_commit_info),
NULL, ctx, pool);
if (ctx->log_msg_func3)
Modified: subversion/branches/svn-bisect/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/move-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/move-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/move-cmd.c Mon Nov 21 07:07:56 2011
@@ -86,7 +86,8 @@ svn_cl__move(apr_getopt_t *os,
err = svn_client_move6(targets, dst_path,
TRUE, opt_state->parents, opt_state->revprop_table,
- svn_cl__print_commit_info, NULL, ctx, pool);
+ (opt_state->quiet ? NULL : svn_cl__print_commit_info),
+ NULL, ctx, pool);
if (err)
err = svn_cl__may_need_force(err);
Modified: subversion/branches/svn-bisect/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/notify.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/notify.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/notify.c Mon Nov 21 07:07:56 2011
@@ -47,7 +47,6 @@ struct notify_baton
svn_boolean_t is_checkout;
svn_boolean_t is_export;
svn_boolean_t is_wc_to_repos_copy;
- svn_boolean_t suppress_summary_lines;
svn_boolean_t sent_first_txdelta;
svn_boolean_t in_external;
svn_boolean_t had_print_error; /* Used to not keep printing error messages
@@ -583,8 +582,7 @@ notify(void *baton, const svn_wc_notify_
break;
case svn_wc_notify_update_started:
- if (! (nb->suppress_summary_lines ||
- nb->in_external ||
+ if (! (nb->in_external ||
nb->is_checkout ||
nb->is_export))
{
@@ -596,77 +594,74 @@ notify(void *baton, const svn_wc_notify_
case svn_wc_notify_update_completed:
{
- if (! nb->suppress_summary_lines)
+ if (SVN_IS_VALID_REVNUM(n->revision))
{
- if (SVN_IS_VALID_REVNUM(n->revision))
+ if (nb->is_export)
{
- if (nb->is_export)
+ if ((err = svn_cmdline_printf
+ (pool, nb->in_external
+ ? _("Exported external at revision %ld.\n")
+ : _("Exported revision %ld.\n"),
+ n->revision)))
+ goto print_error;
+ }
+ else if (nb->is_checkout)
+ {
+ if ((err = svn_cmdline_printf
+ (pool, nb->in_external
+ ? _("Checked out external at revision %ld.\n")
+ : _("Checked out revision %ld.\n"),
+ n->revision)))
+ goto print_error;
+ }
+ else
+ {
+ if (nb->received_some_change)
{
+ nb->received_some_change = FALSE;
if ((err = svn_cmdline_printf
(pool, nb->in_external
- ? _("Exported external at revision %ld.\n")
- : _("Exported revision %ld.\n"),
+ ? _("Updated external to revision %ld.\n")
+ : _("Updated to revision %ld.\n"),
n->revision)))
goto print_error;
}
- else if (nb->is_checkout)
+ else
{
if ((err = svn_cmdline_printf
(pool, nb->in_external
- ? _("Checked out external at revision %ld.\n")
- : _("Checked out revision %ld.\n"),
+ ? _("External at revision %ld.\n")
+ : _("At revision %ld.\n"),
n->revision)))
goto print_error;
}
- else
- {
- if (nb->received_some_change)
- {
- nb->received_some_change = FALSE;
- if ((err = svn_cmdline_printf
- (pool, nb->in_external
- ? _("Updated external to revision %ld.\n")
- : _("Updated to revision %ld.\n"),
- n->revision)))
- goto print_error;
- }
- else
- {
- if ((err = svn_cmdline_printf
- (pool, nb->in_external
- ? _("External at revision %ld.\n")
- : _("At revision %ld.\n"),
- n->revision)))
- goto print_error;
- }
- }
}
- else /* no revision */
+ }
+ else /* no revision */
+ {
+ if (nb->is_export)
{
- if (nb->is_export)
- {
- if ((err = svn_cmdline_printf
- (pool, nb->in_external
- ? _("External export complete.\n")
- : _("Export complete.\n"))))
- goto print_error;
- }
- else if (nb->is_checkout)
- {
- if ((err = svn_cmdline_printf
- (pool, nb->in_external
- ? _("External checkout complete.\n")
- : _("Checkout complete.\n"))))
- goto print_error;
- }
- else
- {
- if ((err = svn_cmdline_printf
- (pool, nb->in_external
- ? _("External update complete.\n")
- : _("Update complete.\n"))))
- goto print_error;
- }
+ if ((err = svn_cmdline_printf
+ (pool, nb->in_external
+ ? _("External export complete.\n")
+ : _("Export complete.\n"))))
+ goto print_error;
+ }
+ else if (nb->is_checkout)
+ {
+ if ((err = svn_cmdline_printf
+ (pool, nb->in_external
+ ? _("External checkout complete.\n")
+ : _("Checkout complete.\n"))))
+ goto print_error;
+ }
+ else
+ {
+ if ((err = svn_cmdline_printf
+ (pool, nb->in_external
+ ? _("External update complete.\n")
+ : _("Update complete.\n"))))
+ goto print_error;
}
}
}
@@ -1016,7 +1011,6 @@ notify(void *baton, const svn_wc_notify_
svn_error_t *
svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p,
void **notify_baton_p,
- svn_boolean_t suppress_summary_lines,
apr_pool_t *pool)
{
struct notify_baton *nb = apr_pcalloc(pool, sizeof(*nb));
@@ -1026,7 +1020,6 @@ svn_cl__get_notifier(svn_wc_notify_func2
nb->is_checkout = FALSE;
nb->is_export = FALSE;
nb->is_wc_to_repos_copy = FALSE;
- nb->suppress_summary_lines = suppress_summary_lines;
nb->in_external = FALSE;
nb->had_print_error = FALSE;
nb->text_conflicts = 0;
Modified: subversion/branches/svn-bisect/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/propedit-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/propedit-cmd.c Mon Nov 21 07:07:56 2011
@@ -122,7 +122,7 @@ svn_cl__propedit(apr_getopt_t *os,
if (! propval)
{
- propval = svn_string_create("", pool);
+ propval = svn_string_create_empty(pool);
/* This is how we signify to svn_client_revprop_set2() that
we want it to check that the original value hasn't
changed, but that that original value was non-existent: */
@@ -212,7 +212,7 @@ svn_cl__propedit(apr_getopt_t *os,
svn_string_t *propval, *edited_propval;
const char *base_dir = target;
const char *target_local;
- const char *local_abspath;
+ const char *abspath_or_url;
svn_node_kind_t kind;
svn_opt_revision_t peg_revision;
svn_revnum_t base_rev = SVN_INVALID_REVNUM;
@@ -221,28 +221,25 @@ svn_cl__propedit(apr_getopt_t *os,
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
if (!svn_path_is_url(target))
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, subpool));
+ SVN_ERR(svn_dirent_get_absolute(&abspath_or_url, target, subpool));
+ else
+ abspath_or_url = target;
/* Propedits can only happen on HEAD or the working copy, so
the peg revision can be as unspecified. */
peg_revision.kind = svn_opt_revision_unspecified;
/* Fetch the current property. */
- SVN_ERR(svn_client_propget4(&props, pname_utf8,
- svn_path_is_url(target)
- ? target : local_abspath,
+ SVN_ERR(svn_client_propget4(&props, pname_utf8, abspath_or_url,
&peg_revision,
&(opt_state->start_revision),
&base_rev, svn_depth_empty,
NULL, ctx, subpool, subpool));
/* Get the property value. */
- propval = apr_hash_get(props,
- svn_path_is_url(target)
- ? target : local_abspath,
- APR_HASH_KEY_STRING);
+ propval = apr_hash_get(props, abspath_or_url, APR_HASH_KEY_STRING);
if (! propval)
- propval = svn_string_create("", subpool);
+ propval = svn_string_create_empty(subpool);
if (svn_path_is_url(target))
{
@@ -261,8 +258,8 @@ svn_cl__propedit(apr_getopt_t *os,
}
/* Split the path if it is a file path. */
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
- subpool));
+ SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, abspath_or_url,
+ FALSE, subpool));
if (kind == svn_node_none)
return svn_error_createf(
@@ -329,7 +326,7 @@ svn_cl__propedit(apr_getopt_t *os,
return svn_error_trace(err);
/* Print a message if we successfully committed or if it
- was just a wc propset (but not if the user aborted an URL
+ was just a wc propset (but not if the user aborted a URL
propedit). */
if (!svn_path_is_url(target))
SVN_ERR(svn_cmdline_printf(
Modified: subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/proplist-cmd.c Mon Nov 21 07:07:56 2011
@@ -112,6 +112,8 @@ svn_cl__proplist(apr_getopt_t *os,
svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_array_header_t *targets;
+ apr_array_header_t *errors = apr_array_make(scratch_pool, 0,
+ sizeof(apr_status_t));
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -168,7 +170,6 @@ svn_cl__proplist(apr_getopt_t *os,
int i;
apr_pool_t *iterpool;
svn_proplist_receiver_t pl_receiver;
- svn_boolean_t had_errors = FALSE;
if (opt_state->xml)
{
@@ -190,7 +191,6 @@ svn_cl__proplist(apr_getopt_t *os,
proplist_baton_t pl_baton;
const char *truepath;
svn_opt_revision_t peg_revision;
- svn_boolean_t success;
svn_pool_clear(iterpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
@@ -209,13 +209,10 @@ svn_cl__proplist(apr_getopt_t *os,
opt_state->changelists,
pl_receiver, &pl_baton,
ctx, iterpool),
- &success, opt_state->quiet,
+ errors, opt_state->quiet,
SVN_ERR_UNVERSIONED_RESOURCE,
SVN_ERR_ENTRY_NOT_FOUND,
SVN_NO_ERROR));
-
- if (!success)
- had_errors = TRUE;
}
svn_pool_destroy(iterpool);
@@ -223,10 +220,29 @@ svn_cl__proplist(apr_getopt_t *os,
SVN_ERR(svn_cl__xml_print_footer("properties", scratch_pool));
/* Error out *after* we closed the XML element */
- if (had_errors)
- return svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Could not display info for all targets "
- "because some targets don't exist"));
+ if (errors->nelts > 0)
+ {
+ svn_error_t *err;
+
+ err = svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL, NULL);
+ for (i = 0; i < errors->nelts; i++)
+ {
+ apr_status_t status = APR_ARRAY_IDX(errors, i, apr_status_t);
+
+ if (status == SVN_ERR_ENTRY_NOT_FOUND)
+ err = svn_error_quick_wrap(err,
+ _("Could not display properties "
+ "of all targets because some "
+ "targets don't exist"));
+ else if (status == SVN_ERR_UNVERSIONED_RESOURCE)
+ err = svn_error_quick_wrap(err,
+ _("Could not display properties "
+ "of all targets because some "
+ "targets are not versioned"));
+ }
+
+ return svn_error_trace(err);
+ }
}
return SVN_NO_ERROR;
Modified: subversion/branches/svn-bisect/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/props.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/props.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/props.c Mon Nov 21 07:07:56 2011
@@ -156,7 +156,7 @@ svn_cl__print_xml_prop_hash(svn_stringbu
apr_hash_index_t *hi;
if (*outstr == NULL)
- *outstr = svn_stringbuf_create("", pool);
+ *outstr = svn_stringbuf_create_empty(pool);
for (hi = apr_hash_first(pool, prop_hash); hi; hi = apr_hash_next(hi))
{
Modified: subversion/branches/svn-bisect/subversion/svn/relocate-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/relocate-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/relocate-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/relocate-cmd.c Mon Nov 21 07:07:56 2011
@@ -50,7 +50,7 @@ svn_cl__relocate(apr_getopt_t *os,
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
svn_boolean_t ignore_externals = opt_state->ignore_externals;
apr_array_header_t *targets;
- const char *from = NULL, *to = NULL, *path;
+ const char *from, *to, *path;
/* We've got two different syntaxes to support:
Modified: subversion/branches/svn-bisect/subversion/svn/schema/diff.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/schema/diff.rnc?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/schema/diff.rnc (original)
+++ subversion/branches/svn-bisect/subversion/svn/schema/diff.rnc Mon Nov 21 07:07:56 2011
@@ -35,5 +35,5 @@ attlist.path &=
## The kind of the entry.
attribute kind { "dir" | "file" },
## The action performed against this path. This terminology
- ## was chosen for consistencey from 'svn list'.
+ ## was chosen for consistency with 'svn status'.
attribute item { "none" | "added" | "modified" | "deleted" }
Modified: subversion/branches/svn-bisect/subversion/svn/schema/status.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/schema/status.rnc?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/schema/status.rnc (original)
+++ subversion/branches/svn-bisect/subversion/svn/schema/status.rnc Mon Nov 21 07:07:56 2011
@@ -70,7 +70,11 @@ attlist.wc-status &=
attribute switched { "true" | "false" }?,
## Tree-conflict status of the item.
[ a:defaultValue = "false" ]
- attribute tree-conflicted { "true" | "false" }?
+ attribute tree-conflicted { "true" | "false" }?,
+ ## If root of a move-here, the local path to the move source.
+ attribute moved-from { text }?,
+ ## If root of a move-away, the local path to the move destination.
+ attribute moved-to { text }?
## Status in repository (if --update was specified).
repos-status = element repos-status { attlist.repos-status, lock? }
Modified: subversion/branches/svn-bisect/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/status-cmd.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/status-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/status-cmd.c Mon Nov 21 07:07:56 2011
@@ -50,6 +50,8 @@ struct status_baton
{
/* These fields all correspond to the ones in the
svn_cl__print_status() interface. */
+ const char *cwd_abspath;
+ svn_boolean_t suppress_externals_placeholders;
svn_boolean_t detailed;
svn_boolean_t show_last_committed;
svn_boolean_t skip_unrecognized;
@@ -106,7 +108,7 @@ print_conflict_stats(struct status_baton
static svn_error_t *
print_start_target_xml(const char *target, apr_pool_t *pool)
{
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
"path", target, NULL);
@@ -122,7 +124,7 @@ static svn_error_t *
print_finish_target_xml(svn_revnum_t repos_rev,
apr_pool_t *pool)
{
- svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
if (SVN_IS_VALID_REVNUM(repos_rev))
{
@@ -149,9 +151,12 @@ print_status_normal_or_xml(void *baton,
struct status_baton *sb = baton;
if (sb->xml_mode)
- return svn_cl__print_status_xml(path, status, sb->ctx, pool);
+ return svn_cl__print_status_xml(sb->cwd_abspath, path, status,
+ sb->ctx, pool);
else
- return svn_cl__print_status(path, status, sb->detailed,
+ return svn_cl__print_status(sb->cwd_abspath, path, status,
+ sb->suppress_externals_placeholders,
+ sb->detailed,
sb->show_last_committed,
sb->skip_unrecognized,
sb->repos_locks,
@@ -298,6 +303,9 @@ 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);
sb.show_last_committed = opt_state->verbose;
sb.skip_unrecognized = opt_state->quiet;
@@ -355,7 +363,7 @@ svn_cl__status(apr_getopt_t *os,
svn_stringbuf_t *buf;
if (opt_state->xml)
- buf = svn_stringbuf_create("", scratch_pool);
+ buf = svn_stringbuf_create_empty(scratch_pool);
for (hi = apr_hash_first(scratch_pool, master_cl_hash); hi;
hi = apr_hash_next(hi))