summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Rcs')
-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' },