]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/mercurial.pm
Merge remote branch 'smcv/unescaped-meta'
[git.ikiwiki.info.git] / IkiWiki / Plugin / mercurial.pm
index 82423286db0c9ccb03d52ea6ae146b25ad7ad0df..ea00a33648431daadb94efa398e47c3c224a6f89 100644 (file)
@@ -36,6 +36,7 @@ sub getsetup () {
                plugin => {
                        safe => 0, # rcs plugin
                        rebuild => undef,
                plugin => {
                        safe => 0, # rcs plugin
                        rebuild => undef,
+                       section => "rcs",
                },
                mercurial_wrapper => {
                        type => "string",
                },
                mercurial_wrapper => {
                        type => "string",
@@ -217,7 +218,7 @@ sub rcs_recentchanges ($) {
                push @ret, {
                        rev        => $info->{"changeset"},
                        user       => $user,
                push @ret, {
                        rev        => $info->{"changeset"},
                        user       => $user,
-                       committype => "mercurial",
+                       committype => "hg",
                        when       => str2time($info->{"date"}),
                        message    => [@message],
                        pages      => [@pages],
                        when       => str2time($info->{"date"}),
                        message    => [@message],
                        pages      => [@pages],
@@ -236,7 +237,7 @@ sub rcs_getctime ($) {
 
        # XXX filename passes through the shell here, should try to avoid
        # that just in case
 
        # XXX filename passes through the shell here, should try to avoid
        # that just in case
-       my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v", "-l", '1', 
+       my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v",
                "--style", "default", "$config{srcdir}/$file");
        open (my $out, "@cmdline |");
 
                "--style", "default", "$config{srcdir}/$file");
        open (my $out, "@cmdline |");
 
@@ -249,7 +250,7 @@ sub rcs_getctime ($) {
        eval q{use Date::Parse};
        error($@) if $@;
        
        eval q{use Date::Parse};
        error($@) if $@;
        
-       my $ctime = str2time($log[0]->{"date"});
+       my $ctime = str2time($log[$#log]->{"date"});
        return $ctime;
 }
 
        return $ctime;
 }