1SVN::Simple::Edit(3) User Contributed Perl Documentation SVN::Simple::Edit(3)
2
3
4
6 SVN::Simple::Edit - A simple interface for driving svn delta editors
7
9 my $edit = SVN::Simple::Edit->new
10 (_editor => [SVN::Repos::get_commit_editor($repos, "file://$repospath",
11 '/', 'root', 'FOO', \&committed)],
12 );
13
14 $edit->open_root($fs->youngest_rev);
15 $edit->add_directory ('trunk');
16 $edit->add_file ('trunk/filea');
17 $edit->modify_file ("trunk/fileb", "content", $checksum);
18 $edit->delete_entry ("trunk/filec");
19 $edit->close_edit ();
20 ...
21 $edit->copy_directory ('branches/a, trunk, 0);
22
24 SVN::Simple::Edit wraps the subversion delta editor with a perl
25 friendly interface and then you could easily drive it for describing
26 changes to a tree. A common usage is to wrap the commit editor, so you
27 could make commits to a subversion repository easily.
28
29 This also means you can not supply the $edit object as an delta_editor
30 to other API, and that's why this module is named ::Edit instead of
31 ::Editor.
32
33 See SVN::Simple::Editor for simple interface implementing a delta
34 editor.
35
37 for constructor
38 _editor
39 The editor that will receive delta editor calls.
40
41 missing_handler
42 Called when parent directory are not opened yet, could be:
43
44 \&SVN::Simple::Edit::build_missing
45 Always build parents if you don't open them explicitly.
46
47 \&SVN::Simple::Edit::open_missing
48 Always open the parents if you don't create them explicitly.
49
50 SVN::Simple::Edit::check_missing ([$root])
51 Check if the path exists on $root. Open it if so, otherwise
52 create it.
53
54 root
55 The default root to use by SVN::Simple::Edit::check_missing.
56
57 base_path
58 The base path the edit object is created to send delta editor
59 calls.
60
61 noclose
62 Do not close files or directories. This might make non-sorted
63 operations on directories/files work.
64
66 Note: Don't expect all editors will work with operations not sorted in
67 DFS order.
68
69 open_root ($base_rev)
70 add_directory ($path)
71 open_directory ($path)
72 copy_directory ($path, $from, $fromrev)
73 add_file ($path)
74 open_file ($path)
75 copy_file ($path, $from, $fromrev)
76 delete_entry ($path)
77 change_dir_prop ($path, $propname, $propvalue)
78 change_file_prop ($path, $propname, $propvalue)
79 close_edit ()
80
82 Chia-liang Kao <clkao@clkao.org>
83
85 Copyright 2003-2004 by Chia-liang Kao <clkao@clkao.org>.
86
87 This program is free software; you can redistribute it and/or modify it
88 under the same terms as Perl itself.
89
90 See <http://www.perl.com/perl/misc/Artistic.html>
91
92
93
94perl v5.32.0 2020-07-28 SVN::Simple::Edit(3)