Index: subversion/clients/cmdline/main.c =================================================================== --- subversion/clients/cmdline/main.c (revision 17002) +++ subversion/clients/cmdline/main.c (working copy) @@ -69,6 +69,7 @@ const apr_getopt_option_t svn_cl__option {"quiet", 'q', 0, N_("print as little as possible")}, {"recursive", 'R', 0, N_("descend recursively")}, {"non-recursive", 'N', 0, N_("operate on single directory only")}, + {"change", 'c', 0, N_("Shorthand for the revision range ARG1-1:ARG1")}, {"revision", 'r', 1, N_ ("ARG (some commands also take ARG1:ARG2 range)\n" " A revision argument can be one of:\n" @@ -466,7 +467,7 @@ const svn_opt_subcommand_desc_t svn_cl__ " If WCPATH is omitted, a default value of '.' is assumed, unless\n" " the sources have identical basenames that match a file within '.':\n" " in which case, the differences will be applied to that file.\n"), - {'r', 'N', 'q', svn_cl__force_opt, svn_cl__dry_run_opt, + {'r', 'N', 'q', 'c', svn_cl__force_opt, svn_cl__dry_run_opt, svn_cl__merge_cmd_opt, svn_cl__ignore_ancestry_opt, SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt} }, @@ -914,6 +915,38 @@ main (int argc, const char * const *argv opt_state.message = apr_pstrdup (pool, opt_arg); dash_m_arg = opt_arg; break; + case 'c': + { + char *end; + if (opt_state.start_revision.kind != svn_opt_revision_unspecified) + { + err = svn_error_create + (SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("Multiple revision arguments encountered; " + "can't specify -c twice, or both -c and -r")); + return svn_cmdline_handle_exit_error (err, pool, "svn: "); + } + opt_state.end_revision.value.number = strtol (opt_arg, &end, 10); + opt_state.end_revision.kind = svn_opt_revision_number; + if (end == opt_arg || *end != '\0') + { + err = svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("Non-numeric change argument given")); + return svn_cmdline_handle_exit_error (err, pool, "svn: "); + } + else if (opt_state.end_revision.value.number == 0) + { + err = svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("There is no change 0, changes " + "represent the difference from " + "revision " + "to ")); + return svn_cmdline_handle_exit_error (err, pool, "svn: "); + } + opt_state.start_revision.value.number = opt_state.end_revision.value.number - 1; + opt_state.start_revision.kind = svn_opt_revision_number; + } + break; case 'r': if (opt_state.start_revision.kind != svn_opt_revision_unspecified) {