{"thread":{"id":"2322","subject":"[PATCH 1/7] Using svn pools seems to solve the memory leak problem","startedAt":"2005-11-02T21:51:57Z","lastAt":"2005-11-02T22:38:57Z","messageCount":2,"participants":["Yaacov Akiba Slama","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"11037","messageId":"E1EXQWT-000504-Qw@localhost.localdomain","threadId":"2322","inReplyTo":null,"subject":"[PATCH 1/7] Using svn pools seems to solve the memory leak problem","fromName":"Yaacov Akiba Slama","fromEmail":"ya@slamail.org","sentAt":"2005-11-02T21:51:57Z","receivedAt":"2005-11-02T21:51:57Z","isPatch":true,"sender":{"key":"ya@slamail.org","avatar":null},"body":"Signed-off-by: Yaacov Akiba Slama <ya@slamail.org>\n\n---\n\n git-svnimport.perl |    8 ++++++--\n 1 files changed, 6 insertions(+), 2 deletions(-)\n\napplies-to: b12655de9a371d7d16f7e8318da8c5b0099c39bd\n4356b879b425644c436eacb6d43b523bab960704\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex 45b6a19..5bf9ef2 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -112,7 +112,9 @@ sub file {\n \t\t    DIR => File::Spec->tmpdir(), UNLINK => 1);\n \n \tprint \"... $rev $path ...\\n\" if $opt_v;\n-\teval { $self->{'svn'}->get_file($path,$rev,$fh); };\n+\tmy $pool = SVN::Pool->new();\n+\teval { $self->{'svn'}->get_file($path,$rev,$fh,$pool); };\n+\t$pool->clear;\n \tif($@) {\n \t\treturn undef if $@ =~ /Attempted to get checksum/;\n \t\tdie $@;\n@@ -674,7 +676,9 @@ sub commit_all {\n }\n \n while(++$current_rev <= $svn->{'maxrev'}) {\n-\t$svn->{'svn'}->get_log(\"/\",$current_rev,$current_rev,$current_rev,1,1,\\&_commit_all,\"\");\n+\tmy $pool=SVN::Pool->new;\n+\t$svn->{'svn'}->get_log(\"/\",$current_rev,$current_rev,1,1,1,\\&_commit_all,$pool);\n+\t$pool->clear;\n \tcommit_all();\n \tif($opt_l and not --$opt_l) {\n \t\tprint STDERR \"Stopping, because there is a memory leak (in the SVN library).\\n\";\n---\n0.99.9.GIT\n"},{"id":"11044","messageId":"7v64raptdq.fsf@assigned-by-dhcp.cox.net","threadId":"2322","inReplyTo":"E1EXQWT-000504-Qw@localhost.localdomain","subject":"Re: [PATCH 1/7] Using svn pools seems to solve the memory leak problem","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-02T22:38:57Z","receivedAt":"2005-11-02T22:38:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I see you are resending the previous round after splitting, but\ncould you be a bit more careful about the commit log?  One liner\ntitle that is self-sufficient (as opposed to just the initial\npart of one sentence, cut off at whereever your editor happened\nto decide to fold line), which goes to Subject:, and the body of\nthe message as a separate paragraph.\n\nEspecially something like this (5/7) does not make much sense:\n\n    From: Yaacov Akiba Slama <ya@slamail.org>\n    Subject: [PATCH 5/7] When copying files and/or directories from several branches in one single\n    Date: Wed, 02 Nov 2005 23:51:57 +0200\n\n    revision, all these branches are used as parents of the commit.\n"}]}