Changeset 298

Show
Ignore:
Timestamp:
02/10/2007 01:55:22 PM
Author:
luedi
Message:

track the ancestors of branched items. This is necessary in branch/pin situations, where we pin to a version prior to the branch. Since the branch itself does no have a valid path for versions prior to the branch point, we need to ask the ancestor for a valid path.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/script/Vss2Svn/ActionHandler.pm

    r296 r298  
    127127#         sharedphys => [], 
    128128         parents    => {}, 
     129         first_version => $version, 
    129130         last_version => $version, 
    130131         orphaned   => $orphaned, 
     
    374375 
    375376    # Now treat the new entry as a new addition 
    376     return $self->_add_handler(); 
     377    my $result = $self->_add_handler(); 
     378     
     379    # remember the ancestor of this item, we need it, when we later whant to refer to versions prior 
     380    # to the branch, e.g in PIN situations. 
     381    if ($result) { 
     382        $gPhysInfo{ $row->{physname} }->{ancestor} = $oldphysname; 
     383    } 
     384    $self->{info} = $oldphysname; 
     385 
     386    return $result; 
     387 
    377388 
    378389#    # Now create a new entry for this branched item 
     
    11211132    my($self, $physname, $parentphys, $version) = @_; 
    11221133     
     1134    # 0.) If the version we are looking for is prior to the first version of this 
     1135    #     item (e.g in a branch / Pin situation), we need to check the ancestor 
     1136    my $physinfo = $gPhysInfo{$physname}; 
     1137    if (defined $physinfo && 
     1138        $version < $physinfo->{first_version}) { 
     1139        return $self->_get_valid_path ($physinfo->{ancestor}, $parentphys, $version); 
     1140    } 
     1141     
    11231142    # 1.) We first check for non-deleted contexts, even though these item pathes  
    11241143    #     are valid. A deleted context means, that an item existed in this context  
  • trunk/script/Vss2Svn/Dumpfile.pm

    r297 r298  
    364364 
    365365    # branching is a no-op in SVN 
     366     
     367    # since it is possible, that we refer to version prior to the branch later, we 
     368    # need to copy all internal information about the ancestor to the child. 
     369    if (defined $data->{info}) { 
     370        $gVersion{$data->{physname}} = $gVersion{$data->{info}}; 
     371    } 
    366372 
    367373#    # if the file is copied later, we need to track, the revision of this branch 

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.