1. Shlomi Fish
  2. perl-SVN-RaWeb-Light

Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed 95db089

1. Added the TODO.

2. Now displaying files.

  • Participants
  • Parent commits 094a47c
  • Branches default

Comments (0)

Files changed (3)

File MANIFEST

View file
 t/SVN-RaWeb-Light.t
 lib/SVN/RaWeb/Light.pm
 META.yml                                 Module meta-data (added by MakeMaker)
+TODO

File TODO

View file
+* Make sure paths ending with slash are directories and those that don't
+are files.

File lib/SVN/RaWeb/Light.pm

View file
     }
     elsif ($node_kind eq $SVN::Node::file)
     {
-        print $cgi->header();
-        print "<h1>A File!</h1>";
+        my $buffer = "";
+        open my $fh, ">", \$buffer;
+        my ($fetched_rev, $props)
+            = $svn_ra->get_file($path, $rev_num, $fh);
+        print $cgi->header( 
+            -type => ($props->{'svn:mime-type'} || 'text/plain')
+            );
+        print $buffer;
+        close($fh);
     }
     else
     {
 
 =head1 AUTHOR
 
-Shlomi Fish, E<lt>shlomi@mandrakesoft.comE<gt>
+Shlomi Fish, E<lt>shlomif@iglu.org.ilE<gt>
 
 =head1 COPYRIGHT AND LICENSE