2 * cl-log.h: Log entry receiver
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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
21 * ====================================================================
30 #include <apr_pools.h>
32 #include "svn_types.h"
34 #include "private/svn_string_private.h"
38 #endif /* __cplusplus */
42 /* The separator between log messages. */
43 #define SVN_CL__LOG_SEP_STRING \
44 "------------------------------------------------------------------------\n"
46 /* Baton for log_entry_receiver() and log_entry_receiver_xml(). */
47 typedef struct svn_cl__log_receiver_baton
50 svn_client_ctx_t *ctx;
52 /* The target of the log operation. */
53 const char *target_path_or_url;
54 svn_opt_revision_t target_peg_revision;
56 /* Don't print log message body nor its line count. */
57 svn_boolean_t omit_log_message;
59 /* Whether to show diffs in the log. (maps to --diff) */
60 svn_boolean_t show_diff;
62 /* Depth applied to diff output. */
65 /* Diff arguments received from command line. */
66 const char *diff_extensions;
68 /* Stack which keeps track of merge revision nesting, using svn_revnum_t's */
69 apr_array_header_t *merge_stack;
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;
75 /* Buffer for Unicode normalization and case folding. */
78 /* Pool for persistent allocations. */
80 } svn_cl__log_receiver_baton;
82 /* Implement `svn_log_entry_receiver_t', printing the logs in
83 * a human-readable and machine-parseable format.
85 * BATON is of type `struct svn_cl__log_receiver_baton'.
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.
93 svn_cl__log_entry_receiver(void *baton,
94 svn_log_entry_t *log_entry,
97 /* This implements `svn_log_entry_receiver_t', printing the logs in XML.
99 * BATON is of type `struct svn_cl__log_receiver_baton'.
102 svn_cl__log_entry_receiver_xml(void *baton,
103 svn_log_entry_t *log_entry,
108 #endif /* __cplusplus */
110 #endif /* SVN_CL_LOG_H */