aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/mercurial.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-03-20 16:24:19 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-03-20 16:24:19 -0400
commit2c86616a6a10397e47017cbccf0cbfd7992a497b (patch)
tree453338076847d1c946d3e1fedd05484277caeece /IkiWiki/Plugin/mercurial.pm
parentdeca107db5e8a0537c37cacce63cb1672155abaa (diff)
downloadikiwiki-2c86616a6a10397e47017cbccf0cbfd7992a497b.tar
ikiwiki-2c86616a6a10397e47017cbccf0cbfd7992a497b.tar.gz
fix rcs_getctime to return first, not last, change time
This was being buggy and returning the file's last change time, not its creation time.
Diffstat (limited to 'IkiWiki/Plugin/mercurial.pm')
-rw-r--r--IkiWiki/Plugin/mercurial.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm
index 6c4855e57..11fdec529 100644
--- a/IkiWiki/Plugin/mercurial.pm
+++ b/IkiWiki/Plugin/mercurial.pm
@@ -236,7 +236,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',
+ my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v",
"--style", "default", "$config{srcdir}/$file");
open (my $out, "@cmdline |");
@@ -249,7 +249,7 @@ sub rcs_getctime ($) {
eval q{use Date::Parse};
error($@) if $@;
- my $ctime = str2time($log[0]->{"date"});
+ my $ctime = str2time($log[$#log]->{"date"});
return $ctime;
}