MSYS2-packages/subversion/06-svnadmin-binary-mode.patch
2017-02-15 09:05:11 +03:00

41 lines
1.2 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Use binary mode for svnadmin dump/load.
From: David Rothenberger <d.rothenberger@entomo.com>
---
subversion/svnadmin/svnadmin.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/subversion/svnadmin/svnadmin.c b/subversion/svnadmin/svnadmin.c
index ec98c6b..3ffbf7d 100644
--- a/subversion/svnadmin/svnadmin.c
+++ b/subversion/svnadmin/svnadmin.c
@@ -51,6 +51,10 @@
#include "svn_private_config.h"
+#include <unistd.h>
+#include <io.h>
+#include <fcntl.h>
+
/*** Code. ***/
@@ -1212,6 +1216,7 @@ subcommand_dump(apr_getopt_t *os, void *baton, apr_pool_t *pool)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("First revision cannot be higher than second"));
+ setmode(STDOUT_FILENO, O_BINARY);
SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
/* Progress feedback goes to STDERR, unless they asked to suppress it. */
@@ -1401,6 +1406,7 @@ subcommand_load(apr_getopt_t *os, void *baton, apr_pool_t *pool)
SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
/* Read the stream from STDIN. Users can redirect a file. */
+ setmode(STDIN_FILENO, O_BINARY);
SVN_ERR(svn_stream_for_stdin(&stdin_stream, pool));
/* Progress feedback goes to STDOUT, unless they asked to suppress it. */