--- trunk/lib/Frey/SVN.pm 2008/12/17 19:40:31 875
+++ trunk/lib/Frey/SVN.pm 2009/01/10 21:42:00 987
@@ -20,6 +20,11 @@
default => 'file:///home/dpavlin/private/svn/Frey',
);
+has path => (
+ is => 'rw',
+ isa => 'Str'
+);
+
has limit => (
is => 'rw',
isa => 'Int',
@@ -48,7 +53,7 @@
return;
}
- my $path = $self->repository;
+ my $path = $self->repository . $self->path;
warn "# path $path\n";
my $cmd;
@@ -108,19 +113,45 @@
$foo =~ s/</g;
$foo =~ s/>/>/g;
$foo =~ s/"/"/g;
- $foo =~ s/([\n\r][\n\r]+)/$1
/gis;
+# $foo =~ s/([\n\r][\n\r]+)/$1
/gis;
$foo =~ s/([\n\r]+)([\-\*]\s+)/$1
$2/gis;
$foo =~ s/([\n\r]+)(r\d+:\s+)/$1
$2/gis;
$foo =~ s/([\n\r]+)(\s+r\d+@)/$1
$2/gis; # svk
return $foo;
}
- our $html = '';
+ my $repository = $self->repository;
+ my $path = $self->path;
+
+ our $html = qq|
+
+ $path
+ |;
$self->add_css(qq|
- .files { color: #888; font-family: monospace; }
+ .commit {
+ clear: both;
+ padding-top: 1em;
+ padding-bottom: 1em;
+ border-top: 1px dashed #ccc;
+ }
+ .files {
+ color: #888;
+ font-family: monospace;
+ font-size: 80%;
+ float: right;
+ padding-bottom: 1.2em; /* fix 80% back to original 1em */
+ }
+ .files a {
+ text-decoration: none;
+ color: #888;
+ }
.date, .revision { color: #666; }
- .message { padding-bottom: 0.5em; }
+ .message {
+ padding-top: 0.5em;
+ padding-left: 2em; /* like blockquote */
+ white-space: pre-wrap;
+ }
ins { color: #8c8 }
del { color: #c88 }
@@ -135,8 +166,6 @@
$date =~ s/T/ /;
$date =~ s/\.\d+Z$//;
- $html .= qq|$date $e->{author} $e->{revision}
\n|;
-
my $msg = $e->{'msg'};
$msg = '' if ref($msg); # FIXME why do I need this, dammit?
if ( $msg ) {
@@ -158,7 +187,23 @@
}
}
- $html .= qq|\n$msg\n\n| . join(",\n",@files) . qq|\n
\n
|;
+ $html .= qq|
+
+
$date
+
$e->{author}
+
$e->{revision}
+
\n
+ |
+ . join("
\n",
+ map {
+ qq|
$_|
+ } @files
+ )
+ . qq|
+
+ $msg
+
+ |;
});