X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b20d4f6681c0f2ccebc8ea2d75414d3d194c5188..4b0689097157a93a3d68685fab1d0795f72660f4:/IkiWiki/Rcs/mercurial.pm diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm index 67002ac57..3a75b40c5 100644 --- a/IkiWiki/Rcs/mercurial.pm +++ b/IkiWiki/Rcs/mercurial.pm @@ -55,7 +55,7 @@ sub mercurial_log($) { } sub rcs_update () { #{{{ - my @cmdline = ("hg", "-R", "$config{srcdir}", "update"); + my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "update"); if (system(@cmdline) != 0) { warn "'@cmdline' failed: $!"; } @@ -72,16 +72,19 @@ sub rcs_commit ($$$;$$) { #{{{ $user = possibly_foolish_untaint($user); } elsif (defined $ipaddr) { - $user = "Anonymous from $ipaddr"; + $user = "Anonymous from ".possibly_foolish_untaint($ipaddr); } else { $user = "Anonymous"; } $message = possibly_foolish_untaint($message); + if (! length $message) { + $message = "no message given"; + } - my @cmdline = ("hg", "-R", "$config{srcdir}", "commit", - "-m", "$message", "-u", "$user"); + my @cmdline = ("hg", "-q", "-R", $config{srcdir}, "commit", + "-m", $message, "-u", $user); if (system(@cmdline) != 0) { warn "'@cmdline' failed: $!"; } @@ -92,7 +95,7 @@ sub rcs_commit ($$$;$$) { #{{{ sub rcs_add ($) { # {{{ my ($file) = @_; - my @cmdline = ("hg", "-R", "$config{srcdir}", "add", "$file"); + my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "add", "$config{srcdir}/$file"); if (system(@cmdline) != 0) { warn "'@cmdline' failed: $!"; } @@ -138,7 +141,7 @@ sub rcs_recentchanges ($) { #{{{ rev => $info->{"changeset"}, user => $user, committype => "mercurial", - when => str2time($info->{"date"}), + when => time - str2time($info->{"date"}), message => [@message], pages => [@pages], };