1native::Delta(3)      User Contributed Perl Documentation     native::Delta(3)
2
3
4

NAME

6       SVN::Delta - Subversion delta functions
7

SYNOPSIS

9           require SVN::Core;
10           require SVN::Repos;
11           require SVN::Delta;
12
13           # driving an editor
14           my $editor = SVN::Delta::Editor->
15               new(SVN::Repos::get_commit_editor($repos, "file://$repospath",
16                                                 '/', 'root', 'FOO', \&committed));
17
18           my $rootbaton = $editor->open_root(0);
19
20           my $fbaton = $editor->add_file ('filea', $rootbaton,
21                                           undef, -1);
22
23           my $ret = $editor->apply_textdelta ($fbaton, undef);
24           SVN::TxDelta::send_string("FILEA CONTENT", @$ret);
25
26           # implement an editor in perl
27           SVN::Repos::dir_delta($root1, $path, undef,
28                                 $root2, $path,
29                                 SVN::Delta::Editor->new(_debug=>1),
30                                 1, 1, 0, 1
31

DESCRIPTION

33       SVN::Delta wraps delta related function in subversion. The most impor‐
34       tant one is SVN::Delta::Editor, the interface for describing tree
35       deltas. by default SVN::Delta::Editor relays method calls to its inter‐
36       nal member "_editor", which could either be an editor in C (such as the
37       one you get from get_commit_editor), or another SVN::Delta::Editor
38       object.
39

SVN::Delta::Editor

41       Driving Editors
42
43       If you want to drive a native editor (such as commit_editor obtained by
44       SVN::Repos::get_commit_editor), create a SVN::Delta::Editor object with
45       the native editor/baton pair. The object will then be ready to use and
46       its method calls will be relayed to the native editor.
47
48       Implementing Editors
49
50       If you want to implement an editor, subclass SVN::Delta::Editor and
51       implement the editors callbacks. see the METHODS section below.
52
53       CONSTRUCTOR - new (...)
54
55       new ($editor, $editor_baton)
56           Link to the native editor
57
58       You can also pass a hash array to new:
59
60       _debug
61           Turn on debug.
62
63       _editor
64           An arrayref of the editor/baton pair or another SVN::Delta::Editor
65           object to link with.
66
67       METHODS
68
69       Please consult the svn_delta.h section in the Subversion API. Member
70       functions of svn_delta_editor_t could be called as methods of
71       SVN::Delta::Editor objects, with the edit_baton omitted. The pool is
72       also optional.
73
74       If you are subclassing, the methods take exactly the same arguments as
75       the member functions (note that void ** are returned data though as
76       throughout the perl bindings), with the edit_baton omitted.
77

BUGS

79       Functions returning editor/baton pair should really be typemapped to a
80       SVN::Delta::Editor object.
81

AUTHORS

83       Chia-liang Kao <clkao@clkao.org>
84
86       Copyright (c) 2003 CollabNet.  All rights reserved.
87
88       This software is licensed as described in the file COPYING, which you
89       should have received as part of this distribution.  The terms are also
90       available at http://subversion.tigris.org/license-1.html.  If newer
91       versions of this license are posted there, you may use a newer version
92       instead, at your option.
93
94       This software consists of voluntary contributions made by many individ‐
95       uals.  For exact contribution history, see the revision history and
96       logs, available at http://subversion.tigris.org/.
97
98
99
100perl v5.8.8                       2005-06-17                  native::Delta(3)
Impressum