Changeset 224

Show
Ignore:
Timestamp:
05/22/2006 05:52:39 AM
Author:
luedi
Message:

reverted the delete/recover handling to the original track_deleted and last_deleted_rev_path handling.

Files:

Legend:

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

    r217 r224  
    2525 
    2626#our %gModified = (); 
    27 #our %gDeleted = (); 
     27our %gDeleted = (); 
    2828our %gVersion = (); 
    2929 
     
    176176    } 
    177177 
    178 #    my($physname, $cache); 
     178    my($physname, $cache); 
    179179#    while(($physname, $cache) = each %{ $self->{modified_cache} }) { 
    180180#        $gModified{$physname} = $cache; 
    181181#    } 
    182182  
    183 #    while(($physname, $cache) = each %{ $self->{deleted_cache} }) { 
    184 #        $gDeleted{$physname} = $cache; 
    185 #    } 
     183    while(($physname, $cache) = each %{ $self->{deleted_cache} }) { 
     184        $gDeleted{$physname} = $cache; 
     185    } 
    186186 
    187187    # track the version -> revision mapping for the file 
     
    651651    push @$nodes, $node; 
    652652 
    653 #    $self->track_deleted($data->{physname}, $data->{revision_id}
    654 #                         $itempath); 
     653    $self->track_deleted($data->{physname}, $data->{revision_id}-1
     654                         $itempath); 
    655655 
    656656}  #  End _delete_handler 
     
    666666    $node->{action} = 'add'; 
    667667 
    668 #    my($copyrev, $copypath) = $self->last_deleted_rev_path($data->{physname}); 
    669     my($copyrev, $copypath); 
    670     $copyrev = 
    671         $self->get_revision ($data->{physname}, $data->{version}, $data->{info}); 
     668    my($copyrev, $copypath) = $self->last_deleted_rev_path($data->{physname}); 
     669#    my($copyrev, $copypath); 
     670#    $copyrev = 
     671#        $self->get_revision ($data->{physname}, $data->{version}, $data->{info}); 
    672672    $copypath = $data->{info}; 
    673673 
     
    775775#}  #  End track_modified 
    776776 
    777 ################################################################################ 
    778 ##  track_deleted 
    779 ################################################################################ 
    780 #sub track_deleted { 
    781 #    my($self, $physname, $revision, $path) = @_; 
    782 
    783 #    $self->{deleted_cache}->{$physname} = 
    784 #        { 
    785 #         revision => $revision, 
    786 #         path => $path, 
    787 #        }; 
    788 
    789 #}  #  End track_deleted 
     777############################################################################### 
     778#  track_deleted 
     779############################################################################### 
     780sub track_deleted { 
     781    my($self, $physname, $revision, $path) = @_; 
     782 
     783    $self->{deleted_cache}->{$physname} = 
     784        { 
     785         revision => $revision, 
     786         path => $path, 
     787        }; 
     788 
     789}  #  End track_deleted 
    790790 
    791791################################################################################ 
     
    802802#}  #  End last_modified_rev_path 
    803803 
    804 ################################################################################ 
    805 ##  last_deleted_rev_path 
    806 ################################################################################ 
    807 #sub last_deleted_rev_path { 
    808 #    my($self, $physname) = @_; 
    809 
    810 #    if (!defined($gDeleted{$physname})) { 
    811 #        return (undef, undef); 
    812 #    } 
    813 
    814 #    return @{ $gDeleted{$physname} }{ qw(revision path) }; 
    815 #}  #  End last_deleted_rev_path 
     804############################################################################### 
     805#  last_deleted_rev_path 
     806############################################################################### 
     807sub last_deleted_rev_path { 
     808    my($self, $physname) = @_; 
     809 
     810    if (!defined($gDeleted{$physname})) { 
     811        return (undef, undef); 
     812    } 
     813 
     814    return @{ $gDeleted{$physname} }{ qw(revision path) }; 
     815}  #  End last_deleted_rev_path 
    816816 
    817817############################################################################### 

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.