Skip some mergeinfo-related tests in merge_authz, switch, and update
[svn.git] / subversion / libsvn_delta / default_editor.c
blob2b0972e6fbba6708778c40287d06d053098e7a65
1 /*
2 * default_editor.c -- provide a basic svn_delta_editor_t
4 * ====================================================================
5 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
20 #include <apr_pools.h>
21 #include <apr_strings.h>
23 #include "svn_types.h"
24 #include "svn_delta.h"
27 static svn_error_t *
28 set_target_revision(void *edit_baton,
29 svn_revnum_t target_revision,
30 apr_pool_t *pool)
32 return SVN_NO_ERROR;
34 static svn_error_t *
35 add_item(const char *path,
36 void *parent_baton,
37 const char *copyfrom_path,
38 svn_revnum_t copyfrom_revision,
39 apr_pool_t *pool,
40 void **baton)
42 *baton = NULL;
43 return SVN_NO_ERROR;
47 static svn_error_t *
48 single_baton_func(void *baton,
49 apr_pool_t *pool)
51 return SVN_NO_ERROR;
55 static svn_error_t *
56 absent_xxx_func(const char *path,
57 void *baton,
58 apr_pool_t *pool)
60 return SVN_NO_ERROR;
64 static svn_error_t *
65 open_root(void *edit_baton,
66 svn_revnum_t base_revision,
67 apr_pool_t *dir_pool,
68 void **root_baton)
70 *root_baton = NULL;
71 return SVN_NO_ERROR;
74 static svn_error_t *
75 delete_entry(const char *path,
76 svn_revnum_t revision,
77 void *parent_baton,
78 apr_pool_t *pool)
80 return SVN_NO_ERROR;
83 static svn_error_t *
84 open_item(const char *path,
85 void *parent_baton,
86 svn_revnum_t base_revision,
87 apr_pool_t *pool,
88 void **baton)
90 *baton = NULL;
91 return SVN_NO_ERROR;
94 static svn_error_t *
95 change_prop(void *file_baton,
96 const char *name,
97 const svn_string_t *value,
98 apr_pool_t *pool)
100 return SVN_NO_ERROR;
103 svn_error_t *svn_delta_noop_window_handler(svn_txdelta_window_t *window,
104 void *baton)
106 return SVN_NO_ERROR;
109 static svn_error_t *
110 apply_textdelta(void *file_baton,
111 const char *base_checksum,
112 apr_pool_t *pool,
113 svn_txdelta_window_handler_t *handler,
114 void **handler_baton)
116 *handler = svn_delta_noop_window_handler;
117 *handler_baton = NULL;
118 return SVN_NO_ERROR;
122 static svn_error_t *
123 close_file(void *file_baton,
124 const char *text_checksum,
125 apr_pool_t *pool)
127 return SVN_NO_ERROR;
132 static const svn_delta_editor_t default_editor =
134 set_target_revision,
135 open_root,
136 delete_entry,
137 add_item,
138 open_item,
139 change_prop,
140 single_baton_func,
141 absent_xxx_func,
142 add_item,
143 open_item,
144 apply_textdelta,
145 change_prop,
146 close_file,
147 absent_xxx_func,
148 single_baton_func,
149 single_baton_func
152 svn_delta_editor_t *
153 svn_delta_default_editor(apr_pool_t *pool)
155 return apr_pmemdup(pool, &default_editor, sizeof(default_editor));