Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Guessed right, but practically wrong => let's clear the mess and fix things up?
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
darcs.pm
diff --git
a/IkiWiki/Plugin/darcs.pm
b/IkiWiki/Plugin/darcs.pm
index 0f63b8807902fbd0d3f2478b1a2c66cbf6066e24..1313041e78fe9c61588c04a53bae58e4e22d33d5 100644
(file)
--- a/
IkiWiki/Plugin/darcs.pm
+++ b/
IkiWiki/Plugin/darcs.pm
@@
-373,11
+373,14
@@
sub rcs_recentchanges ($) {
return @ret;
}
return @ret;
}
-sub rcs_diff ($) {
+sub rcs_diff ($
;$
) {
my $rev=shift;
my $rev=shift;
+ my $maxlines=shift;
my @lines;
my @lines;
- foreach my $line (silentsystem("darcs", "diff", "--match", "hash ".$rev)) {
+ my $repodir=$config{srcdir};
+ foreach my $line (`darcs diff --repodir $repodir --match 'hash $rev'`) {
if (@lines || $line=~/^diff/) {
if (@lines || $line=~/^diff/) {
+ last if defined $maxlines && @lines == $maxlines;
push @lines, $line."\n";
}
}
push @lines, $line."\n";
}
}