]> git.pld-linux.org Git - packages/subversion.git/blame - subversion-log-xml.patch
- updated to 1.1.1
[packages/subversion.git] / subversion-log-xml.patch
CommitLineData
46e6fbf4
AM
1Index: subversion/clients/cmdline/log-cmd.c
2===================================================================
3--- subversion/clients/cmdline/log-cmd.c (wersja 11180)
4+++ subversion/clients/cmdline/log-cmd.c (wersja 11181)
5@@ -23,6 +23,7 @@
6 /*** Includes. ***/
7
8 #define APR_WANT_STRFUNC
9+#define APR_WANT_STDIO
10 #include <apr_want.h>
11
12 #include "svn_wc.h"
13@@ -76,7 +77,29 @@
14 return count;
15 }
16
17+static svn_error_t *
18+error_checked_fputs(const char *string, FILE* stream)
19+{
20+ /* This function is equal to svn_cmdline_fputs() minus
21+ the utf8->local encoding translation */
22
23+ /* On POSIX systems, errno will be set on an error in fputs, but this might
24+ not be the case on other platforms. We reset errno and only
25+ use it if it was set by the below fputs call. Else, we just return
26+ a generic error. */
27+ errno = 0;
28+
29+ if (fputs (string, stream) == EOF)
30+ {
31+ if (errno)
32+ return svn_error_wrap_apr (errno, _("Write error"));
33+ else
34+ return svn_error_create (SVN_ERR_IO_WRITE_ERROR, NULL, NULL);
35+ }
36+
37+ return SVN_NO_ERROR;
38+}
39+
40 /* Baton for log_message_receiver() and log_message_receiver_xml(). */
41 struct log_receiver_baton
42 {
43@@ -416,7 +439,7 @@
44 /* </logentry> */
45 svn_xml_make_close_tag (&sb, pool, "logentry");
46
47- SVN_ERR (svn_cmdline_printf (pool, "%s", sb->data));
48+ SVN_ERR (error_checked_fputs (sb->data, stdout));
49
50 return SVN_NO_ERROR;
51 }
52@@ -497,7 +520,7 @@
53 /* "<log>" */
54 svn_xml_make_open_tag (&sb, pool, svn_xml_normal, "log", NULL);
55
56- SVN_ERR (svn_cmdline_printf (pool, "%s", sb->data));
57+ SVN_ERR (error_checked_fputs (sb->data, stdout));
58 }
59
60 SVN_ERR (svn_client_log2 (targets,
61@@ -518,7 +541,7 @@
62 /* "</log>" */
63 svn_xml_make_close_tag (&sb, pool, "log");
64
65- SVN_ERR (svn_cmdline_printf (pool, "%s", sb->data));
66+ SVN_ERR (error_checked_fputs (sb->data, stdout));
67 }
68 }
69 else /* default output format */
This page took 0.214444 seconds and 4 git commands to generate.