1Git::SVN::Fetcher(3)  User Contributed Perl Documentation Git::SVN::Fetcher(3)
2
3
4

NAME

6       Git::SVN::Fetcher - tree delta consumer for "git svn fetch"
7

SYNOPSIS

9           use SVN::Core;
10           use SVN::Ra;
11           use Git::SVN;
12           use Git::SVN::Fetcher;
13           use Git;
14
15           my $gs = Git::SVN->find_by_url($url);
16           my $ra = SVN::Ra->new(url => $url);
17           my $editor = Git::SVN::Fetcher->new($gs);
18           my $reporter = $ra->do_update($SVN::Core::INVALID_REVNUM, '',
19                                         1, $editor);
20           $reporter->set_path('', $old_rev, 0);
21           $reporter->finish_report;
22           my $tree = $gs->tmp_index_do(sub { command_oneline('write-tree') });
23
24           foreach my $path (keys %{$editor->{dir_prop}) {
25               my $props = $editor->{dir_prop}{$path};
26               foreach my $prop (keys %$props) {
27                   print "property $prop at $path changed to $props->{$prop}\n";
28               }
29           }
30           foreach my $path (keys %{$editor->{empty}) {
31               my $action = $editor->{empty}{$path} ? 'added' : 'removed';
32               print "empty directory $path $action\n";
33           }
34           foreach my $path (keys %{$editor->{file_prop}) { ... }
35           foreach my $parent (keys %{$editor->{absent_dir}}) {
36               my @children = @{$editor->{abstent_dir}{$parent}};
37               print "cannot fetch directory $parent/$_: not authorized?\n"
38                   foreach @children;
39           }
40           foreach my $parent (keys %{$editor->{absent_file}) { ... }
41

DESCRIPTION

43       This is a subclass of "SVN::Delta::Editor", which means it implements
44       callbacks to act as a consumer of Subversion tree deltas.  This
45       particular implementation of those callbacks is meant to store
46       information about the resulting content which git svn fetch could use
47       to populate new commits and new entries for unhandled.log.  More
48       specifically:
49
50       ·   Additions, removals, and modifications of files are propagated to
51           git-svn's index file $GIT_DIR/svn/$refname/index using git update-
52           index.
53
54       ·   Changes in Subversion path properties are recorded in the
55           "dir_prop" and "file_prop" fields (which are hashes).
56
57       ·   Addition and removal of empty directories are indicated by entries
58           with value 1 and 0 respectively in the "empty" hash.
59
60       ·   Paths that are present but cannot be conveyed (presumably due to
61           permissions) are recorded in the "absent_file" and "absent_dirs"
62           hashes.  For each key, the corresponding value is a list of paths
63           under that directory that were present but could not be conveyed.
64
65       The interface is unstable.  Do not use this module unless you are
66       developing git-svn.
67

DEPENDENCIES

69       SVN::Delta from the Subversion perl bindings, the core Carp,
70       File::Basename, and IO::File modules, and git's Git helper module.
71
72       "Git::SVN::Fetcher" has not been tested using callers other than git-
73       svn itself.
74

SEE ALSO

76       SVN::Delta, Git::SVN::Editor.
77

INCOMPATIBILITIES

79       None reported.
80

BUGS

82       None.
83
84
85
86perl v5.16.3                      2013-06-10              Git::SVN::Fetcher(3)
Impressum