You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/15 08:07:11 UTC
svn commit: r1532200 - in /subversion/trunk/tools/client-side/svn-bench:
cl.h null-log-cmd.c svn-bench.c
Author: stefan2
Date: Tue Oct 15 06:07:10 2013
New Revision: 1532200
URL: http://svn.apache.org/r1532200
Log:
Add support for the "--auto-moves" option to svn-bench null-log
(code taken from SVN CL client).
* develop/trunk/tools/client-side/svn-bench/cl.h
(svn_cl__opt_state_t): add auto_moves flag
* develop/trunk/tools/client-side/svn-bench/null-log-cmd.c
(svn_cl__null_log): process auto-moves option and use latest API
* develop/trunk/tools/client-side/svn-bench/svn-bench.c
(svn_cl__longopt_t): declare new option
(svn_cl__options): describe it
(svn_cl__cmd_table): add it to null-log command
(sub_main): process the new option
Modified:
subversion/trunk/tools/client-side/svn-bench/cl.h
subversion/trunk/tools/client-side/svn-bench/null-log-cmd.c
subversion/trunk/tools/client-side/svn-bench/svn-bench.c
Modified: subversion/trunk/tools/client-side/svn-bench/cl.h
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svn-bench/cl.h?rev=1532200&r1=1532199&r2=1532200&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/svn-bench/cl.h (original)
+++ subversion/trunk/tools/client-side/svn-bench/cl.h Tue Oct 15 06:07:10 2013
@@ -90,6 +90,7 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t no_revprops; /* retrieve no revprops */
apr_hash_t *revprop_table; /* table of revision properties to get/set */
svn_boolean_t use_merge_history; /* use/display extra merge information */
+ svn_boolean_t auto_moves; /* interpret unique DEL/ADD pairs as moves */
svn_boolean_t trust_server_cert; /* trust server SSL certs that would
otherwise be rejected as "untrusted" */
} svn_cl__opt_state_t;
Modified: subversion/trunk/tools/client-side/svn-bench/null-log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svn-bench/null-log-cmd.c?rev=1532200&r1=1532199&r2=1532200&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/svn-bench/null-log-cmd.c (original)
+++ subversion/trunk/tools/client-side/svn-bench/null-log-cmd.c Tue Oct 15 06:07:10 2013
@@ -140,6 +140,9 @@ svn_cl__null_log(apr_getopt_t *os,
apr_array_header_t *revprops;
svn_opt_revision_t target_peg_revision;
const char *target_path_or_url;
+ svn_move_behavior_t move_behavior = opt_state->auto_moves
+ ? svn_move_behavior_auto_moves
+ : svn_move_behavior_explicit_moves;
SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
opt_state->targets,
@@ -202,13 +205,14 @@ svn_cl__null_log(apr_getopt_t *os,
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_DATE;
if (!opt_state->quiet)
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
- SVN_ERR(svn_client_log5(targets,
+ SVN_ERR(svn_client_log6(targets,
&target_peg_revision,
opt_state->revision_ranges,
opt_state->limit,
opt_state->verbose,
opt_state->stop_on_copy,
opt_state->use_merge_history,
+ move_behavior,
revprops,
log_entry_receiver,
&lb,
Modified: subversion/trunk/tools/client-side/svn-bench/svn-bench.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svn-bench/svn-bench.c?rev=1532200&r1=1532199&r2=1532200&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/svn-bench/svn-bench.c (original)
+++ subversion/trunk/tools/client-side/svn-bench/svn-bench.c Tue Oct 15 06:07:10 2013
@@ -66,6 +66,7 @@ typedef enum svn_cl__longopt_t {
opt_with_revprop,
opt_with_all_revprops,
opt_with_no_revprops,
+ opt_auto_moves,
opt_trust_server_cert,
opt_changelist
} svn_cl__longopt_t;
@@ -148,6 +149,10 @@ const apr_getopt_option_t svn_cl__option
N_("set revision property ARG in new revision\n"
" "
"using the name[=value] format")},
+ {"auto-moves", opt_auto_moves, 0,
+ N_("attempt to interpret matching unique DEL+ADD\n"
+ " "
+ "pairs as moves")},
{"use-merge-history", 'g', 0,
N_("use/display additional information from merge\n"
" "
@@ -256,7 +261,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" behavior, which can be useful for determining branchpoints.\n"),
{'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy,
'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
- 'x',},
+ opt_auto_moves, 'x',},
{{opt_with_revprop, N_("retrieve revision property ARG")},
{'c', N_("the change made in revision ARG")}} },
@@ -632,6 +637,9 @@ sub_main(int argc, const char *argv[], a
case 'g':
opt_state.use_merge_history = TRUE;
break;
+ case opt_auto_moves:
+ opt_state.auto_moves = TRUE;
+ break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */