+ my ($file) = @_;
+
+ # 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', $file);
+ open (my $out, "@cmdline |");
+
+ my @log = mercurial_log($out);
+
+ if (length @log < 1) {
+ return 0;
+ }
+
+ eval q{use Date::Parse};
+ error($@) if $@;
+
+ my $ctime = str2time($log[0]->{"date"});
+ return $ctime;