>> I'm getting a crash during conversion when GetPathDepth recurses >> itself forever (Perl exhausts its address space then segfaults). It >> appears to be caused by a pair of physicalaction rows which refer to >> each other > > Thanks Richard, although I wasn't able to test the patch since I > no longer have vss2svn installed on this box, it looks like a > reasonable approach and I can't think of any cases where your > additional check would cause an issue. I committed in r337.
Looks like I still haven't got it quite right. It no longer crashes, but there was another move of one of those directories after the previous testcase which doesn't get coalesced in MergeMoveData because their parentdata values are different. This results in the import getting confused, converting the first MOVE (which was the MOVE_FROM) into a SHARE, and making the second MOVE (was MOVE_TO) a move into /orphaned because it doesn't have an info column. Things get progressively worse from there, because the directory structure is incorrect and so future commits fail (in svnadmin load). Looking through the vss2svn history, it looks like in r313 (the patch which overloaded parentdata to contain the depth of the tree, not just a boolean) the GetChildRecs function was never updated to ignore the non-boolean aspect and so doesn't find the MOVE_TO record to merge with because it's got a different nonzero parentdata. Anyway, as before, here's a testcase and proposed patch for your review. Richard. -----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----- **** make-broken-db.bat setlocal set SSDIR=c:\vss\test\db ss create -YAdmin -I- $/first ss create -YAdmin -I- $/first/second ss create -YAdmin -I- $/third sleep 2 ss move -YAdmin $/first/second $/third/second sleep 2 ss move -YAdmin $/third/second $/first/second sleep 2 ss move -YAdmin $/third $/first/second/third sleep 2 ss move -YAdmin $/first/second/third $/third endlocal -----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----- **** vss2svn.pl.r337.patch Index: vss2svn.pl =================================================================== --- vss2svn.pl (revision 337) +++ vss2svn.pl (working copy) @@ -655,6 +655,7 @@ # we don't get the wrong row. $parentdata = 0 unless defined $parentdata; + $parentdata = 1 if $parentdata != 0; my $sql = <<"EOSQL"; SELECT @@ -662,7 +663,7 @@ FROM PhysicalAction WHERE - parentdata = ? + MIN(parentdata, 1) = ? AND physname = ? AND actiontype = ? AND author = ? _______________________________________________ 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