]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Rcs/mercurial.pm
load all plugins when generating setup
[ikiwiki.git] / IkiWiki / Rcs / mercurial.pm
index 8c3f03e07145a84f38e80f515b0918be26c9e382..6452a0805c75bb9545690311904c43de27e016eb 100644 (file)
@@ -8,7 +8,27 @@ use IkiWiki;
 use Encode;
 use open qw{:utf8 :std};
 
-sub mercurial_log($) {
+hook(type => "getsetup", id => "mercurial", call => sub { #{{{
+       return
+               historyurl => {
+                       type => "string",
+                       default => "",
+                       example => "http://example.com:8000/log/tip/[[file]]",
+                       description => "url to hg serve'd repository, to show file history ([[file]] substituted)",
+                       safe => 1,
+                       rebuild => 1,
+               },
+               diffurl => {
+                       type => "string",
+                       default => "",
+                       example => "http://localhost:8000/?fd=[[r2]];file=[[file]]",
+                       description => "url to hg serve'd repository, to show diff ([[file]] and [[r2]] substituted)",
+                       safe => 1,
+                       rebuild => 1,
+               },
+}); #}}}
+
+sub mercurial_log ($) { #{{{
        my $out = shift;
        my @infos;
 
@@ -52,7 +72,7 @@ sub mercurial_log($) {
        close $out;
 
        return @infos;
-}
+} #}}}
 
 sub rcs_update () { #{{{
        my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "update");