/[Frey]/branches/zimbardo/lib/Frey/SVN.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/zimbardo/lib/Frey/SVN.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/lib/Frey/SVN.pm revision 1081 by dpavlin, Fri Jun 5 14:02:55 2009 UTC branches/zimbardo/lib/Frey/SVN.pm revision 1190 by dpavlin, Mon Sep 28 20:24:18 2009 UTC
# Line 7  use Moose; Line 7  use Moose;
7  # 2004-04-28 Dobrica Pavlinusic <dpavlin@rot13.org>  # 2004-04-28 Dobrica Pavlinusic <dpavlin@rot13.org>
8    
9  extends 'Frey';  extends 'Frey';
10  with 'Frey::Web';  with 'Frey::Web', 'Frey::Storage', 'Frey::HTML::Diff';
 with 'Frey::Storage';  
 with 'Frey::HTML::Diff';  
11    
12  use XML::Simple;  use XML::Simple;
13  use DateTimeX::Easy;  use DateTimeX::Easy;
# Line 132  sub iterator { Line 130  sub iterator {
130                          my $diff_path = "$cache/$rev.diff";                          my $diff_path = "$cache/$rev.diff";
131                          $e->{diff} = $self->load( $diff_path ) if $self->include_diff && -e $diff_path;                          $e->{diff} = $self->load( $diff_path ) if $self->include_diff && -e $diff_path;
132    
133                          my $diff_yaml = "$cache/$rev.yaml";                          my $path = "$cache/$rev.storable";
134                            my $data;
135    
136                          if ( -e $diff_yaml ) {                          if ( -e $path ) {
137                                  $e->{diff_paths} = $self->load( $diff_yaml );                                  $data = $self->load( $path );
138                                    $e->{diff_paths} = $data->{diff_paths};
139                          } else {                          } else {
140                                  my $cmd = "svn diff -c $rev $svn_path";                                  my $cmd = "svn diff -c $rev $svn_path";
141                                  my ( $diff_fh, $diff_out );                                  my ( $diff_fh, $diff_out );
# Line 163  sub iterator { Line 163  sub iterator {
163                                  }                                  }
164    
165                                  $e->{diff} = $diff if $self->include_diff;                                  $e->{diff} = $diff if $self->include_diff;
   
                                 $self->store( "$cache/$rev.yaml", $changes );  
166                                  $e->{diff_paths} = $changes;                                  $e->{diff_paths} = $changes;
167    
168                                    $self->store( $path, $e ) if $self->include_diff && $self->file_stats;
169                          }                          }
170                    
171                  }                  }
# Line 329  sub as_markup { Line 329  sub as_markup {
329                  + length( $stats->{total_removed} )                  + length( $stats->{total_removed} )
330                  ;                  ;
331    
332          $max_path_len += int( $max_path_len / 10 ); # we are using ex, so we add 10%          $max_path_len += int( $max_path_len / 4 ); # we are using ex, so we adjust length
333    
334          $self->add_css(qq|          $self->add_css(qq|
335                  .files {                  .files {
# Line 382  sub codeswarm_as_markup { Line 382  sub codeswarm_as_markup {
382    
383  }  }
384    
385    __PACKAGE__->meta->make_immutable;
386    no Moose;
387    
388  1;  1;

Legend:
Removed from v.1081  
changed lines
  Added in v.1190

  ViewVC Help
Powered by ViewVC 1.1.26