You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/15 21:32:38 UTC
svn commit: r997472 [33/41] - in /subversion/branches/py-tests-as-modules:
./ build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/server-side/ notes/ notes/tree-conflicts/ notes/wc-ng/
subversion/bindings/javahl/native/ subversi...
Modified: subversion/branches/py-tests-as-modules/subversion/svn/add-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/add-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/add-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/add-cmd.c Wed Sep 15 19:32:26 2010
@@ -29,11 +29,13 @@
#define APR_WANT_STDIO
#include <apr_want.h>
+#include "svn_path.h"
#include "svn_client.h"
#include "svn_error.h"
#include "svn_pools.h"
#include "cl.h"
+#include "svn_private_config.h"
/*** Code. ***/
@@ -48,7 +50,7 @@ svn_cl__add(apr_getopt_t *os,
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_array_header_t *targets;
int i;
- apr_pool_t *subpool;
+ apr_pool_t *iterpool;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -57,33 +59,42 @@ svn_cl__add(apr_getopt_t *os,
if (! targets->nelts)
return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_infinity;
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
- subpool = svn_pool_create(pool);
+ /* Don't even attempt to modify the working copy if any of the
+ * targets look like URLs. URLs are invalid input. */
+ for (i = 0; i < targets->nelts; i++)
+ {
+ const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+ if (svn_path_is_url(target))
+ return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+ NULL,
+ _("'%s' is not a local path"),
+ target));
+ }
+
+ iterpool = svn_pool_create(pool);
for (i = 0; i < targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
SVN_ERR(svn_cl__try
(svn_client_add4(target,
opt_state->depth,
opt_state->force, opt_state->no_ignore,
- opt_state->parents, ctx, subpool),
+ opt_state->parents, ctx, iterpool),
NULL, opt_state->quiet,
SVN_ERR_ENTRY_EXISTS,
SVN_ERR_WC_PATH_NOT_FOUND,
SVN_NO_ERROR));
}
- svn_pool_destroy(subpool);
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/blame-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/blame-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/blame-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/blame-cmd.c Wed Sep 15 19:32:26 2010
@@ -167,7 +167,7 @@ print_line_info(svn_stream_t *out,
}
else
{
- return svn_stream_printf(out, pool, "%s %10s ", rev_str,
+ return svn_stream_printf(out, pool, "%s %10.10s ", rev_str,
author ? author : " -");
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/changelist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/changelist-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/changelist-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/changelist-cmd.c Wed Sep 15 19:32:26 2010
@@ -24,6 +24,7 @@
#include "svn_client.h"
#include "svn_error_codes.h"
#include "svn_error.h"
+#include "svn_path.h"
#include "svn_utf.h"
#include "cl.h"
@@ -44,6 +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;
+ int i;
/* If we're not removing changelists, then our first argument should
be the name of a changelist. */
@@ -70,10 +72,20 @@ svn_cl__changelist(apr_getopt_t *os,
if (! targets->nelts)
return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
- else
+ /* Don't even attempt to modify the working copy if any of the
+ * targets look like URLs. URLs are invalid input. */
+ for (i = 0; i < targets->nelts; i++)
+ {
+ const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+ if (svn_path_is_url(target))
+ return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+ NULL,
+ _("'%s' is not a local path"),
+ target));
+ }
+
+ if (opt_state->quiet)
/* FIXME: This is required because svn_client_create_context()
always initializes ctx->notify_func2 to a wrapper function
which calls ctx->notify_func() if it isn't NULL. In other
Modified: subversion/branches/py-tests-as-modules/subversion/svn/checkout-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/checkout-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/checkout-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/checkout-cmd.c Wed Sep 15 19:32:26 2010
@@ -113,8 +113,7 @@ svn_cl__checkout(apr_getopt_t *os,
}
if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, TRUE,
- FALSE, FALSE, pool));
+ SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_baton2));
subpool = svn_pool_create(pool);
for (i = 0; i < targets->nelts - 1; ++i)
Modified: subversion/branches/py-tests-as-modules/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/cl.h?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/cl.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/cl.h Wed Sep 15 19:32:26 2010
@@ -228,6 +228,8 @@ typedef struct svn_cl__opt_state_t
patching */
svn_boolean_t show_diff; /* produce diff output */
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 old_patch_target_names; /* Use target names from old side */
} svn_cl__opt_state_t;
@@ -356,9 +358,13 @@ svn_cl__conflict_handler(svn_wc_conflict
/* Print out commit information found in COMMIT_INFO to the console.
* POOL is used for temporay allocations.
* COMMIT_INFO should not be NULL.
+ *
+ * This function implements svn_commit_callback2_t.
*/
svn_error_t *
-svn_cl__print_commit_info(svn_commit_info_t *commit_info, apr_pool_t *pool);
+svn_cl__print_commit_info(const svn_commit_info_t *commit_info,
+ void *baton,
+ apr_pool_t *pool);
/* Convert the date in DATA to a human-readable UTF-8-encoded string
@@ -538,25 +544,27 @@ 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 this is a checkout, set IS_CHECKOUT to true, so that the
- * notifier will print the appropriate summary line at the end of the
- * output.
- *
- * If this is an export, set IS_EXPORT to true, so that the
- * notifier will print the appropriate summary line at the end of the
- * output.
- *
* 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 is_checkout,
- svn_boolean_t is_export,
svn_boolean_t suppress_final_line,
apr_pool_t *pool);
+/* Make the notifier for use with BATON print the appropriate summary
+ * line at the end of the output.
+ */
+svn_error_t *
+svn_cl__notifier_mark_checkout(void *baton);
+
+/* Make the notifier for use with BATON print the appropriate summary
+ * line at the end of the output.
+ */
+svn_error_t *
+svn_cl__notifier_mark_export(void *baton);
+
/* Print conflict stats accumulated in NOTIFY_BATON.
* Return any error encountered during printing.
* Do all allocations in POOL.*/
Modified: subversion/branches/py-tests-as-modules/subversion/svn/cleanup-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/cleanup-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/cleanup-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/cleanup-cmd.c Wed Sep 15 19:32:26 2010
@@ -28,10 +28,12 @@
/*** Includes. ***/
#include "svn_client.h"
+#include "svn_path.h"
#include "svn_pools.h"
#include "svn_error.h"
#include "cl.h"
+#include "svn_private_config.h"
/*** Code. ***/
@@ -55,6 +57,19 @@ svn_cl__cleanup(apr_getopt_t *os,
/* Add "." if user passed 0 arguments */
svn_opt_push_implicit_dot_target(targets, pool);
+ /* Don't even attempt to modify the working copy if any of the
+ * targets look like URLs. URLs are invalid input. */
+ for (i = 0; i < targets->nelts; i++)
+ {
+ const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+ if (svn_path_is_url(target))
+ return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+ NULL,
+ _("'%s' is not a local path"),
+ target));
+ }
+
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
subpool = svn_pool_create(pool);
Modified: subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c Wed Sep 15 19:32:26 2010
@@ -38,6 +38,7 @@
#include "svn_config.h"
#include "cl.h"
+#include "svn_private_config.h"
/* This implements the `svn_opt_subcommand_t' interface. */
@@ -54,7 +55,6 @@ svn_cl__commit(apr_getopt_t *os,
const char *base_dir;
svn_config_t *cfg;
svn_boolean_t no_unlock = FALSE;
- svn_commit_info_t *commit_info = NULL;
int i;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
@@ -66,9 +66,10 @@ svn_cl__commit(apr_getopt_t *os,
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
if (svn_path_is_url(target))
- return svn_error_create(SVN_ERR_WC_BAD_PATH, NULL,
- "Must give local path (not URL) as the "
- "target of a commit");
+ return svn_error_return(
+ svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("'%s' is a URL, but URLs cannot be "
+ "commit targets"), target));
}
/* Add "." if user passed 0 arguments. */
@@ -93,10 +94,6 @@ svn_cl__commit(apr_getopt_t *os,
base_dir = apr_pstrdup(pool, parent_dir);
}
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_infinity;
@@ -116,13 +113,15 @@ svn_cl__commit(apr_getopt_t *os,
ctx->config, pool));
/* Commit. */
- err = svn_client_commit4(&commit_info,
- targets,
+ err = svn_client_commit5(targets,
opt_state->depth,
no_unlock,
opt_state->keep_changelists,
opt_state->changelists,
opt_state->revprop_table,
+ ! opt_state->quiet
+ ? svn_cl__print_commit_info : NULL,
+ NULL,
ctx,
pool);
if (err)
@@ -140,8 +139,6 @@ svn_cl__commit(apr_getopt_t *os,
}
}
SVN_ERR(svn_cl__cleanup_log_msg(ctx->log_msg_baton3, err, pool));
- if (! err && ! opt_state->quiet)
- SVN_ERR(svn_cl__print_commit_info(commit_info, pool));
return SVN_NO_ERROR;
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c Wed Sep 15 19:32:26 2010
@@ -59,23 +59,33 @@ svn_cl__conflict_baton_make(svn_cl__acce
svn_cl__accept_t
svn_cl__accept_from_word(const char *word)
{
- if (strcmp(word, SVN_CL__ACCEPT_POSTPONE) == 0)
+ /* Shorthand options are consistent with svn_cl__conflict_handler(). */
+ if (strcmp(word, SVN_CL__ACCEPT_POSTPONE) == 0
+ || strcmp(word, "p") == 0)
return svn_cl__accept_postpone;
if (strcmp(word, SVN_CL__ACCEPT_BASE) == 0)
+ /* ### shorthand? */
return svn_cl__accept_base;
if (strcmp(word, SVN_CL__ACCEPT_WORKING) == 0)
+ /* ### shorthand? */
return svn_cl__accept_working;
- if (strcmp(word, SVN_CL__ACCEPT_MINE_CONFLICT) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_MINE_CONFLICT) == 0
+ || strcmp(word, "mc") == 0)
return svn_cl__accept_mine_conflict;
- if (strcmp(word, SVN_CL__ACCEPT_THEIRS_CONFLICT) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_THEIRS_CONFLICT) == 0
+ || strcmp(word, "tc") == 0)
return svn_cl__accept_theirs_conflict;
- if (strcmp(word, SVN_CL__ACCEPT_MINE_FULL) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_MINE_FULL) == 0
+ || strcmp(word, "mf") == 0)
return svn_cl__accept_mine_full;
- if (strcmp(word, SVN_CL__ACCEPT_THEIRS_FULL) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_THEIRS_FULL) == 0
+ || strcmp(word, "tf") == 0)
return svn_cl__accept_theirs_full;
- if (strcmp(word, SVN_CL__ACCEPT_EDIT) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_EDIT) == 0
+ || strcmp(word, "e") == 0)
return svn_cl__accept_edit;
- if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0
+ || strcmp(word, "l") == 0)
return svn_cl__accept_launch;
/* word is an invalid action. */
return svn_cl__accept_invalid;
@@ -493,6 +503,7 @@ svn_cl__conflict_handler(svn_wc_conflict
if (strcmp(answer, "s") == 0)
{
+ /* These are used in svn_cl__accept_from_word(). */
SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
_("\n"
" (e) edit - change merged file in an editor\n"
Modified: subversion/branches/py-tests-as-modules/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/copy-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/copy-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/copy-cmd.c Wed Sep 15 19:32:26 2010
@@ -48,7 +48,6 @@ svn_cl__copy(apr_getopt_t *os,
apr_array_header_t *targets, *sources;
const char *src_path, *dst_path;
svn_boolean_t srcs_are_urls, dst_is_url;
- svn_commit_info_t *commit_info = NULL;
svn_error_t *err;
int i;
@@ -90,9 +89,6 @@ svn_cl__copy(apr_getopt_t *os,
if ((! srcs_are_urls) && (! dst_is_url))
{
/* WC->WC */
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
}
else if ((! srcs_are_urls) && (dst_is_url))
{
@@ -114,15 +110,18 @@ svn_cl__copy(apr_getopt_t *os,
display like: "Adding dir1/foo-copy.c", which could be a
bogus path.
*/
+ ctx->notify_func2 = NULL;
}
else if ((srcs_are_urls) && (! dst_is_url))
{
/* URL->WC : Use checkout-style notification. */
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- TRUE, FALSE, FALSE, pool));
+ SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_baton2));
+ }
+ else
+ {
+ /* URL -> URL, meaning that no notification is needed. */
+ ctx->notify_func2 = NULL;
}
- /* else URL -> URL, meaning that no notification is needed. */
if (! dst_is_url)
{
@@ -138,17 +137,16 @@ svn_cl__copy(apr_getopt_t *os,
SVN_ERR(svn_cl__make_log_msg_baton(&(ctx->log_msg_baton3), opt_state,
NULL, ctx->config, pool));
- err = svn_client_copy5(&commit_info, sources, dst_path, TRUE,
+ err = svn_client_copy6(sources, dst_path, TRUE,
opt_state->parents, opt_state->ignore_externals,
- opt_state->revprop_table, ctx, pool);
+ opt_state->revprop_table,
+ svn_cl__print_commit_info, NULL,
+ ctx, pool);
if (ctx->log_msg_func3)
SVN_ERR(svn_cl__cleanup_log_msg(ctx->log_msg_baton3, err, pool));
else if (err)
return svn_error_return(err);
- if (commit_info && ! opt_state->quiet)
- SVN_ERR(svn_cl__print_commit_info(commit_info, pool));
-
return SVN_NO_ERROR;
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/delete-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/delete-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/delete-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/delete-cmd.c Wed Sep 15 19:32:26 2010
@@ -46,8 +46,9 @@ svn_cl__delete(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;
- svn_commit_info_t *commit_info = NULL;
svn_error_t *err;
+ svn_boolean_t is_url;
+ int i;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -56,11 +57,19 @@ svn_cl__delete(apr_getopt_t *os,
if (! targets->nelts)
return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
+ /* Check that all targets are of the same type. */
+ is_url = svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *));
+ for (i = 1; i < targets->nelts; i++)
+ {
+ const char *target = APR_ARRAY_IDX(targets, i, const char *);
+ if (is_url != svn_path_is_url(target))
+ return svn_error_return(
+ svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Cannot mix repository and working copy "
+ "targets")));
+ }
- if (! svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *)))
+ if (! is_url)
{
ctx->log_msg_func3 = NULL;
if (opt_state->message || opt_state->filedata || opt_state->revprop_table)
@@ -79,9 +88,9 @@ svn_cl__delete(apr_getopt_t *os,
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
- err = svn_client_delete3(&commit_info, targets, opt_state->force,
- opt_state->keep_local, opt_state->revprop_table,
- ctx, pool);
+ err = svn_client_delete4(targets, opt_state->force, opt_state->keep_local,
+ opt_state->revprop_table, svn_cl__print_commit_info,
+ NULL, ctx, pool);
if (err)
err = svn_cl__may_need_force(err);
@@ -90,8 +99,5 @@ svn_cl__delete(apr_getopt_t *os,
else if (err)
return svn_error_return(err);
- if (commit_info && ! opt_state->quiet)
- SVN_ERR(svn_cl__print_commit_info(commit_info, pool));
-
return SVN_NO_ERROR;
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/diff-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/diff-cmd.c Wed Sep 15 19:32:26 2010
@@ -284,9 +284,9 @@ svn_cl__diff(apr_getopt_t *os,
}
if (url_present && working_copy_present)
- return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("Target lists to diff may not contain "
- "both working copy paths and URLs"));
+ return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Cannot mix repository and working copy "
+ "targets"));
if (opt_state->start_revision.kind == svn_opt_revision_unspecified
&& working_copy_present)
@@ -349,6 +349,7 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->no_diff_deleted,
opt_state->show_copies_as_adds,
opt_state->force,
+ opt_state->use_git_diff_format,
svn_cmdline_output_encoding(pool),
outfile,
errfile,
@@ -393,6 +394,7 @@ svn_cl__diff(apr_getopt_t *os,
opt_state->no_diff_deleted,
opt_state->show_copies_as_adds,
opt_state->force,
+ opt_state->use_git_diff_format,
svn_cmdline_output_encoding(pool),
outfile,
errfile,
Modified: subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c Wed Sep 15 19:32:26 2010
@@ -34,6 +34,7 @@
#include "cl.h"
#include "svn_private_config.h"
+#include "private/svn_opt_private.h"
/*** Code. ***/
@@ -81,11 +82,18 @@ svn_cl__export(apr_getopt_t *os,
/* If given the cwd, pretend we weren't given anything. */
if (strcmp("", to) == 0)
to = svn_path_uri_decode(svn_uri_basename(truefrom, pool), pool);
+ else
+ /* svn_cl__eat_peg_revisions() but only on one target */
+ SVN_ERR(svn_opt__split_arg_at_peg_revision(&to, NULL, to, pool));
}
+ if (svn_path_is_url(to))
+ return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+ NULL,
+ _("'%s' is not a local path"),
+ to));
if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, TRUE, FALSE, pool));
+ SVN_ERR(svn_cl__notifier_mark_export(ctx->notify_baton2));
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_infinity;
Modified: subversion/branches/py-tests-as-modules/subversion/svn/import-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/import-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/import-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/import-cmd.c Wed Sep 15 19:32:26 2010
@@ -48,7 +48,6 @@ svn_cl__import(apr_getopt_t *os,
apr_array_header_t *targets;
const char *path;
const char *url;
- svn_commit_info_t *commit_info = NULL;
/* Import takes two arguments, for example
*
@@ -101,15 +100,16 @@ svn_cl__import(apr_getopt_t *os,
url = APR_ARRAY_IDX(targets, 1, const char *);
}
+ if (svn_path_is_url(path))
+ return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+ NULL,
+ _("'%s' is not a local path"),
+ path));
if (! svn_path_is_url(url))
return svn_error_createf
(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("Invalid URL '%s'"), url);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_infinity;
@@ -118,18 +118,16 @@ svn_cl__import(apr_getopt_t *os,
SVN_ERR(svn_cl__cleanup_log_msg
(ctx->log_msg_baton3,
- svn_client_import3(&commit_info,
- path,
+ svn_client_import4(path,
url,
opt_state->depth,
opt_state->no_ignore,
opt_state->force,
opt_state->revprop_table,
+ svn_cl__print_commit_info,
+ NULL,
ctx,
pool), pool));
- if (commit_info && ! opt_state->quiet)
- SVN_ERR(svn_cl__print_commit_info(commit_info, pool));
-
return SVN_NO_ERROR;
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c Wed Sep 15 19:32:26 2010
@@ -87,12 +87,16 @@ print_info_xml(void *baton,
{
svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
const char *rev_str;
+ const char *path_prefix = baton;
if (SVN_IS_VALID_REVNUM(info->rev))
rev_str = apr_psprintf(pool, "%ld", info->rev);
else
rev_str = apr_pstrdup(pool, _("Resource is not under version control."));
+ if (path_prefix)
+ target = svn_dirent_skip_ancestor(path_prefix, target);
+
/* "<entry ...>" */
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
"path", svn_dirent_local_style(target, pool),
@@ -238,6 +242,11 @@ print_info(void *baton,
const svn_info_t *info,
apr_pool_t *pool)
{
+ const char *path_prefix = baton;
+
+ if (path_prefix)
+ target = svn_dirent_skip_ancestor(path_prefix, target);
+
SVN_ERR(svn_cmdline_printf(pool, _("Path: %s\n"),
svn_dirent_local_style(target, pool)));
@@ -484,6 +493,7 @@ svn_cl__info(apr_getopt_t *os,
svn_boolean_t saw_a_problem = FALSE;
svn_opt_revision_t peg_revision;
svn_info_receiver_t receiver;
+ const char *path_prefix;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -515,6 +525,8 @@ svn_cl__info(apr_getopt_t *os,
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_empty;
+ SVN_ERR(svn_dirent_get_absolute(&path_prefix, "", pool));
+
for (i = 0; i < targets->nelts; i++)
{
const char *truepath;
@@ -527,13 +539,17 @@ svn_cl__info(apr_getopt_t *os,
SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target, subpool));
/* If no peg-rev was attached to a URL target, then assume HEAD. */
- if ((svn_path_is_url(target))
- && (peg_revision.kind == svn_opt_revision_unspecified))
- peg_revision.kind = svn_opt_revision_head;
+ if (svn_path_is_url(target))
+ {
+ if (peg_revision.kind == svn_opt_revision_unspecified)
+ peg_revision.kind = svn_opt_revision_head;
+ }
+ else
+ SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool));
- err = svn_client_info2(truepath,
+ err = svn_client_info3(truepath,
&peg_revision, &(opt_state->start_revision),
- receiver, NULL, opt_state->depth,
+ receiver, (void *) path_prefix, opt_state->depth,
opt_state->changelists, ctx, subpool);
if (err)
Modified: subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c Wed Sep 15 19:32:26 2010
@@ -101,9 +101,6 @@ svn_cl__lock(apr_getopt_t *os,
/* Get comment. */
SVN_ERR(get_comment(&comment, ctx, opt_state, pool));
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, FALSE,
- FALSE, FALSE, pool));
-
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
return svn_client_lock(targets, comment, opt_state->force, ctx, pool);
Modified: subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c Wed Sep 15 19:32:26 2010
@@ -27,6 +27,7 @@
#include "svn_client.h"
#include "svn_compat.h"
+#include "svn_dirent_uri.h"
#include "svn_string.h"
#include "svn_path.h"
#include "svn_error.h"
@@ -305,6 +306,7 @@ log_entry_receiver(void *baton,
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,
@@ -337,6 +339,7 @@ log_entry_receiver(void *baton,
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,
@@ -349,6 +352,7 @@ log_entry_receiver(void *baton,
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 ||
@@ -360,8 +364,6 @@ log_entry_receiver(void *baton,
}
return svn_error_return(err);
}
-
- parent = svn_uri_dirname(parent, pool);
}
svn_pool_destroy(iterpool);
}
@@ -635,7 +637,7 @@ svn_cl__log(apr_getopt_t *os,
}
}
- /* Strip peg revision if targets contains an URI. */
+ /* Strip peg revision. */
SVN_ERR(svn_opt_parse_path(&peg_revision, &true_path, target, pool));
APR_ARRAY_IDX(targets, 0, const char *) = true_path;
@@ -645,10 +647,13 @@ svn_cl__log(apr_getopt_t *os,
{
target = APR_ARRAY_IDX(targets, i, const char *);
- if (svn_path_is_url(target))
- return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("Only relative paths can be specified "
- "after a URL"));
+ if (svn_path_is_url(target) || target[0] == '/')
+ return svn_error_return(svn_error_createf(
+ SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Only relative paths can be specified"
+ " after a URL for 'svn log', "
+ "but '%s' is not a relative path"),
+ target));
}
}
@@ -661,10 +666,6 @@ svn_cl__log(apr_getopt_t *os,
lb.merge_stack = apr_array_make(pool, 0, sizeof(svn_revnum_t));
lb.pool = pool;
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
if (opt_state->xml)
{
/* If output is not incremental, output the XML header and wrap
Modified: subversion/branches/py-tests-as-modules/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/main.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/main.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/main.c Wed Sep 15 19:32:26 2010
@@ -121,6 +121,8 @@ typedef enum {
opt_ignore_whitespace,
opt_show_diff,
opt_internal_diff,
+ opt_use_git_diff_format,
+ opt_old_patch_target_names,
} svn_cl__longopt_t;
/* Option codes and descriptions for the command line client.
@@ -282,7 +284,9 @@ const apr_getopt_option_t svn_cl__option
" "
"ARG may be one of 'LF', 'CR', 'CRLF'")},
{"limit", 'l', 1, N_("maximum number of log entries")},
- {"no-unlock", opt_no_unlock, 0, N_("don't unlock the targets")},
+ {"no-unlock", opt_no_unlock, 0, N_("don't unlock the targets\n"
+ " "
+ "[aliases: --nul, --keep-lock]")},
{"summarize", opt_summarize, 0, N_("show a summary of the results")},
{"remove", opt_remove, 0, N_("remove changelist association")},
{"changelist", opt_changelist, 1,
@@ -354,6 +358,10 @@ const apr_getopt_option_t svn_cl__option
{"reverse-diff", opt_reverse_diff, 0,
N_("apply the unidiff in reverse\n"
" "
+ "This option also reverses patch target names; the\n"
+ " "
+ "--old-patch-target-names option will prevent this.\n"
+ " "
"[alias: --rd]")},
{"ignore-whitespace", opt_ignore_whitespace, 0,
N_("ignore whitespace during pattern matching\n"
@@ -367,6 +375,22 @@ const apr_getopt_option_t svn_cl__option
N_("override diff-cmd specified in config file\n"
" "
"[alias: --idiff]")},
+ {"git", opt_use_git_diff_format, 0,
+ N_("use git's extended diff format\n")},
+
+ {"old-patch-target-names", opt_old_patch_target_names, 0,
+ N_("use target names from the old side of a patch.\n"
+ " "
+ "If a diff header contains\n"
+ " "
+ " --- foo.c\n"
+ " "
+ " +++ foo.c.new\n"
+ " "
+ "this option will cause the name \"foo.c\" to be used\n"
+ " "
+ "[alias: --optn]")},
+
/* Long-opt Aliases
*
* These have NULL desriptions, but an option code that matches some
@@ -395,6 +419,9 @@ const apr_getopt_option_t svn_cl__option
{"iw", opt_ignore_whitespace, 0, NULL},
{"diff", opt_show_diff, 0, NULL},
{"idiff", opt_internal_diff, 0, NULL},
+ {"nul", opt_no_unlock, 0, NULL},
+ {"keep-lock", opt_no_unlock, 0, NULL},
+ {"optn", opt_old_patch_target_names, 0, NULL},
{0, 0, 0, 0},
};
@@ -459,8 +486,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
{ "changelist", svn_cl__changelist, {"cl"}, N_
("Associate (or dissociate) changelist CLNAME with the named files.\n"
- "usage: 1. changelist CLNAME TARGET...\n"
- " 2. changelist --remove TARGET...\n"),
+ "usage: 1. changelist CLNAME PATH...\n"
+ " 2. changelist --remove PATH...\n"),
{ 'q', 'R', opt_depth, opt_remove, opt_targets, opt_changelist} },
{ "checkout", svn_cl__checkout, {"co"}, N_
@@ -493,7 +520,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
{ "cleanup", svn_cl__cleanup, {0}, N_
("Recursively clean up the working copy, removing locks, resuming\n"
"unfinished operations, etc.\n"
- "usage: cleanup [PATH...]\n"),
+ "usage: cleanup [WCPATH...]\n"),
{opt_merge_cmd} },
{ "commit", svn_cl__commit, {"ci"},
@@ -539,7 +566,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" committed, are immediately removed from the working copy\n"
" unless the --keep-local option is given.\n"
" PATHs that are, or contain, unversioned or modified items will\n"
- " not be removed unless the --force option is given.\n"
+ " not be removed unless the --force or --keep-local option is given.\n"
"\n"
" 2. Each item specified by a URL is deleted from the repository\n"
" via an immediate commit.\n"),
@@ -571,7 +598,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
" Use just 'svn diff' to display local modifications in a working copy.\n"),
{'r', 'c', opt_old_cmd, opt_new_cmd, 'N', opt_depth, opt_diff_cmd,
opt_internal_diff, 'x', opt_no_diff_deleted, opt_show_copies_as_adds,
- opt_notice_ancestry, opt_summarize, opt_changelist, opt_force, opt_xml} },
+ opt_notice_ancestry, opt_summarize, opt_changelist, opt_force, opt_xml,
+ opt_use_git_diff_format} },
{ "export", svn_cl__export, {0}, N_
("Create an unversioned copy of a tree.\n"
"usage: 1. export [-r REV] URL[@PEGREV] [PATH]\n"
@@ -657,15 +685,18 @@ const svn_opt_subcommand_desc2_t svn_cl_
{opt_force_log, N_("force validity of lock comment source")}} },
{ "log", svn_cl__log, {0}, N_
- ("Show the log messages for a set of revision(s) and/or file(s).\n"
- "usage: 1. log [PATH]\n"
+ ("Show the log messages for a set of revision(s) and/or path(s).\n"
+ "usage: 1. log [PATH][@REV]\n"
" 2. log URL[@REV] [PATH...]\n"
"\n"
- " 1. Print the log messages for a local PATH (default: '.').\n"
- " The default revision range is BASE:1.\n"
+ " 1. Print the log messages for the URL corresponding to PATH\n"
+ " (default: '.'). If specified, REV is the revision in which the\n"
+ " URL is first looked up, and the default revision range is REV:1.\n"
+ " If REV is not specified, the default revision range is BASE:1,\n"
+ " since the URL might not exist in the HEAD revision.\n"
"\n"
" 2. Print the log messages for the PATHs (default: '.') under URL.\n"
- " If specified, REV determines in which revision the URL is first\n"
+ " If specified, REV is the revision in which the URL is first\n"
" looked up, and the default revision range is REV:1; otherwise,\n"
" the URL is looked up in HEAD, and the default revision range is\n"
" HEAD:1.\n"
@@ -686,8 +717,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
" Examples:\n"
" svn log\n"
" svn log foo.c\n"
+ " svn log bar.c@42\n"
" svn log http://www.example.com/repo/project/foo.c\n"
- " svn log http://www.example.com/repo/project foo.c bar.c\n"),
+ " svn log http://www.example.com/repo/project foo.c bar.c\n"
+ " svn log http://www.example.com/repo/project@50 foo.c bar.c\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_show_diff, opt_diff_cmd, opt_internal_diff, 'x'},
@@ -838,7 +871,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" do not agree with.\n"
),
{'q', opt_dry_run, opt_strip_count, opt_reverse_diff,
- opt_ignore_whitespace} },
+ opt_ignore_whitespace, opt_old_patch_target_names} },
{ "propdel", svn_cl__propdel, {"pdel", "pd"}, N_
("Remove a property from files, dirs, or revisions.\n"
@@ -924,20 +957,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
" A mimetype beginning with 'text/' (or an absent mimetype) is\n"
" treated as text. Anything else is treated as binary.\n"
" svn:externals - A newline separated list of module specifiers,\n"
- " each of which consists of a relative directory path, optional\n"
- " revision flags and an URL. The ordering of the three elements\n"
- " implements different behavior. Subversion 1.4 and earlier only\n"
- " support the following formats and the URLs cannot have peg\n"
- " revisions:\n"
- " foo http://example.com/repos/zig\n"
- " foo/bar -r 1234 http://example.com/repos/zag\n"
- " Subversion 1.5 and greater support the above formats and the\n"
- " following formats where the URLs may have peg revisions:\n"
- " http://example.com/repos/zig@42 foo\n"
- " -r 1234 http://example.com/repos/zig foo/bar\n"
- " Relative URLs are supported in Subversion 1.5 and greater for\n"
- " all above formats and are indicated by starting the URL with one\n"
- " of the following strings\n"
+ " each of which consists of a URL and a relative directory path,\n"
+ " similar to the syntax of the 'svn checkout' command:\n"
+ " http://example.com/repos/zag foo/bar\n"
+ " An optional peg revision may be appended to the URL to pin the\n"
+ " external to a known revision:\n"
+ " http://example.com/repos/zig@42 foo\n"
+ " Relative URLs are indicated by starting the URL with one\n"
+ " of the following strings:\n"
" ../ to the parent directory of the extracted external\n"
" ^/ to the repository root\n"
" // to the scheme\n"
@@ -946,6 +973,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
" 'relative_url relative_path' with peg revision support.\n"
" Lines in externals definitions starting with the '#' character\n"
" are considered comments and are ignored.\n"
+ " Subversion 1.4 and earlier only support the following formats\n"
+ " where peg revisions can only be specified using a -r modifier\n"
+ " and where URLs cannot be relative:\n"
+ " foo http://example.com/repos/zig\n"
+ " foo/bar -r 1234 http://example.com/repos/zag\n"
+ " Use of these formats is discouraged. They should only be used if\n"
+ " interoperability with 1.4 clients is desired.\n"
" svn:needs-lock - If present, indicates that the file should be locked\n"
" before it is modified. Makes the working copy file read-only\n"
" when it is not locked. Use 'svn propdel svn:needs-lock PATH...'\n"
@@ -1046,11 +1080,17 @@ const svn_opt_subcommand_desc2_t svn_cl_
" ' ' the working copy is up to date\n"
"\n"
" Remaining fields are variable width and delimited by spaces:\n"
- " The working revision (with -u or -v)\n"
+ " The working revision (with -u or -v; '-' if the item is copied)\n"
" The last committed revision and last committed author (with -v)\n"
" The working copy path is always the final field, so it can\n"
" include spaces.\n"
"\n"
+ " The presence of a question mark ('?') where a working revision, last\n"
+ " committed revision, or last committed author was expected indicates\n"
+ " that the information is unknown or irrelevant given the state of the\n"
+ " item (for example, when the item is the result of a copy operation).\n"
+ " The question mark serves as a visual placeholder to facilitate parsing.\n"
+ "\n"
" Example output:\n"
" svn status wc\n"
" M wc/bar.c\n"
@@ -1059,13 +1099,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
" svn status -u wc\n"
" M 965 wc/bar.c\n"
" * 965 wc/foo.c\n"
- " A + 965 wc/qax.c\n"
+ " A + - wc/qax.c\n"
" Status against revision: 981\n"
"\n"
" svn status --show-updates --verbose wc\n"
" M 965 938 kfogel wc/bar.c\n"
" * 965 922 sussman wc/foo.c\n"
- " A + 965 687 joe wc/qax.c\n"
+ " A + - 687 joe wc/qax.c\n"
" 965 687 joe wc/zig.c\n"
" Status against revision: 981\n"
"\n"
@@ -1173,7 +1213,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 TARGET...\n"),
+ "usage: upgrade WCPATH...\n"),
{0} },
{ NULL, NULL, {0}, NULL, {0} }
@@ -1764,6 +1804,12 @@ main(int argc, const char *argv[])
case opt_internal_diff:
opt_state.internal_diff = TRUE;
break;
+ case opt_use_git_diff_format:
+ opt_state.use_git_diff_format = TRUE;
+ break;
+ case opt_old_patch_target_names:
+ opt_state.old_patch_target_names = TRUE;
+ break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */
@@ -2200,6 +2246,16 @@ 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))
+ {
+ err = svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
+ FALSE, pool);
+ if (err)
+ return svn_cmdline_handle_exit_error(err, pool, "svn: ");
+ }
+
/* Set up our cancellation support. */
ctx->cancel_func = svn_cl__check_cancel;
apr_signal(SIGINT, signal_handler);
Modified: subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c Wed Sep 15 19:32:26 2010
@@ -271,15 +271,30 @@ svn_cl__merge(apr_getopt_t *os,
}
}
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
if (opt_state->extensions)
options = svn_cstring_split(opt_state->extensions, " \t\n\r", TRUE, pool);
else
options = NULL;
+ /* More input validation. */
+ if (opt_state->reintegrate)
+ {
+ if (opt_state->depth != svn_depth_unknown)
+ return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+ _("--depth cannot be used with "
+ "--reintegrate"));
+
+ if (opt_state->force)
+ return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+ _("--force cannot be used with "
+ "--reintegrate"));
+
+ if (two_sources_specified)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("--reintegrate can only be used with "
+ "a single merge source"));
+ }
+
if (! two_sources_specified) /* TODO: Switch order of if */
{
/* If we don't have a source, use the target as the source. */
@@ -301,23 +316,11 @@ svn_cl__merge(apr_getopt_t *os,
}
if (opt_state->reintegrate)
- {
- if (opt_state->depth != svn_depth_unknown)
- return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
- _("--depth cannot be used with "
- "--reintegrate"));
-
- if (opt_state->force)
- return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
- _("--force cannot be used with "
- "--reintegrate"));
-
- err = svn_client_merge_reintegrate(sourcepath1,
- &peg_revision1,
- targetpath,
- opt_state->dry_run,
- options, ctx, pool);
- }
+ err = svn_client_merge_reintegrate(sourcepath1,
+ &peg_revision1,
+ targetpath,
+ opt_state->dry_run,
+ options, ctx, pool);
else
err = svn_client_merge_peg3(sourcepath1,
ranges_to_merge,
@@ -334,6 +337,11 @@ svn_cl__merge(apr_getopt_t *os,
}
else
{
+ if (svn_path_is_url(sourcepath1) != svn_path_is_url(sourcepath2))
+ return svn_error_return(svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR,
+ NULL,
+ _("Merge sources must both be "
+ "either paths or URLs")));
err = svn_client_merge3(sourcepath1,
&first_range_start,
sourcepath2,
Modified: subversion/branches/py-tests-as-modules/subversion/svn/mkdir-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/mkdir-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/mkdir-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/mkdir-cmd.c Wed Sep 15 19:32:26 2010
@@ -47,7 +47,6 @@ svn_cl__mkdir(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;
- svn_commit_info_t *commit_info = NULL;
svn_error_t *err;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
@@ -57,10 +56,6 @@ svn_cl__mkdir(apr_getopt_t *os,
if (! targets->nelts)
return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
if (! svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *)))
{
ctx->log_msg_func3 = NULL;
@@ -80,8 +75,9 @@ svn_cl__mkdir(apr_getopt_t *os,
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
- err = svn_client_mkdir3(&commit_info, targets, opt_state->parents,
- opt_state->revprop_table, ctx, pool);
+ err = svn_client_mkdir4(targets, opt_state->parents,
+ opt_state->revprop_table, svn_cl__print_commit_info,
+ NULL, ctx, pool);
if (ctx->log_msg_func3)
err = svn_cl__cleanup_log_msg(ctx->log_msg_baton3, err, pool);
@@ -101,8 +97,5 @@ svn_cl__mkdir(apr_getopt_t *os,
return svn_error_return(err);
}
- if (commit_info && ! opt_state->quiet)
- SVN_ERR(svn_cl__print_commit_info(commit_info, pool));
-
return SVN_NO_ERROR;
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c Wed Sep 15 19:32:26 2010
@@ -48,7 +48,6 @@ svn_cl__move(apr_getopt_t *os,
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_array_header_t *targets;
const char *dst_path;
- svn_commit_info_t *commit_info = NULL;
svn_error_t *err;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
@@ -66,10 +65,6 @@ svn_cl__move(apr_getopt_t *os,
_("Cannot specify revisions (except HEAD) with move operations"));
}
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
dst_path = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
apr_array_pop(targets);
@@ -89,9 +84,9 @@ svn_cl__move(apr_getopt_t *os,
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
- err = svn_client_move5(&commit_info, targets, dst_path, opt_state->force,
+ err = svn_client_move6(targets, dst_path, opt_state->force,
TRUE, opt_state->parents, opt_state->revprop_table,
- ctx, pool);
+ svn_cl__print_commit_info, NULL, ctx, pool);
if (err)
err = svn_cl__may_need_force(err);
@@ -101,8 +96,5 @@ svn_cl__move(apr_getopt_t *os,
else if (err)
return svn_error_return(err);
- if (commit_info && ! opt_state->quiet)
- SVN_ERR(svn_cl__print_commit_info(commit_info, pool));
-
return SVN_NO_ERROR;
}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/notify.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/notify.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/notify.c Wed Sep 15 19:32:26 2010
@@ -274,7 +274,15 @@ notify(void *baton, const svn_wc_notify_
statchar_buf[0] = 'U';
}
- if (statchar_buf[0] != ' ')
+ if (n->prop_state == svn_wc_notify_state_conflicted)
+ {
+ nb->prop_conflicts++;
+ statchar_buf[1] = 'C';
+ }
+ else if (n->prop_state == svn_wc_notify_state_changed)
+ statchar_buf[1] = 'U';
+
+ if (statchar_buf[0] != ' ' || statchar_buf[1] != ' ')
{
if ((err = svn_cmdline_printf(pool, "%s %s\n",
statchar_buf, path_local)))
@@ -302,49 +310,106 @@ notify(void *baton, const svn_wc_notify_
minus = "-";
}
- /* ### APR_INT64_T_FMT isn't translator-friendly */
+ /* ### We're creating the localized strings without
+ * ### APR_INT64_T_FMT since it isn't translator-friendly */
if (n->hunk_fuzz)
{
- s = _("> applied hunk @@ -%lu,%lu +%lu,%lu @@ "
- "with offset %s");
- if ((err = svn_cmdline_printf(pool,
- apr_pstrcat(pool, s,
- "%"APR_UINT64_T_FMT
- " and fuzz %d\n",
- NULL),
- n->hunk_original_start,
- n->hunk_original_length,
- n->hunk_modified_start,
- n->hunk_modified_length,
- minus, off, n->hunk_fuzz)))
+
+ if (n->prop_name)
+ {
+ s = _("> applied hunk ## -%lu,%lu +%lu,%lu ## "
+ "with offset %s");
+
+ err = svn_cmdline_printf(pool,
+ apr_pstrcat(pool, s,
+ "%"APR_UINT64_T_FMT
+ " and fuzz %d (%s)\n",
+ NULL),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length,
+ minus, off, n->hunk_fuzz,
+ n->prop_name);
+ }
+ else
+ {
+ s = _("> applied hunk @@ -%lu,%lu +%lu,%lu @@ "
+ "with offset %s");
+
+ err = svn_cmdline_printf(pool,
+ apr_pstrcat(pool, s,
+ "%"APR_UINT64_T_FMT
+ " and fuzz %d\n",
+ NULL),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length,
+ minus, off, n->hunk_fuzz);
+ }
+
+ if (err)
goto print_error;
}
else
{
- s = _("> applied hunk @@ -%lu,%lu +%lu,%lu @@ "
- "with offset %s");
- if ((err = svn_cmdline_printf(pool,
+
+ if (n->prop_name)
+ {
+ s = _("> applied hunk ## -%lu,%lu +%lu,%lu ## "
+ "with offset %s");
+ err = svn_cmdline_printf(pool,
apr_pstrcat(pool, s,
- "%"APR_UINT64_T_FMT"\n",
+ "%"APR_UINT64_T_FMT" (%s)\n",
NULL),
n->hunk_original_start,
n->hunk_original_length,
n->hunk_modified_start,
n->hunk_modified_length,
- minus, off)))
+ minus, off, n->prop_name);
+ }
+ else
+ {
+ s = _("> applied hunk @@ -%lu,%lu +%lu,%lu @@ "
+ "with offset %s");
+ err = svn_cmdline_printf(pool,
+ apr_pstrcat(pool, s,
+ "%"APR_UINT64_T_FMT"\n",
+ NULL),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length,
+ minus, off);
+ }
+
+ if (err)
goto print_error;
}
}
else if (n->hunk_fuzz)
{
- if ((err = svn_cmdline_printf(pool,
+ if (n->prop_name)
+ err = svn_cmdline_printf(pool,
+ _("> applied hunk ## -%lu,%lu +%lu,%lu ## "
+ "with fuzz %d (%s)\n"),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length,
+ n->hunk_fuzz,
+ n->prop_name);
+ else
+ err = svn_cmdline_printf(pool,
_("> applied hunk @@ -%lu,%lu +%lu,%lu @@ "
"with fuzz %d\n"),
n->hunk_original_start,
n->hunk_original_length,
n->hunk_modified_start,
n->hunk_modified_length,
- n->hunk_fuzz)))
+ n->hunk_fuzz);
+ if (err)
goto print_error;
}
@@ -352,13 +417,50 @@ notify(void *baton, const svn_wc_notify_
case svn_wc_notify_patch_rejected_hunk:
nb->received_some_change = TRUE;
- if ((err = svn_cmdline_printf(pool,
- _("> rejected hunk "
- "@@ -%lu,%lu +%lu,%lu @@\n"),
- n->hunk_original_start,
- n->hunk_original_length,
- n->hunk_modified_start,
- n->hunk_modified_length)))
+
+ if (n->prop_name)
+ err = svn_cmdline_printf(pool,
+ _("> rejected hunk "
+ "## -%lu,%lu +%lu,%lu ## (%s)\n"),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length,
+ n->prop_name);
+ else
+ err = svn_cmdline_printf(pool,
+ _("> rejected hunk "
+ "@@ -%lu,%lu +%lu,%lu @@\n"),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length);
+ if (err)
+ goto print_error;
+ break;
+
+ case svn_wc_notify_patch_hunk_already_applied:
+ nb->received_some_change = TRUE;
+ if (n->prop_name)
+ err = svn_cmdline_printf(pool,
+ _("> hunk "
+ "## -%lu,%lu +%lu,%lu ## "
+ "already applied (%s)\n"),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length,
+ n->prop_name);
+ else
+ err = svn_cmdline_printf(pool,
+ _("> hunk "
+ "@@ -%lu,%lu +%lu,%lu @@ "
+ "already applied\n"),
+ n->hunk_original_start,
+ n->hunk_original_length,
+ n->hunk_modified_start,
+ n->hunk_modified_length);
+ if (err)
goto print_error;
break;
@@ -779,6 +881,12 @@ notify(void *baton, const svn_wc_notify_
goto print_error;
break;
+ case svn_wc_notify_url_redirect:
+ err = svn_cmdline_printf(pool, _("Redirecting to URL '%s'\n"),
+ n->url);
+ if (err)
+ goto print_error;
+
default:
break;
}
@@ -804,8 +912,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 is_checkout,
- svn_boolean_t is_export,
svn_boolean_t suppress_final_line,
apr_pool_t *pool)
{
@@ -813,8 +919,8 @@ svn_cl__get_notifier(svn_wc_notify_func2
nb->received_some_change = FALSE;
nb->sent_first_txdelta = FALSE;
- nb->is_checkout = is_checkout;
- nb->is_export = is_export;
+ nb->is_checkout = FALSE;
+ nb->is_export = FALSE;
nb->suppress_final_line = suppress_final_line;
nb->in_external = FALSE;
nb->had_print_error = FALSE;
@@ -828,3 +934,21 @@ svn_cl__get_notifier(svn_wc_notify_func2
*notify_baton_p = nb;
return SVN_NO_ERROR;
}
+
+svn_error_t *
+svn_cl__notifier_mark_checkout(void *baton)
+{
+ struct notify_baton *nb = baton;
+
+ nb->is_checkout = TRUE;
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_cl__notifier_mark_export(void *baton)
+{
+ struct notify_baton *nb = baton;
+
+ nb->is_export = TRUE;
+ return SVN_NO_ERROR;
+}
Modified: subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c Wed Sep 15 19:32:26 2010
@@ -72,12 +72,9 @@ svn_cl__patch(apr_getopt_t *os,
APR_ARRAY_IDX(targets, 0, const char *),
pool));
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, pool));
-
SVN_ERR(svn_client_patch(abs_patch_path, abs_target_path,
opt_state->dry_run, opt_state->strip_count,
+ opt_state->old_patch_target_names,
opt_state->reverse_diff,
opt_state->ignore_whitespace,
TRUE, NULL, NULL, ctx, pool, pool));
Modified: subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c Wed Sep 15 19:32:26 2010
@@ -91,8 +91,8 @@ svn_cl__propdel(apr_getopt_t *os,
if (! opt_state->quiet)
{
- SVN_ERR(svn_cl__get_notifier(&nwb.real_func, &nwb.real_baton, FALSE,
- FALSE, FALSE, pool));
+ nwb.real_func = ctx->notify_func2;
+ nwb.real_baton = ctx->notify_baton2;
ctx->notify_func2 = notify_wrapper;
ctx->notify_baton2 = &nwb;
}
@@ -129,19 +129,19 @@ svn_cl__propdel(apr_getopt_t *os,
for (i = 0; i < targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
- svn_commit_info_t *commit_info;
svn_pool_clear(subpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
/* Pass FALSE for 'skip_checks' because it doesn't matter here,
and opt_state->force doesn't apply to this command anyway. */
- SVN_ERR(svn_cl__try(svn_client_propset3
- (&commit_info, pname_utf8,
+ SVN_ERR(svn_cl__try(svn_client_propset4(
+ pname_utf8,
NULL, target,
opt_state->depth,
FALSE, SVN_INVALID_REVNUM,
opt_state->changelists, NULL,
+ svn_cl__print_commit_info, NULL,
ctx, subpool),
NULL, opt_state->quiet,
SVN_ERR_UNVERSIONED_RESOURCE,
Modified: subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c Wed Sep 15 19:32:26 2010
@@ -45,6 +45,26 @@
/*** Code. ***/
+struct commit_info_baton
+{
+ const char *pname_utf8;
+ const char *target_local;
+};
+
+static svn_error_t *
+commit_info_handler(const svn_commit_info_t *commit_info,
+ void *baton,
+ apr_pool_t *pool)
+{
+ struct commit_info_baton *cib = baton;
+
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Set new value for property '%s' on '%s'\n"),
+ cib->pname_utf8, cib->target_local));
+ SVN_ERR(svn_cl__print_commit_info(commit_info, NULL, pool));
+
+ return SVN_NO_ERROR;
+}
/* This implements the `svn_opt_subcommand_t' interface. */
svn_error_t *
@@ -78,6 +98,9 @@ svn_cl__propedit(apr_getopt_t *os,
opt_state->targets,
ctx, pool));
+ /* We do our own notifications */
+ ctx->notify_func2 = NULL;
+
if (opt_state->revprop) /* operate on a revprop */
{
svn_revnum_t rev;
@@ -153,6 +176,7 @@ svn_cl__propedit(apr_getopt_t *os,
else /* operate on a normal, versioned property (not a revprop) */
{
apr_pool_t *subpool = svn_pool_create(pool);
+ struct commit_info_baton cib;
/* The customary implicit dot rule has been prone to user error
* here. For example, Jon Trowbridge <tr...@gnu.og> did
@@ -178,6 +202,8 @@ svn_cl__propedit(apr_getopt_t *os,
SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
+ cib.pname_utf8 = pname_utf8;
+
/* For each target, edit the property PNAME. */
for (i = 0; i < targets->nelts; i++)
{
@@ -255,11 +281,11 @@ svn_cl__propedit(apr_getopt_t *os,
target_local = svn_path_is_url(target) ? target
: svn_dirent_local_style(target, subpool);
+ cib.target_local = target_local;
/* ...and re-set the property's value accordingly. */
if (edited_propval && !svn_string_compare(propval, edited_propval))
{
- svn_commit_info_t *commit_info = NULL;
svn_error_t *err = SVN_NO_ERROR;
svn_cl__check_boolean_prop_val(pname_utf8, edited_propval->data,
@@ -270,10 +296,10 @@ svn_cl__propedit(apr_getopt_t *os,
opt_state, NULL, ctx->config,
subpool));
- err = svn_client_propset3(&commit_info,
- pname_utf8, edited_propval, target,
+ err = svn_client_propset4(pname_utf8, edited_propval, target,
svn_depth_empty, opt_state->force,
base_rev, NULL, opt_state->revprop_table,
+ commit_info_handler, &cib,
ctx, subpool);
if (ctx->log_msg_func3)
SVN_ERR(svn_cl__cleanup_log_msg(ctx->log_msg_baton3,
@@ -284,14 +310,10 @@ svn_cl__propedit(apr_getopt_t *os,
/* Print a message if we successfully committed or if it
was just a wc propset (but not if the user aborted an URL
propedit). */
- if (commit_info || ! svn_path_is_url(target))
- SVN_ERR
- (svn_cmdline_printf
- (subpool, _("Set new value for property '%s' on '%s'\n"),
- pname_utf8, target_local));
-
- if (commit_info && ! opt_state->quiet)
- SVN_ERR(svn_cl__print_commit_info(commit_info, subpool));
+ if (!svn_path_is_url(target))
+ SVN_ERR(svn_cmdline_printf(
+ subpool, _("Set new value for property '%s' on '%s'\n"),
+ pname_utf8, target_local));
}
else
{
Modified: subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c Wed Sep 15 19:32:26 2010
@@ -100,10 +100,6 @@ svn_cl__propset(apr_getopt_t *os,
opt_state->targets,
ctx, scratch_pool));
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, scratch_pool));
-
/* Implicit "." is okay for revision properties; it just helps
us find the right repository. */
if (opt_state->revprop)
@@ -179,15 +175,15 @@ svn_cl__propset(apr_getopt_t *os,
for (i = 0; i < targets->nelts; i++)
{
const char *target = APR_ARRAY_IDX(targets, i, const char *);
- svn_commit_info_t *commit_info;
svn_pool_clear(iterpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
- SVN_ERR(svn_cl__try(svn_client_propset3
- (&commit_info, pname_utf8, propval, target,
+ SVN_ERR(svn_cl__try(svn_client_propset4(
+ pname_utf8, propval, target,
opt_state->depth, opt_state->force,
SVN_INVALID_REVNUM, opt_state->changelists,
- NULL, ctx, iterpool),
+ NULL, svn_cl__print_commit_info, NULL, ctx,
+ iterpool),
NULL, opt_state->quiet,
SVN_ERR_UNVERSIONED_RESOURCE,
SVN_ERR_ENTRY_NOT_FOUND,
Modified: subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c Wed Sep 15 19:32:26 2010
@@ -88,10 +88,6 @@ svn_cl__resolve(apr_getopt_t *os,
if (! targets->nelts)
return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, scratch_pool));
-
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_empty;
Modified: subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c Wed Sep 15 19:32:26 2010
@@ -59,10 +59,6 @@ svn_cl__resolved(apr_getopt_t *os,
if (! targets->nelts)
return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, scratch_pool));
-
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_empty;
Modified: subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c Wed Sep 15 19:32:26 2010
@@ -56,10 +56,6 @@ svn_cl__revert(apr_getopt_t *os,
if (! targets->nelts)
return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, scratch_pool));
-
/* Revert is especially conservative, by default it is as
nonrecursive as possible. */
if (opt_state->depth == svn_depth_unknown)
@@ -71,7 +67,7 @@ svn_cl__revert(apr_getopt_t *os,
opt_state->changelists, ctx, scratch_pool);
if (err
- && (err->apr_err == SVN_ERR_WC_NOT_LOCKED)
+ && (err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH)
&& (! SVN_DEPTH_IS_RECURSIVE(opt_state->depth)))
{
err = svn_error_quick_wrap
Modified: subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c Wed Sep 15 19:32:26 2010
@@ -171,7 +171,7 @@ print_status(void *baton,
apr_pool_t *pool)
{
struct status_baton *sb = baton;
- svn_client_status_t *tweaked_status;
+
svn_revnum_t revision;
svn_revnum_t changed_rev;
apr_time_t changed_date;
@@ -179,7 +179,6 @@ print_status(void *baton,
const char *local_abspath;
local_abspath = status->local_abspath;
- tweaked_status = svn_client_status_dup(status, sb->cl_pool);
/* ### The revision information with associates are based on what
* ### _read_info() returns. The svn_wc_status_func4_t callback is
@@ -187,8 +186,14 @@ print_status(void *baton,
* ### WORKING nodes on its own. Until we've agreed on how the CLI should
* ### handle the revision information, we use this appproach to stay compat
* ### with our testsuite. */
- if (status->versioned)
+ if (status->versioned
+ && !SVN_IS_VALID_REVNUM(status->revision)
+ && !status->copied)
{
+ svn_client_status_t *tweaked_status
+ = svn_client_status_dup(status, sb->cl_pool);
+
+ /* Retrieve some data from the original version of the replaced node */
SVN_ERR(svn_wc__node_get_working_rev_info(&revision, &changed_rev,
&changed_date,
&changed_author,
@@ -199,6 +204,8 @@ print_status(void *baton,
tweaked_status->changed_rev = changed_rev;
tweaked_status->changed_date = changed_date;
tweaked_status->changed_author = changed_author;
+
+ status = tweaked_status;
}
/* If the path is part of a changelist, then we don't print
@@ -211,7 +218,7 @@ 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->status = svn_client_status_dup(tweaked_status, sb->cl_pool);
+ scache->status = svn_client_status_dup(status, sb->cl_pool);
path_array =
apr_hash_get(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING);
@@ -227,7 +234,7 @@ print_status(void *baton,
return SVN_NO_ERROR;
}
- return print_status_normal_or_xml(baton, path, tweaked_status, pool);
+ return print_status_normal_or_xml(baton, path, status, pool);
}
/* This implements the `svn_opt_subcommand_t' interface. */
@@ -255,11 +262,6 @@ svn_cl__status(apr_getopt_t *os,
/* We want our -u statuses to be against HEAD. */
rev.kind = svn_opt_revision_head;
- /* The notification callback, leave the notifier as NULL in XML mode */
- if (! opt_state->xml)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, scratch_pool));
-
sb.had_print_error = FALSE;
if (opt_state->xml)
@@ -314,6 +316,7 @@ svn_cl__status(apr_getopt_t *os,
opt_state->update,
opt_state->no_ignore,
opt_state->ignore_externals,
+ FALSE /* depth_as_sticky */,
opt_state->changelists,
print_status, &sb,
iterpool),
Modified: subversion/branches/py-tests-as-modules/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/status.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/status.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/status.c Wed Sep 15 19:32:26 2010
@@ -50,7 +50,6 @@ generate_status_code(enum svn_wc_status_
case svn_wc_status_deleted: return 'D';
case svn_wc_status_replaced: return 'R';
case svn_wc_status_modified: return 'M';
- case svn_wc_status_merged: return 'G';
case svn_wc_status_conflicted: return 'C';
case svn_wc_status_obstructed: return '~';
case svn_wc_status_ignored: return 'I';
@@ -65,18 +64,20 @@ generate_status_code(enum svn_wc_status_
static enum svn_wc_status_kind
combined_status(const svn_client_status_t *status)
{
- enum svn_wc_status_kind combined_status = status->node_status;
+ enum svn_wc_status_kind new_status = status->node_status;
switch (status->node_status)
{
case svn_wc_status_modified:
case svn_wc_status_conflicted:
/* This value might be the property status */
- combined_status = status->text_status;
+ new_status = status->text_status;
+ break;
+ default:
break;
}
- return combined_status;
+ return new_status;
}
/* Return the single character representation of the switched column
@@ -106,7 +107,6 @@ generate_status_desc(enum svn_wc_status_
case svn_wc_status_deleted: return "deleted";
case svn_wc_status_replaced: return "replaced";
case svn_wc_status_modified: return "modified";
- case svn_wc_status_merged: return "merged";
case svn_wc_status_conflicted: return "conflicted";
case svn_wc_status_obstructed: return "obstructed";
case svn_wc_status_ignored: return "ignored";
@@ -189,18 +189,16 @@ print_status(const char *path,
### we'll just maintain the old behavior. */
if (! status->versioned)
working_rev = "";
+ else if (status->copied)
+ working_rev = "-";
else if (! SVN_IS_VALID_REVNUM(status->revision))
{
- if (status->copied)
- working_rev = "-";
- else if (node_status == svn_wc_status_added
- || node_status == svn_wc_status_replaced)
+ if (node_status == svn_wc_status_added ||
+ node_status == svn_wc_status_replaced)
working_rev = "0";
else
working_rev = " ? ";
}
- else if (status->copied)
- working_rev = "-";
else
working_rev = apr_psprintf(pool, "%ld", status->revision);
Modified: subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c Wed Sep 15 19:32:26 2010
@@ -145,10 +145,6 @@ svn_cl__switch(apr_getopt_t *os,
/* Canonicalize the URL. */
switch_url = svn_uri_canonicalize(switch_url, scratch_pool);
- if (! opt_state->quiet)
- SVN_ERR(svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
- FALSE, FALSE, FALSE, scratch_pool));
-
/* Deal with depthstuffs. */
if (opt_state->set_depth != svn_depth_unknown)
{