[svk-commit] r2522 - trunk/lib/SVK/Editor

nobody at bestpractical.com nobody at bestpractical.com
Wed Aug 1 04:23:59 EDT 2007


Author: clkao
Date: Wed Aug  1 04:23:59 2007
New Revision: 2522

Modified:
   trunk/lib/SVK/Editor/Merge.pm

Log:
Don't leak horribly when merging deletes.

Submitted by: matthewd



Modified: trunk/lib/SVK/Editor/Merge.pm
==============================================================================
--- trunk/lib/SVK/Editor/Merge.pm	(original)
+++ trunk/lib/SVK/Editor/Merge.pm	Wed Aug  1 04:23:59 2007
@@ -740,6 +740,7 @@
 # Note that empty hash means don't delete - conflict.
 sub _check_delete_conflict {
     my ($self, $path, $rpath, $kind, $pdir, $pool) = @_;
+    $pool->default;
 
     my $localkind = $self->inspector->exist ($path, $pool);
 
@@ -760,8 +761,8 @@
 
     # it's dir...
 
-    my $dirmodified = $self->inspector->dirdelta ($path, $self->{base_root}, $rpath);
-    my $entries = $self->{base_root}->dir_entries ($rpath);
+    my $dirmodified = $self->inspector->dirdelta ($path, $self->{base_root}, $rpath, $pool);
+    my $entries = $self->{base_root}->dir_entries ($rpath, $pool);
 
     my $baton = $self->{storage_baton}{$path} = $self->{storage}->open_directory (
         $path, $self->{storage_baton}{$pdir}, $self->{cb_rev}->($path), $pool
@@ -777,13 +778,13 @@
                 $torm->{$name} = undef;
 	    }
             else {
-                $torm->{$name} = $self->_check_delete_conflict ($cpath, $crpath, $entry->kind, $path, $pool);
+                $torm->{$name} = $self->_check_delete_conflict ($cpath, $crpath, $entry->kind, $path, SVN::Pool->new($pool));
             }
             delete $dirmodified->{$name};
 	}
 	else { # dir or unmodified file
             $torm->{$name} = $self->_check_delete_conflict
-                ($cpath, $crpath, $entry->kind, $path, $pool);
+                ($cpath, $crpath, $entry->kind, $path, SVN::Pool->new($pool));
 	}
     }
 
@@ -791,7 +792,7 @@
         local $self->{tree_conflict} = 1;
         my ($cpath, $crpath) = ("$path/$node", "$rpath/$node");
         my $kind = $self->{base_root}->check_path ($crpath);
-        $torm->{$node} = $self->_check_delete_conflict ($cpath, $crpath, $kind, $path, $pool);
+        $torm->{$node} = $self->_check_delete_conflict ($cpath, $crpath, $kind, $path, SVN::Pool->new($pool));
     }
 
     $self->{storage}->close_directory ($baton, $pool);


More information about the svk-commit mailing list