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 2017/08/21 11:58:28 UTC
svn commit: r1805623 - in /subversion/trunk/subversion: svn/cl.h
svn/conflict-callbacks.c svn/svn.c
tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
Author: stsp
Date: Mon Aug 21 11:58:28 2017
New Revision: 1805623
URL: http://svn.apache.org/viewvc?rev=1805623&view=rev
Log:
Add a new --accept recommended option to 'svn'.
--accept recommended works like --accept postpone, except that tree
conflicts for which a recommended resolution option exists are
automatically resolved.
* subversion/svn/cl.h
(SVN_CL__ACCEPT_RECOMMENDED): Declare (as string: "recommended").
* subversion/svn/conflict-callbacks.c
(svn_cl__accept_from_word): Handle SVN_CL__ACCEPT_RECOMMENDED and provide
the shorthand form 'r'.
* subversion/svn/svn.c
(svn_cl__options): Update --accept option help text.
* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:
Update expected help output.
Modified:
subversion/trunk/subversion/svn/cl.h
subversion/trunk/subversion/svn/conflict-callbacks.c
subversion/trunk/subversion/svn/svn.c
subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
Modified: subversion/trunk/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl.h?rev=1805623&r1=1805622&r2=1805623&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl.h (original)
+++ subversion/trunk/subversion/svn/cl.h Mon Aug 21 11:58:28 2017
@@ -100,6 +100,7 @@ typedef enum svn_cl__accept_t
#define SVN_CL__ACCEPT_THEIRS_FULL "theirs-full"
#define SVN_CL__ACCEPT_EDIT "edit"
#define SVN_CL__ACCEPT_LAUNCH "launch"
+#define SVN_CL__ACCEPT_RECOMMENDED "recommended"
/* Return the svn_cl__accept_t value corresponding to WORD, using exact
* case-sensitive string comparison. Return svn_cl__accept_invalid if WORD
Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1805623&r1=1805622&r2=1805623&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Mon Aug 21 11:58:28 2017
@@ -78,6 +78,9 @@ svn_cl__accept_from_word(const char *wor
if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0
|| strcmp(word, "l") == 0 || strcmp(word, ":-l") == 0)
return svn_cl__accept_launch;
+ if (strcmp(word, SVN_CL__ACCEPT_RECOMMENDED) == 0
+ || strcmp(word, "r"))
+ return svn_cl__accept_recommended;
/* word is an invalid action. */
return svn_cl__accept_invalid;
}
Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1805623&r1=1805622&r2=1805623&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Mon Aug 21 11:58:28 2017
@@ -329,9 +329,9 @@ const apr_getopt_option_t svn_cl__option
" "
"'theirs-conflict', 'mine-full', 'theirs-full',\n"
" "
- "'edit', 'launch')\n"
+ "'edit', 'launch', 'recommended') (shorthand:\n"
" "
- "(shorthand: 'p', 'mc', 'tc', 'mf', 'tf', 'e', 'l')"
+ "'p', 'mc', 'tc', 'mf', 'tf', 'e', 'l', 'r')"
)},
{"show-revs", opt_show_revs, 1,
N_("specify which collection of revisions to display\n"
Modified: subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1805623&r1=1805622&r2=1805623&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Mon Aug 21 11:58:28 2017
@@ -215,8 +215,8 @@ Valid options:
--accept ARG : specify automatic conflict resolution action
('postpone', 'working', 'base', 'mine-conflict',
'theirs-conflict', 'mine-full', 'theirs-full',
- 'edit', 'launch')
- (shorthand: 'p', 'mc', 'tc', 'mf', 'tf', 'e', 'l')
+ 'edit', 'launch', 'recommended') (shorthand:
+ 'p', 'mc', 'tc', 'mf', 'tf', 'e', 'l', 'r')
--relocate : deprecated; use 'svn relocate'
Global options: