+sub match_globs {
+ my ($self, $exists, $paths, $globs, $r) = @_;
+ foreach my $g (@$globs) {
+ foreach (keys %$paths) {
+ next unless /$g->{path}->{regex}/;
+ my $p = $1;
+ my $pathname = $g->{path}->full_path($p);
+ next if $exists->{$pathname};
+ $exists->{$pathname} = Git::SVN->init(
+ $self->{url}, $pathname, undef,
+ $g->{ref}->full_path($p), 1);
+ }
+ my $c = '';
+ foreach (split m#/#, $g->{path}->{left}) {
+ $c .= "/$_";
+ next unless ($paths->{$c} &&
+ ($paths->{$c}->{action} eq 'A'));
+ my @x = eval { $self->get_dir($g->{path}->{left}, $r) };
+ next unless scalar @x == 3;
+ my $dirents = $x[0];
+ foreach my $de (keys %$dirents) {
+ next if $dirents->{$de}->kind !=
+ $SVN::Node::dir;
+ my $p = $g->{path}->full_path($de);
+ next if $exists->{$p};
+ next if (length $g->{path}->{right} &&
+ ($self->check_path($p, $r) !=
+ $SVN::Node::dir));
+ $exists->{$p} = Git::SVN->init($self->{url},
+ $p, undef,
+ $g->{ref}->full_path($de), 1);
+ }
+ }
+ }
+ values %$exists;
+}
+