The file passed to rcs_getctime is already absolute, and it was
trying to stick the srcdir on the front.
Also, eliminated potentially unsafe shelling.
sub rcs_getctime ($) {
my ($file) = @_;
sub rcs_getctime ($) {
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",
my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v",
- "--style", "default", "$config{srcdir}/$file");
- open (my $out, "@cmdline |");
+ "--style", "default", $file);
+ open (my $out, "-|", @cmdline);
- my @log = mercurial_log($out);
+ my @log = (mercurial_log($out));
* attachment: Support Windows paths when taking basename of client-supplied
file name.
* theme: New plugin, allows easily theming a site via the underlay.
* attachment: Support Windows paths when taking basename of client-supplied
file name.
* theme: New plugin, allows easily theming a site via the underlay.
+ * mercurial: Fix buggy getctime code.
-- Joey Hess <joeyh@debian.org> Fri, 11 Jun 2010 13:39:15 -0400
-- Joey Hess <joeyh@debian.org> Fri, 11 Jun 2010 13:39:15 -0400