Changeset 234

Show
Ignore:
Timestamp:
05/30/2006 07:08:27 PM
Author:
luedi
Message:

partially reverted modification in [224]:

  • projects are restored to a revision one prior to the revision, when they where deleted
  • files are restored to a specific version.

This is necessary, since deleted files can be modified via a share.

Files:

Legend:

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

    r233 r234  
    523523    # project item, we must recover from the last known revision, which is 
    524524    # determined in the dumpfile handler 
    525     if ($row->{itemtype} == 1) { 
     525    if ($row->{itemtype} == 2) { 
    526526        $self->{version} = $physinfo->{last_version}; 
    527527    } 
  • branches/Dirk/pin_handler/Vss2Svn/Dumpfile.pm

    r233 r234  
    457457    $node->{action} = 'add'; 
    458458 
    459     my($copyrev, $copypath) = $self->last_deleted_rev_path($data->{parentphys}, 
    460                                                            $data->{physname}); 
    461 #    my($copyrev, $copypath); 
    462 #    $copyrev = 
    463 #        $self->get_revision ($data->{physname}, $data->{version}, $data->{info}); 
    464 #    $copypath = $data->{info}; 
    465  
     459    # for projects we want to go back to the revision just one before the deleted 
     460    # revision. For files, we need to go back to the specified revision, since 
     461    # the file could have been modified via a share. 
     462    my($copyrev, $copypath); 
     463    if (!defined ($data->{version}) { 
     464        ($copyrev, $copypath)= $self->last_deleted_rev_path($data->{parentphys}, 
     465                                                            $data->{physname}); 
     466        $copyrev -= 1; 
     467    } 
     468    else { 
     469        $copyrev = 
     470            $self->get_revision ($data->{physname}, $data->{version}, $data->{info}); 
     471        $copypath = $data->{info}; 
     472    } 
     473     
    466474    if (!defined $copyrev || !defined $copypath) { 
    467475        $self->add_error( 
     
    471479    } 
    472480 
    473     $node->{copyrev} = $copyrev - 1
     481    $node->{copyrev} = $copyrev
    474482    $node->{copypath} = $copypath; 
    475483 

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.