/[Frey]/trunk/lib/Frey/SVK.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 /trunk/lib/Frey/SVK.pm

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

revision 690 by dpavlin, Tue Dec 2 22:05:25 2008 UTC revision 712 by dpavlin, Thu Dec 4 16:02:57 2008 UTC
# Line 121  sub diff_as_markup { Line 121  sub diff_as_markup {
121          $diff =~ s{^(\-.+?)$}{<span class="del">$1</span>}gm;          $diff =~ s{^(\-.+?)$}{<span class="del">$1</span>}gm;
122          sub form {          sub form {
123                  my ( $path, $action ) = @_;                  my ( $path, $action ) = @_;
124                  qq|<form class="inline"><input type="hidden" name="path" value="$path"><input type="submit" name="action" value="$action"></form>|;                  qq|<form class="inline" method="post"><input type="hidden" name="path" value="$path"><input type="submit" name="action" value="$action"></form>|;
125          };          };
126          $diff =~ s{^(===\s+)(\S+)$}{$1 . form($2,'revert') . qq| <a name="$2" target="editor" href="/editor+$2+1">$2</a> | . form($2,'postpone') }gem;          $diff =~ s{^(===\s+)(\S+)$}{$1 . form($2,'revert') . qq| <a name="$2" target="editor" href="/editor+$2+1">$2</a> | . form($2,'postpone') }gem;
127    
128          $diff = qq|<pre>$diff</pre>|;          $diff = qq|<pre>$diff</pre>| if $diff;
129          warn "diff_as_markup ",length($diff)," bytes";          warn "diff_as_markup ",length($diff)," bytes";
130          return $diff;          return $diff;
131  }  }
# Line 162  sub action_as_markup { Line 162  sub action_as_markup {
162    
163                  return qq|                  return qq|
164                          Command <tt>$cmd</tt> produced output:                          Command <tt>$cmd</tt> produced output:
165                          <code style="background: #ff8;">                          <pre style="background: #ff8;">
166                          $out                          $out
167                          </code>                          </pre>
168                  |;                  |;
169          }          }
170    
# Line 177  sub as_markup { Line 177  sub as_markup {
177    
178          $self->title( 'svk' . ( $self->action ? ' - ' . $self->action : '' ) ); # XXX without this we get wrong icon and title          $self->title( 'svk' . ( $self->action ? ' - ' . $self->action : '' ) ); # XXX without this we get wrong icon and title
179    
180          $html .= $self->commit_as_markup . $self->diff_as_markup;          $html .= $self->commit_as_markup . $self->diff_as_markup ||
181                    qq|No changes in tracked files|;
182    
183          warn "as_markup ",length($html)," bytes";          warn "as_markup ",length($html)," bytes";
184    

Legend:
Removed from v.690  
changed lines
  Added in v.712

  ViewVC Help
Powered by ViewVC 1.1.26