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"
36
#endif /* __cplusplus */
40
/* The separator between log messages. */
41
#define SVN_CL__LOG_SEP_STRING \
42
"------------------------------------------------------------------------\n"
44
/* Baton for log_entry_receiver() and log_entry_receiver_xml(). */
45
typedef struct svn_cl__log_receiver_baton
48
svn_client_ctx_t *ctx;
50
/* The target of the log operation. */
51
const char *target_path_or_url;
52
svn_opt_revision_t target_peg_revision;
54
/* Don't print log message body nor its line count. */
55
svn_boolean_t omit_log_message;
57
/* Whether to show diffs in the log. (maps to --diff) */
58
svn_boolean_t show_diff;
60
/* Depth applied to diff output. */
63
/* Diff arguments received from command line. */
64
const char *diff_extensions;
66
/* Stack which keeps track of merge revision nesting, using svn_revnum_t's */
67
apr_array_header_t *merge_stack;
69
/* Log message search patterns. Log entries will only be shown if the author,
70
* the log message, or a changed path matches one of these patterns. */
71
apr_array_header_t *search_patterns;
73
/* Pool for persistent allocations. */
75
} svn_cl__log_receiver_baton;
77
/* Implement `svn_log_entry_receiver_t', printing the logs in
78
* a human-readable and machine-parseable format.
80
* BATON is of type `struct svn_cl__log_receiver_baton'.
82
* First, print a header line. Then if CHANGED_PATHS is non-null,
83
* print all affected paths in a list headed "Changed paths:\n",
84
* immediately following the header line. Then print a newline
85
* followed by the message body, unless BATON->omit_log_message is true.
88
svn_cl__log_entry_receiver(void *baton,
89
svn_log_entry_t *log_entry,
92
/* This implements `svn_log_entry_receiver_t', printing the logs in XML.
94
* BATON is of type `struct svn_cl__log_receiver_baton'.
97
svn_cl__log_entry_receiver_xml(void *baton,
98
svn_log_entry_t *log_entry,
103
#endif /* __cplusplus */
105
#endif /* SVN_CL_LOG_H */