summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 780a2f5)
raw | patch | inline | side by side (parent: 780a2f5)
author | Eric Wong <normalperson@yhbt.net> | |
Fri, 19 Jan 2007 02:22:18 +0000 (18:22 -0800) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Feb 2007 08:57:09 +0000 (00:57 -0800) |
Note: this can cause problems with Perl's reference counting GC,
so I'm disabling Git::SVN::Ra::DESTROY. If we notice more
problems down the line, we can disable this enhancement.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
so I'm disabling Git::SVN::Ra::DESTROY. If we notice more
problems down the line, we can disable this enhancement.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index b5a4cb05a6d068034a539c4d7ac9bc24691bcb4a..4084e0657b993134e513dc573c25e1edfb5990d0 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
use strict;
use warnings;
my ($can_do_switch);
+my %RA;
BEGIN {
# enforce temporary pool usage for some simple functions
sub new {
my ($class, $url) = @_;
+ $url =~ s!/+$!!;
+ return $RA{$url} if $RA{$url};
+
SVN::_Core::svn_config_ensure($config_dir, undef);
my ($baton, $callbacks) = SVN::Core::auth_open_helper([
SVN::Client::get_simple_provider(),
$self->{svn_path} = $url;
$self->{repos_root} = $self->get_repos_root;
$self->{svn_path} =~ s#^\Q$self->{repos_root}\E/*##;
- bless $self, $class;
+ $RA{$url} = bless $self, $class;
}
sub DESTROY {
- my $self = shift;
- $self->{pool}->clear if $self->{pool};
- $self->SUPER::DESTROY(@_);
+ # do not call the real DESTROY since we store ourselves in %RA
}
sub dup {