I was able to get them from my house. They are attached. Please be forwarned, I learned Perl making these fixes :) Bryan On Tue, Apr 22, 2008 at 10:24 AM, Nathan Kidd <[EMAIL PROTECTED]> wrote:
> nandinicvs wrote: > > > I have created the dumpfile for my repository ...and then used svnadmin > > load > > to create the repository out of the dumpfile.....I got the following > > error.... > > <<< Started new transaction, based on original revision 6345 > > iscomap ...svnadmin: File not found: revision 5831, path > > '/orphaned/_UDBBAAAA/..///....sie.discomap' > > > > any reasons why could this be and how to solve this???? > > > > Googling for: > > "svnadmin: File not found" vss2svn > > returns in the first few results this page: > http://www.pumacode.org/projects/vss2svn/wiki/FixingTheDumpfile > > This is a manual approach which is good if you don't have too many errors, > or don't want to re-run the conversion. If Bryan's patches fix the source > of the problem they're more ideal. > > -Nathan > > > _______________________________________________ > vss2svn-users mailing list > Project homepage: > http://www.pumacode.org/projects/vss2svn/ > Subscribe/Unsubscribe/Admin: > > http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org > Mailing list web interface (with searchable archives): > http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user > >
Index: script/vss2svn.pl =================================================================== --- script/vss2svn.pl (revision 339) +++ script/vss2svn.pl (working copy) @@ -722,6 +722,7 @@ # the MergeParentData function can not deal with this specific problem my($sth, $rows, $row); + $sth = $gCfg{dbh}->prepare('SELECT * FROM PhysicalAction ' . 'WHERE actiontype = "MOVE_FROM"'); $sth->execute(); @@ -738,19 +739,19 @@ my $source = undef; my $target = $row->{parentphys}; - if (scalar @$childrecs > 1) { - &ThrowWarning("Multiple child recs for parent MOVE rec " - . "'$row->{action_id}'"); - } - - if (scalar @$childrecs >= 1) { - # only merge MOVE records that have the same timestamp - if ($row->{timestamp} == @$childrecs[0]->{timestamp}) { - $source = @$childrecs[0]->{parentphys}; - &DeleteChildRec(@$childrecs[0]->{action_id}); - } - } - + my $chosenChildRecord; + my $childRecord; + + foreach $childRecord (@$childrecs) { + if (!(defined $chosenChildRecord) && $childRecord->{timestamp} == $row->{timestamp} && !($childRecord->{parentphys} eq $row->{parentphys})) { + $chosenChildRecord = $childRecord; + } + } + + if (defined $chosenChildRecord) { + $source = $chosenChildRecord->{parentphys}; + &DeleteChildRec($chosenChildRecord->{action_id}); + my $sql = <<"EOSQL"; UPDATE PhysicalAction @@ -764,7 +765,31 @@ my $update; $update = $gCfg{dbh}->prepare($sql); - $update->execute( $target, $source, $row->{action_id}); + update->execute( $target, $source, $row->{action_id}); + } else { + #the record did not have a matching MOVE_TO. call it a RESTORE +print "Changing $row->{action_id} to a RESTORE\n"; + my $sql = <<"EOSQL"; +UPDATE + PhysicalAction +SET + actiontype = 'RESTORE' +WHERE + action_id = ? +EOSQL + my $update; + $update = $gCfg{dbh}->prepare($sql); + + $update->execute( $row->{action_id}); + } + +# if (scalar @$childrecs >= 1) { +# # only merge MOVE records that have the same timestamp +# if ($row->{timestamp} == @$childrecs[0]->{timestamp}) { +# $source = @$childrecs[0]->{parentphys}; +# &DeleteChildRec(@$childrecs[0]->{action_id}); +# } +# } } @@ -784,7 +809,26 @@ $update->execute($row->{info}, $row->{parentphys}, $row->{action_id}); } + $sth = $gCfg{dbh}->prepare('SELECT * FROM PhysicalAction WHERE actiontype = "RESTORE"'); + $sth->execute(); + $rows = $sth->fetchall_arrayref( {} ); + + foreach $row (@$rows) { + #calculate last name of this file. Store it in $info + + my $sql = "SELECT * FROM PhysicalAction WHERE physname = ? AND timestamp < ? ORDER BY timestamp DESC"; + + $sth = $gCfg{dbh}->prepare($sql); + $sth->execute( $row->{physname}, $row->{timestamp} ); + + my $myOlderRecords = $sth->fetchall_arrayref( {} ); + if (scalar @$myOlderRecords > 0) { + my $update = $gCfg{dbh}->prepare('UPDATE PhysicalAction SET info = ? WHERE action_id = ?'); + $update->execute(@$myOlderRecords[0]->{itemname}, $row->{action_id}); + } + } + 1; } # End MergeMoveData Index: script/Vss2Svn/ActionHandler.pm =================================================================== --- script/Vss2Svn/ActionHandler.pm (revision 339) +++ script/Vss2Svn/ActionHandler.pm (working copy) @@ -113,7 +113,7 @@ # number here. So we don't need to add the item anyway. if (!defined $version ) { $self->{errmsg} .= "Attempt to add entry '$row->{physname}' with " - . "unknown version number (probably destroyed)\n"; + . "unknown version number (probably destroyed) parent: $row->{parentphys} itemtype: $row->{itemtype}\n"; $gOrphanedInfo {$row->{physname} } = 1; return 0; @@ -263,6 +263,10 @@ my $parentpath = $self->_get_current_parent_path (); my $itempath = $parentpath . $row->{itemname}; + # a SHARE *can* rename a file if the parent is no longer present. + $row->{info} = $row->{itemname}; + $self->_rename_handler(); + # 'sourceinfo' contains the source path my $sourceinfo = $self->_get_valid_path ($physname, $row->{parentphys}, $version); @@ -276,15 +280,16 @@ # return $self->_add_handler(); } + ## Can not MOVE from orphan if SHARE. The orphaned item may move later as part of a standard move. # if this is a share from orphan, and not a share+pin action either, we can treat it as a move - elsif (!defined $row->{version} && # share+pin? - defined $physinfo->{orphaned} # orphaned? -# scalar @{$physinfo->{order}} == 1 # only one parent? - ) { - $physinfo->{parents}->{'_' . $row->{physname}}->{deleted} = 1; - undef $physinfo->{orphaned}; - $self->{action} = 'MOVE'; - } +# elsif (!defined $row->{version} && # share+pin? +# defined $physinfo->{orphaned} # orphaned? +## scalar @{$physinfo->{order}} == 1 # only one parent? +# ) { +# $physinfo->{parents}->{'_' . $row->{physname}}->{deleted} = 1; +# undef $physinfo->{orphaned}; +# $self->{action} = 'MOVE'; +# } # track the addition of the new parent $self->_add_parent ($physname, $row->{parentphys}); @@ -410,7 +415,7 @@ # _move_handler ############################################################################### sub _move_handler { - my($self) = @_; + my($self, $oldName) = @_; my $row = $self->{row}; my $physname = $row->{physname}; @@ -439,11 +444,6 @@ } } - # '$sourceinfo' is the path for the old location (the move source); - my $sourceparent = $self->_get_parent_path ($row->{info}); - my $sourceinfo = $sourceparent . $row->{itemname}; - - # check the target path if (!defined ($row->{parentphys})) { # the target directory was destroyed, so there is no apropriate move @@ -452,6 +452,18 @@ $row->{parentphys} = '_' . $row->{physname}; } + # '$sourceinfo' is the path for the old location (the move source); + my $sourceparent = $self->_get_parent_path ($row->{info}); + my $sourceinfo; + if (defined $oldName) + { + $sourceinfo = $sourceparent . $oldName; + } + else + { + $sourceinfo = $sourceparent . $row->{itemname}; + } + # '$itempath' contains the move target path my $parentpath = $self->_get_current_parent_path (); my $itempath = $parentpath . $physinfo->{name}; # $row->{itemname}; @@ -494,9 +506,26 @@ $self->{action} = 'MOVE'; $row->{actiontype} = 'MOVE'; - $row->{info} = $row->{parentphys}; - $row->{parentphys} = '_' . $row->{physname}; - return $self->_move_handler (); +# $row->{info} = $row->{parentphys}; +# $row->{parentphys} = '_' . $row->{physname}; + + $gPhysInfo{ $row->{physname} } = + { + type => $row->{itemtype}, + name => $row->{itemname}, + parents => {}, + first_version => 1, + last_version => 1, + orphaned => 1, + was_binary => $row->{is_binary}, + }; + + my $newName = $row->{info}; + + # the MOVE handler uses info, but expects it to be undef for a restore action. + undef $row->{info}; + + return $self->_move_handler ($newName); } ############################################################################### Index: script/Vss2Svn/Dumpfile.pm =================================================================== --- script/Vss2Svn/Dumpfile.pm (revision 339) +++ script/Vss2Svn/Dumpfile.pm (working copy) @@ -205,9 +205,13 @@ return $self->_commit_handler ($itempath, $nodes, $data, $expdir); } else { - $self->add_error("Attempt to re-add directory '$itempath' at " - . "revision $data->{revision_id}, skipping action: possibly " - . "missing delete"); + #creating a new VSS database can cause a "ADD" for a "/" item which will fail. + if (!($itempath eq "/")) { + $self->add_error("Attempt to re-add directory '$itempath' at " + . "revision $data->{revision_id}, skipping action: possibly " + . "missing delete"); + } + return 0; } } @@ -219,9 +223,13 @@ return 0; } elsif ($success == 0) { - $self->add_error("Parent path missing while trying to add " - . "item '$itempath' at revision $data->{revision_id}: adding missing " - . "parents"); + # don't warn about adding missing parents for orphans. they are always missing. + if (!($itempath =~ m/^\/orphaned\/_.*/)) + { + $self->add_error("Parent path missing while trying to add " + . "item '$itempath' at revision $data->{revision_id}: adding missing " + . "parents"); + } $self->_create_svn_path ($nodes, $itempath); }
_______________________________________________ vss2svn-users mailing list Project homepage: http://www.pumacode.org/projects/vss2svn/ Subscribe/Unsubscribe/Admin: http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org Mailing list web interface (with searchable archives): http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user