Commit 344db14d authored by IKEDA Soji's avatar IKEDA Soji
Browse files

tidyall

parent 8ac7be91
......@@ -8361,14 +8361,18 @@ sub do_editfile {
$file, subdir => $subdir);
}
 
$param->{'filecontent'} = Sympa::Tools::Text::slurp($param->{'filepath'});
$param->{'filecontent'} =
Sympa::Tools::Text::slurp($param->{'filepath'});
 
unless (defined $param->{'filecontent'}) {
wwslog('err', 'Failed to open file %s: %m', $param->{'filepath'});
Sympa::WWW::Report::reject_report_web(
'intern', 'cannot_open_file',
{'file' => $param->{'file_path'}}, $param->{'action'},
$list, $param->{'user'}{'email'},
'intern',
'cannot_open_file',
{'file' => $param->{'file_path'}},
$param->{'action'},
$list,
$param->{'user'}{'email'},
$robot
);
web_db_log(
......
......@@ -151,9 +151,9 @@ sub select_archive {
my $dh;
unless (opendir $dh, $directory) {
if ( -d $directory ) {
if (-d $directory) {
$log->syslog('err', 'Failed to open archive directory %s: %s',
$directory, $ERRNO);
$directory, $ERRNO);
}
return;
}
......@@ -221,7 +221,7 @@ sub html_fetch {
unless ($handle) {
if (-f $html_file) {
$log->syslog('err', 'Failed to open archive file %s: %s',
$html_file, $ERRNO);
$html_file, $ERRNO);
}
return undef;
}
......@@ -316,8 +316,11 @@ sub html_next {
unless ($self->{_html_metadatas}) {
my $dh;
unless (opendir $dh, $self->{arc_directory}) {
$log->syslog('err', 'Cannot open dir %s: %s', $self->{arc_directory},
$ERRNO);
$log->syslog(
'err',
'Cannot open dir %s: %s',
$self->{arc_directory}, $ERRNO
);
return undef;
}
$self->{_html_metadatas} = [
......
......@@ -782,7 +782,7 @@ if ($main::options{'dump'} or $main::options{'dump_users'}) {
}
if ($err >= 0) {
print STDERR "@{$result{'errors'}}";
exit 1;
exit 1;
}
exit 0;
......
......@@ -23,17 +23,19 @@ while (<FH>) {
close FH;
$/ = "\n";
open FH, "git log -m -r --name-only --no-color --pretty=raw -z @ARGV |" or die $!;
open FH, "git log -m -r --name-only --no-color --pretty=raw -z @ARGV |"
or die $!;
while (<FH>) {
chomp;
if (/^committer .*? (\d+) (?:[\-\+]\d+)$/) {
$commit_time = $1;
} elsif (s/\0\0commit [a-f0-9]{40}( \(from [a-f0-9]{40}\))?$// or s/\0$//) {
my @files = delete @ls{split(/\0/, $_)};
@files = grep { defined $_ } @files;
next unless @files;
map { s/^/$prefix/ } @files;
utime $commit_time, $commit_time, @files;
$commit_time = $1;
} elsif (s/\0\0commit [a-f0-9]{40}( \(from [a-f0-9]{40}\))?$// or s/\0$//)
{
my @files = delete @ls{split(/\0/, $_)};
@files = grep { defined $_ } @files;
next unless @files;
map {s/^/$prefix/} @files;
utime $commit_time, $commit_time, @files;
}
last unless %ls;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment