aboutsummaryrefslogtreecommitdiff
path: root/subversion/libsvn_delta/default_editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_delta/default_editor.c')
-rw-r--r--subversion/libsvn_delta/default_editor.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/subversion/libsvn_delta/default_editor.c b/subversion/libsvn_delta/default_editor.c
index 2f1c9734ba6a..63cbc1599231 100644
--- a/subversion/libsvn_delta/default_editor.c
+++ b/subversion/libsvn_delta/default_editor.c
@@ -133,6 +133,33 @@ close_file(void *file_baton,
}
+static svn_error_t *
+apply_textdelta_stream(const svn_delta_editor_t *editor,
+ void *file_baton,
+ const char *base_checksum,
+ svn_txdelta_stream_open_func_t open_func,
+ void *open_baton,
+ apr_pool_t *scratch_pool)
+{
+ svn_txdelta_window_handler_t handler;
+ void *handler_baton;
+
+ SVN_ERR(editor->apply_textdelta(file_baton, base_checksum,
+ scratch_pool, &handler,
+ &handler_baton));
+ if (handler != svn_delta_noop_window_handler)
+ {
+ svn_txdelta_stream_t *txdelta_stream;
+
+ SVN_ERR(open_func(&txdelta_stream, open_baton, scratch_pool,
+ scratch_pool));
+ SVN_ERR(svn_txdelta_send_txstream(txdelta_stream, handler,
+ handler_baton, scratch_pool));
+ }
+
+ return SVN_NO_ERROR;
+}
+
static const svn_delta_editor_t default_editor =
{
@@ -151,7 +178,8 @@ static const svn_delta_editor_t default_editor =
close_file,
absent_xxx_func,
single_baton_func,
- single_baton_func
+ single_baton_func,
+ apply_textdelta_stream
};
svn_delta_editor_t *