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
34       important one is SVN::Delta::Editor, the interface for describing tree
35       deltas. by default SVN::Delta::Editor relays method calls to its
36       internal member "_editor", which could either be an editor in C (such
37       as the one you get from get_commit_editor), or another
38       SVN::Delta::Editor object.
39

SVN::Delta::Editor

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

BUGS

75       Functions returning editor/baton pair should really be typemapped to a
76       SVN::Delta::Editor object.
77

AUTHORS

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