Index: vss2svn.pl
===================================================================
--- vss2svn.pl	(revision 323)
+++ vss2svn.pl	(working copy)
@@ -547,7 +547,7 @@
     # need to pull in all recs at once, since we'll be updating/deleting data
     $rows = $sth->fetchall_arrayref( {} );
 
-    my($childrecs, $child, $id, $depth);
+    my($childrecs, $child, $id);
     my @delchild = ();
 
     foreach $row (@$rows) {
@@ -558,7 +558,13 @@
                           . "'$row->{action_id}'");
         }
 
-        $depth = &GetPathDepth($row);
+        if (scalar @$childrecs < 1 && $row->{actiontype} eq 'ADD') {
+          &ThrowWarning("Missing ADD child, faking $row->{physname}");
+          my $fakerecs = &FakeAddRec($row);
+          foreach my $fake (@$fakerecs) {
+              &UpdateParentRec($row, $fake);
+          }
+        }
 
         foreach $child (@$childrecs) {
             &UpdateParentRec($row, $child);
@@ -676,6 +682,39 @@
 }  #  End GetChildRecs
 
 ###############################################################################
+#  FakeAddRec
+###############################################################################
+sub FakeAddRec {
+    my($parentrec, $parentdata) = @_;
+
+    $parentdata = 0 unless defined $parentdata;
+
+    my $sql = <<"EOSQL";
+SELECT
+    *
+FROM
+    PhysicalAction
+WHERE
+    parentdata = ?
+    AND physname = ?
+    AND actiontype = 'COMMIT'
+    AND author = ?
+ORDER BY
+    ABS(? - timestamp)
+LIMIT 1
+EOSQL
+
+
+    my $sth = $gCfg{dbh}->prepare($sql);
+    $sth->execute( $parentdata, @{ $parentrec }{qw(physname author timestamp)} );
+
+    my $one= $sth->fetchall_arrayref( {} );
+    $one->[0]{actiontype} = 'ADD';
+    return $one;
+}  #  End FakeAddRec
+
+
+###############################################################################
 #  UpdateParentRec
 ###############################################################################
 sub UpdateParentRec {
