Git::SVN::Fetcher(3) User Contributed Perl Documentation Git::SVN::Fetcher(3)

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

    use SVN::Core;
    use SVN::Ra;
    use Git::SVN;
    use Git::SVN::Fetcher;
    use Git;
    my $gs = Git::SVN->find_by_url($url);
    my $ra = SVN::Ra->new(url => $url);
    my $editor = Git::SVN::Fetcher->new($gs);
    my $reporter = $ra->do_update($SVN::Core::INVALID_REVNUM, '',
                                  1, $editor);
    $reporter->set_path('', $old_rev, 0);
    $reporter->finish_report;
    my $tree = $gs->tmp_index_do(sub { command_oneline('write-tree') });
    foreach my $path (keys %{$editor->{dir_prop}) {
        my $props = $editor->{dir_prop}{$path};
        foreach my $prop (keys %$props) {
            print "property $prop at $path changed to $props->{$prop}\n";
        }
    }
    foreach my $path (keys %{$editor->{empty}) {
        my $action = $editor->{empty}{$path} ? 'added' : 'removed';
        print "empty directory $path $action\n";
    }
    foreach my $path (keys %{$editor->{file_prop}) { ... }
    foreach my $parent (keys %{$editor->{absent_dir}}) {
        my @children = @{$editor->{abstent_dir}{$parent}};
        print "cannot fetch directory $parent/$_: not authorized?\n"
            foreach @children;
    }
    foreach my $parent (keys %{$editor->{absent_file}) { ... }

This is a subclass of "SVN::Delta::Editor", which means it implements callbacks to act as a consumer of Subversion tree deltas. This particular implementation of those callbacks is meant to store information about the resulting content which git svn fetch could use to populate new commits and new entries for unhandled.log. More specifically:

The interface is unstable. Do not use this module unless you are developing git-svn.

SVN::Delta from the Subversion perl bindings, the core Carp and File::Basename modules, and git's Git helper module.

"Git::SVN::Fetcher" has not been tested using callers other than git-svn itself.

SVN::Delta, Git::SVN::Editor.

None reported.

None.

2024-03-12 perl v5.38.2