Changeset 229

Show
Ignore:
Timestamp:
05/24/2006 04:27:53 PM
Author:
luedi
Message:

fixes #33:
If a shared file is deleted only the last deleted revision is tracked, which leads to a file does not exist error during dumpfile loading. We need to track the deletions dependent to the context, where the item lives, alias the parentphys.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Dirk/pin_handler/Vss2Svn/Dumpfile.pm

    r226 r229  
    4040         errors => [], 
    4141#         modified_cache => {}, 
    42 #         deleted_cache => {}, 
     42         deleted_cache => {}, 
    4343         version_cache => [], 
    4444         svn_items => {}, 
     
    123123    $self->{is_primary} = 1; 
    124124#    $self->{modified_cache} = {}; 
    125 #    $self->{deleted_cache} = {}; 
     125    $self->{deleted_cache} = {}; 
    126126    $self->{version_cache} = []; 
    127127 
     
    651651    push @$nodes, $node; 
    652652 
    653     $self->track_deleted($data->{physname}, $data->{revision_id}, 
    654                          $itempath); 
     653    $self->track_deleted($data->{parentphys}, $data->{physname}, 
     654                         $data->{revision_id}, $itempath); 
    655655 
    656656}  #  End _delete_handler 
     
    666666    $node->{action} = 'add'; 
    667667 
    668     my($copyrev, $copypath) = $self->last_deleted_rev_path($data->{physname}); 
     668    my($copyrev, $copypath) = $self->last_deleted_rev_path($data->{parentphys}, 
     669                                                           $data->{physname}); 
    669670#    my($copyrev, $copypath); 
    670671#    $copyrev = 
    671672#        $self->get_revision ($data->{physname}, $data->{version}, $data->{info}); 
    672     $copypath = $data->{info}; 
     673#    $copypath = $data->{info}; 
    673674 
    674675    if (!defined $copyrev || !defined $copypath) { 
     
    779780############################################################################### 
    780781sub track_deleted { 
    781     my($self, $physname, $revision, $path) = @_; 
    782  
    783     $self->{deleted_cache}->{$physname} = 
     782    my($self, $parentphys, $physname, $revision, $path) = @_; 
     783 
     784    $self->{deleted_cache}->{$parentphys}->{$physname} = 
    784785        { 
    785786         revision => $revision, 
     
    806807############################################################################### 
    807808sub last_deleted_rev_path { 
    808     my($self, $physname) = @_; 
    809  
    810     if (!defined($gDeleted{$physname})) { 
     809    my($self, $parentphys, $physname) = @_; 
     810 
     811    if (!defined($gDeleted{$parentphys})) { 
    811812        return (undef, undef); 
    812813    } 
    813814 
    814     return @{ $gDeleted{$physname} }{ qw(revision path) }; 
     815    if (!defined($gDeleted{$parentphys}->{$physname})) { 
     816        return (undef, undef); 
     817    } 
     818 
     819    return @{ $gDeleted{$parentphys}->{$physname} }{ qw(revision path) }; 
    815820}  #  End last_deleted_rev_path 
    816821 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.