Ben Reser <ben@reser.org> writes:
> Index: subversion/libsvn_client/export.c
> ===================================================================
> --- subversion/libsvn_client/export.c (revision 9269)
> +++ subversion/libsvn_client/export.c (working copy)
> @@ -58,12 +58,33 @@
> externals_prop_val->len));
> }
>
> +/* Helper function that gets the eol style and optionally overrides the
> + EOL marker for files marked as native. */
> +static void
> +get_eol_style (svn_subst_eol_style_t *style,
> + const char **eol,
> + const char *value,
> + const char *native_eol)
> +{
> + svn_subst_eol_style_from_value (style, eol, value);
> + if (native_eol && *style == svn_subst_eol_style_native)
> + {
> + if (! strcmp ("LF", native_eol))
> + *eol = "\n";
> + else if (! strcmp ("CR", native_eol))
> + *eol = "\r";
> + else if (! strcmp ("CRLF", native_eol))
> + *eol = "\r\n";
> + /* else leave *eol alone */
svn_subst_eol_style_native (NULL, eol, native_eol) ?
> + }
> +}
> Index: subversion/clients/cmdline/main.c
> ===================================================================
> --- subversion/clients/cmdline/main.c (revision 9269)
> +++ subversion/clients/cmdline/main.c (working copy)
> @@ -127,6 +127,10 @@
> "enable automatic properties"},
> {"no-auto-props", svn_cl__no_autoprops_opt, 0,
> "disable automatic properties"},
> + {"native-eol", svn_cl__native_eol_opt, 1,
> + "Use a different EOL marker than the standard\n"
> + " system marker for files with a native svn:eol-style\n"
> + " property. ARG may be one of 'LF', 'CR', 'CRLF'\n"},
> {0, 0, 0, 0}
> };
>
> @@ -269,7 +273,7 @@
> " changes will be preserved, but files not under version control will\n"
> " not be copied.\n",
> {'r', 'q', svn_cl__force_opt, SVN_CL__AUTH_OPTIONS,
> - svn_cl__config_dir_opt} },
> + svn_cl__config_dir_opt, svn_cl__native_eol_opt} },
>
> { "help", svn_cl__help, {"?", "h"},
> "Describe the usage of this program or its subcommands.\n"
> @@ -931,6 +935,23 @@
> }
> opt_state.no_autoprops = TRUE;
> break;
> + case svn_cl__native_eol_opt:
> + if ( !strcmp ("LF", opt_arg) || !strcmp ("CR", opt_arg) ||
> + !strcmp ("CRLF", opt_arg))
For consistency with propset feel we ought to support the no-op
"native" as well?
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 4 21:29:09 2004