This is a patch that should make it possible to generate the zip file
source packages for Windows on *nix platforms.
It permits you to do something like so:
svn export --native-eol CRLF http://svn.collab.net/repos/svn/tags/1.0.1
~/subversion-1.0.1-win
Only files with native set as the svn:eol-style property will be changed
to CRLF. Thus files that need to stay fixed to a certain line ending
can have CR, LF, CRLF or simply no svn:eol-style property.
I'm posting here first so that everyone can look at it first. It's not
terribly invasive.
[[[
Add new --native-eol option to export to allow files with svn:eol-style
of native to be exported with a non-standard EOL marker. Useful to make
Windows source packages from *nix platforms.
* subversion/include/svn_client.h
(svn_client_export2): New function prototype. Move the documentation
from svn_client_export() onto this function documenting the new option,
native_eol, and the force option which wasn't documented before.
(svn_client_export): deprecate.
* subversion/libsvn_client/export.c
(get_eol_style): New helper function to handle getting the proper eol
style for a file.
(copy_versioned_files): Add a native_eol argument to the function.
Use native_eol argument when calling self.
Use get_eol_style() instead of svn_subst_eol_style_from_value().
(edit_baton): Add native_eol member to the struct.
(close_file): Use get_eol_style() instead of svn_subst_eol_style_from_value()
with the native_eol form the edit_baton.
(svn_client_export): Rename to svn_client_export2 and replace with a
compatibility wrapper.
(svn_client_export2): New function, differs from svn_client_export() by
the native_eol parameter, setting the native_eol member of the edit_baton
and passing native_eol to copy_versioned_files().
* subversion/clients/cmdline/cl.h
(svn_cl__longopt_t): Add svn_cl__native_eol_opt to enum.
(svn_cl__opt_state_t): Add native_eol member to struct.
* subversion/clients/cmdline/export-cmd.c
(svn_cl__export): Use svn_client_export2() instead of svn_client_export().
* subversion/clients/cmdline/main.c
(svn_cl__options): Add native-eol option to the array.
(svn_cl__cmd_table): Add native-eol option to the export command.
(main): Accept and validate native-eol option.
* subversion/clients/cmdline/export_tests.py
Add regression test to verify that the new option works.
]]]
--
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 3 06:29:45 2004