41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
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 d40525e..c3a7fad 100644
|
||
--- a/subversion/svnadmin/svnadmin.c
|
||
+++ b/subversion/svnadmin/svnadmin.c
|
||
@@ -49,6 +49,10 @@
|
||
|
||
#include "svn_private_config.h"
|
||
|
||
+#include <unistd.h>
|
||
+#include <io.h>
|
||
+#include <fcntl.h>
|
||
+
|
||
|
||
/*** Code. ***/
|
||
|
||
@@ -1010,6 +1014,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. */
|
||
@@ -1195,6 +1200,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. */
|