X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/67c6ff9b086d90b2dd777a722b26b05daa648479..1d1767192c80548755655cfe1ce8e503b392c7c1:/IkiWiki/Rcs/mercurial.pm diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm index a892ee975..bfe6ba49c 100644 --- a/IkiWiki/Rcs/mercurial.pm +++ b/IkiWiki/Rcs/mercurial.pm @@ -1,13 +1,13 @@ #!/usr/bin/perl +package IkiWiki; + use warnings; use strict; use IkiWiki; use Encode; use open qw{:utf8 :std}; -package IkiWiki; - sub mercurial_log($) { my $out = shift; my @infos; @@ -104,9 +104,6 @@ sub rcs_add ($) { # {{{ sub rcs_recentchanges ($) { #{{{ my ($num) = @_; - eval q{use CGI 'escapeHTML'}; - error($@) if $@; - my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v", "-l", $num, "--style", "default"); open (my $out, "@cmdline |"); @@ -142,7 +139,7 @@ sub rcs_recentchanges ($) { #{{{ rev => $info->{"changeset"}, user => $user, committype => "mercurial", - when => time - str2time($info->{"date"}), + when => str2time($info->{"date"}), message => [@message], pages => [@pages], }; @@ -151,7 +148,7 @@ sub rcs_recentchanges ($) { #{{{ return @ret; } #}}} -sub rcs_notify () { #{{{ +sub rcs_diff ($) { #{{{ # TODO } #}}} @@ -161,7 +158,7 @@ sub rcs_getctime ($) { #{{{ # 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', - "$config{srcdir}/$file"); + "--style", "default", "$config{srcdir}/$file"); open (my $out, "@cmdline |"); my @log = mercurial_log($out);