This file is indexed.

/usr/share/perl5/SVN/Web/Checkout.pm is in libsvn-web-perl 0.63-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package SVN::Web::Checkout;

use strict;
use warnings;

use base 'SVN::Web::action';

use Encode ();
use SVN::Web::X;

our $VERSION = 0.62;

=head1 NAME

SVN::Web::Checkout - SVN::Web action to checkout a given file

=head1 SYNOPSIS

In F<config.yaml>

  actions:
    ...
    checkout:
      class: SVN::Web::Checkout
      action_menu:
        show:
          - file
        link_text: (checkout)
    ...

=head1 DESCRIPTION

Returns the contents of the given filename.  Uses the C<svn:mime-type>
property.

=head1 OPTIONS

=over 4

=item rev

The repository revision to checkout.  Defaults to the repository's youngest
revision.

=back

=head1 TEMPLATE VARIABLES

N/A

=head1 EXCEPTIONS

=over 4

=item (path %1 is not a file in revision %2)

The given path is not a file in the given revision.

=back

=cut

sub run {
    my $self = shift;
    my $ra   = $self->{repos}{ra};
    my $rev  = $self->{cgi}->param('rev') || $ra->get_latest_revnum();

    my $uri  = $self->{repos}{uri};
    $uri .= '/'.$self->rpath if $self->rpath;

    my $node_kind = $self->svn_get_node_kind($uri, $rev, $rev);

    if ( $node_kind != $SVN::Node::file ) {
        SVN::Web::X->throw(
            error => '(path %1 is not a file in revision %2)',
            vars  => [ $self->rpath, $rev ]
        );
    }

    my ( $fh, $fc ) = ( undef, '' );
    open( $fh, '>', \$fc );
    $self->ctx_cat( $fh, $uri, $rev );
    close($fh);

    my $mime_type;
    my $props = $self->ctx_propget( 'svn:mime-type', $uri, $rev, 0 );
    if ( exists $props->{$uri} ) {
        $mime_type = $props->{$uri};
    }
    else {
        $mime_type = 'text/plain';
    }

    return {
        mimetype => $mime_type,
        body     => $fc,
    };
}

1;

=head1 COPYRIGHT

Copyright 2003-2004 by Chia-liang Kao C<< <clkao@clkao.org> >>.

Copyright 2005-2007 by Nik Clayton C<< <nik@FreeBSD.org> >>.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

See L<http://www.perl.com/perl/misc/Artistic.html>

=cut