Author: rinrab Date: Sun May 18 15:27:49 2025 New Revision: 1925676 URL: http://svn.apache.org/viewvc?rev=1925676&view=rev Log: On the 'xpatch' branch: Add in-void `--xpatch` option to the `svn diff` command.
* subversion/svn/cl.h (svn_cl__opt_state_t::diff): Add xpatch boolean option. (svn_cl__longopt_t): Add opt_xpatch. * subversion/svn/svn.c (svn_cl__options): Declare the xpatch option. (svn_cl__cmd_table_main::diff): Accept --xpatch. (sub_main): Handle opt_xpatch. Modified: subversion/branches/xpatch/subversion/svn/cl.h subversion/branches/xpatch/subversion/svn/svn.c Modified: subversion/branches/xpatch/subversion/svn/cl.h URL: http://svn.apache.org/viewvc/subversion/branches/xpatch/subversion/svn/cl.h?rev=1925676&r1=1925675&r2=1925676&view=diff ============================================================================== --- subversion/branches/xpatch/subversion/svn/cl.h (original) +++ subversion/branches/xpatch/subversion/svn/cl.h Sun May 18 15:27:49 2025 @@ -209,6 +209,7 @@ typedef struct svn_cl__opt_state_t svn_boolean_t ignore_properties; /* ignore properties */ svn_boolean_t properties_only; /* Show properties only */ svn_boolean_t patch_compatible; /* Output compatible with GNU patch */ + svn_boolean_t xpatch; /* Output in xpatch format */ } diff; svn_boolean_t ignore_ancestry; /* ignore ancestry for merge-y operations */ svn_boolean_t ignore_externals;/* ignore externals definitions */ @@ -313,6 +314,7 @@ typedef enum svn_cl__longopt_t { opt_ignore_properties, opt_properties_only, opt_patch_compatible, + opt_xpatch, /* end of diff options */ opt_dry_run, opt_editor_cmd, Modified: subversion/branches/xpatch/subversion/svn/svn.c URL: http://svn.apache.org/viewvc/subversion/branches/xpatch/subversion/svn/svn.c?rev=1925676&r1=1925675&r2=1925676&view=diff ============================================================================== --- subversion/branches/xpatch/subversion/svn/svn.c (original) +++ subversion/branches/xpatch/subversion/svn/svn.c Sun May 18 15:27:49 2025 @@ -308,6 +308,7 @@ const apr_getopt_option_t svn_cl__option " " "--show-copies-as-adds --ignore-properties" )}, + {"xpatch", opt_xpatch, 0, N_("Produce diff in xpatch format.")}, /* end of diff options */ {"allow-mixed-revisions", opt_allow_mixed_revisions, 0, N_("Allow operation on mixed-revision working copy.\n" @@ -702,7 +703,8 @@ svn_cl__cmd_table_main[] = opt_internal_diff, 'x', opt_no_diff_added, opt_no_diff_deleted, opt_ignore_properties, opt_properties_only, opt_show_copies_as_adds, opt_notice_ancestry, opt_summarize, opt_changelist, - opt_force, opt_xml, opt_use_git_diff_format, opt_patch_compatible}, + opt_force, opt_xml, opt_use_git_diff_format, opt_patch_compatible, + opt_xpatch}, {{'N', N_("obsolete; same as --depth=files")}} }, { "export", svn_cl__export, {0}, {N_( @@ -2718,6 +2720,9 @@ sub_main(int *exit_code, case opt_properties_only: opt_state.diff.properties_only = TRUE; break; + case opt_xpatch: + opt_state.diff.xpatch = TRUE; + break; case opt_search: SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool)); SVN_ERR(svn_utf__xfrm(&utf8_opt_arg, utf8_opt_arg,