]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/subversion/subversion/svn/cl-log.h
Update svn-1.9.7 to 1.10.0.
[FreeBSD/FreeBSD.git] / contrib / subversion / subversion / svn / cl-log.h
1 /*
2  * cl-log.h: Log entry receiver
3  *
4  * ====================================================================
5  *    Licensed to the Apache Software Foundation (ASF) under one
6  *    or more contributor license agreements.  See the NOTICE file
7  *    distributed with this work for additional information
8  *    regarding copyright ownership.  The ASF licenses this file
9  *    to you under the Apache License, Version 2.0 (the
10  *    "License"); you may not use this file except in compliance
11  *    with the License.  You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  *    Unless required by applicable law or agreed to in writing,
16  *    software distributed under the License is distributed on an
17  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  *    KIND, either express or implied.  See the License for the
19  *    specific language governing permissions and limitations
20  *    under the License.
21  * ====================================================================
22  */
23
24
25 \f
26 #ifndef SVN_CL_LOG_H
27 #define SVN_CL_LOG_H
28
29 /*** Includes. ***/
30 #include <apr_pools.h>
31
32 #include "svn_types.h"
33
34 #include "private/svn_string_private.h"
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif /* __cplusplus */
39
40 \f
41
42 /* The separator between log messages. */
43 #define SVN_CL__LOG_SEP_STRING \
44   "------------------------------------------------------------------------\n"
45
46 /* Baton for log_entry_receiver() and log_entry_receiver_xml(). */
47 typedef struct svn_cl__log_receiver_baton
48 {
49   /* Client context. */
50   svn_client_ctx_t *ctx;
51
52   /* The target of the log operation. */
53   const char *target_path_or_url;
54   svn_opt_revision_t target_peg_revision;
55
56   /* Don't print log message body nor its line count. */
57   svn_boolean_t omit_log_message;
58
59   /* Whether to show diffs in the log. (maps to --diff) */
60   svn_boolean_t show_diff;
61
62   /* Depth applied to diff output. */
63   svn_depth_t depth;
64
65   /* Diff arguments received from command line. */
66   const char *diff_extensions;
67
68   /* Stack which keeps track of merge revision nesting, using svn_revnum_t's */
69   apr_array_header_t *merge_stack;
70
71   /* Log message search patterns. Log entries will only be shown if the author,
72    * the log message, or a changed path matches one of these patterns. */
73   apr_array_header_t *search_patterns;
74
75   /* Buffer for Unicode normalization and case folding. */
76   svn_membuf_t buffer;
77
78   /* Pool for persistent allocations. */
79   apr_pool_t *pool;
80 } svn_cl__log_receiver_baton;
81
82 /* Implement `svn_log_entry_receiver_t', printing the logs in
83  * a human-readable and machine-parseable format.
84  *
85  * BATON is of type `struct svn_cl__log_receiver_baton'.
86  *
87  * First, print a header line.  Then if CHANGED_PATHS is non-null,
88  * print all affected paths in a list headed "Changed paths:\n",
89  * immediately following the header line.  Then print a newline
90  * followed by the message body, unless BATON->omit_log_message is true.
91  */
92 svn_error_t *
93 svn_cl__log_entry_receiver(void *baton,
94                            svn_log_entry_t *log_entry,
95                            apr_pool_t *pool);
96
97 /* This implements `svn_log_entry_receiver_t', printing the logs in XML.
98  *
99  * BATON is of type `struct svn_cl__log_receiver_baton'.
100  */
101 svn_error_t *
102 svn_cl__log_entry_receiver_xml(void *baton,
103                                svn_log_entry_t *log_entry,
104                                apr_pool_t *pool);
105
106 #ifdef __cplusplus
107 }
108 #endif /* __cplusplus */
109
110 #endif /* SVN_CL_LOG_H */