Merge branch 'svn-maint-fixes' into svn-fixes
* svn-maint-fixes: Git::SVN::*: avoid premature FileHandle closure git-svn: fix localtime=true on non-glibc environmentsmaint
commit
28ed7b02dd
|
|
@ -12,6 +12,7 @@ use File::Path qw/mkpath/;
|
||||||
use IPC::Open3;
|
use IPC::Open3;
|
||||||
use Memoize; # core since 5.8.0, Jul 2002
|
use Memoize; # core since 5.8.0, Jul 2002
|
||||||
use POSIX qw(:signal_h);
|
use POSIX qw(:signal_h);
|
||||||
|
use Time::Local;
|
||||||
|
|
||||||
use Git qw(
|
use Git qw(
|
||||||
command
|
command
|
||||||
|
|
@ -1326,7 +1327,7 @@ sub parse_svn_date {
|
||||||
$ENV{TZ} = 'UTC';
|
$ENV{TZ} = 'UTC';
|
||||||
|
|
||||||
my $epoch_in_UTC =
|
my $epoch_in_UTC =
|
||||||
POSIX::strftime('%s', $S, $M, $H, $d, $m - 1, $Y - 1900);
|
Time::Local::timelocal($S, $M, $H, $d, $m - 1, $Y - 1900);
|
||||||
|
|
||||||
# Determine our local timezone (including DST) at the
|
# Determine our local timezone (including DST) at the
|
||||||
# time of $epoch_in_UTC. $Git::SVN::Log::TZ stored the
|
# time of $epoch_in_UTC. $Git::SVN::Log::TZ stored the
|
||||||
|
|
|
||||||
|
|
@ -321,6 +321,14 @@ sub apply_textdelta {
|
||||||
# (but $base does not,) so dup() it for reading in close_file
|
# (but $base does not,) so dup() it for reading in close_file
|
||||||
open my $dup, '<&', $fh or croak $!;
|
open my $dup, '<&', $fh or croak $!;
|
||||||
my $base = $::_repository->temp_acquire("git_blob_${$}_$suffix");
|
my $base = $::_repository->temp_acquire("git_blob_${$}_$suffix");
|
||||||
|
# close_file may call temp_acquire on 'svn_hash', but because of the
|
||||||
|
# call chain, if the temp_acquire call from close_file ends up being the
|
||||||
|
# call that first creates the 'svn_hash' temp file, then the FileHandle
|
||||||
|
# that's created as a result will end up in an SVN::Pool that we clear
|
||||||
|
# in SVN::Ra::gs_fetch_loop_common. Avoid that by making sure the
|
||||||
|
# 'svn_hash' FileHandle is already created before close_file is called.
|
||||||
|
my $tmp_fh = $::_repository->temp_acquire('svn_hash');
|
||||||
|
$::_repository->temp_release($tmp_fh, 1);
|
||||||
|
|
||||||
if ($fb->{blob}) {
|
if ($fb->{blob}) {
|
||||||
my ($base_is_link, $size);
|
my ($base_is_link, $size);
|
||||||
|
|
|
||||||
|
|
@ -394,6 +394,9 @@ sub longest_common_path {
|
||||||
sub gs_fetch_loop_common {
|
sub gs_fetch_loop_common {
|
||||||
my ($self, $base, $head, $gsv, $globs) = @_;
|
my ($self, $base, $head, $gsv, $globs) = @_;
|
||||||
return if ($base > $head);
|
return if ($base > $head);
|
||||||
|
# Make sure the cat_blob open2 FileHandle is created before calling
|
||||||
|
# SVN::Pool::new_default so that it does not incorrectly end up in the pool.
|
||||||
|
$::_repository->_open_cat_blob_if_needed;
|
||||||
my $gpool = SVN::Pool->new_default;
|
my $gpool = SVN::Pool->new_default;
|
||||||
my $ra_url = $self->url;
|
my $ra_url = $self->url;
|
||||||
my $reload_ra = sub {
|
my $reload_ra = sub {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue