]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/monotone.pm
monotone: When getting the log, tell monotone how many entries we want, rather than...
[ikiwiki.git] / IkiWiki / Plugin / monotone.pm
index f31a8606bb4f664b6d626c345e668bf4e884dda3..3a8b267a393f5d69cdccc1577df795d2504ce73d 100644 (file)
@@ -525,13 +525,12 @@ sub rcs_recentchanges ($) { #{{{
        my $child = open(MTNLOG, "-|");
        if (! $child) {
                exec("mtn", "log", "--root=$config{mtnrootdir}", "--no-graph",
-                    "--brief") || error("mtn log failed to run");
+                    "--brief", "--last=$num") || error("mtn log failed to run");
        }
 
-       while (($num >= 0) and (my $line = <MTNLOG>)) {
+       while (my $line = <MTNLOG>) {
                if ($line =~ m/^($sha1_pattern)/) {
                        push @revs, $1;
-                       $num -= 1;
                }
        }
        close MTNLOG || debug("mtn log exited $?");