aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-05 17:40:07 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-05 17:40:07 +0000
commit97e6f39dd0643ec9ce2f9d3488941d9e768c4392 (patch)
tree252565bbc731466fd1996d207955159ba9091156 /IkiWiki
parent2379299a24c83b95f21a390b754f6aaafa2484f9 (diff)
downloadikiwiki-97e6f39dd0643ec9ce2f9d3488941d9e768c4392.tar
ikiwiki-97e6f39dd0643ec9ce2f9d3488941d9e768c4392.tar.gz
* Patch from Faidon to use svn --limit when possible for recentchanges,
speeds up recentchanges a lot for wikis with more history.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Rcs/svn.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm
index be4106a02..71517f215 100644
--- a/IkiWiki/Rcs/svn.pm
+++ b/IkiWiki/Rcs/svn.pm
@@ -105,9 +105,15 @@ sub rcs_recentchanges ($) { #{{{
eval q{use Date::Parse};
eval q{use Time::Duration};
eval q{use XML::Simple};
-
+
+ # --limit is only supported on Subversion 1.2.0+
+ my $svn_version=`svn --version -q`;
+ my $svn_limit='';
+ $svn_limit="--limit $num"
+ if $svn_version =~ /\d\.(\d)\.\d/ && $1 >= 2;
+
my $svn_url=svn_info("URL", $config{srcdir});
- my $xml = XMLin(scalar `svn --xml -v log '$svn_url'`,
+ my $xml = XMLin(scalar `svn $svn_limit --xml -v log '$svn_url'`,
ForceArray => [ 'logentry', 'path' ],
GroupTags => { paths => 'path' },
KeyAttr => { path => 'content' },