Hello,
 
I am having very good success in migrating a 310 MiB VSS database that has a 
number of 'destroyed' items and incorrect timestamps to svn, but only with the 
following patch to DumpFile.pm.  The symptom that prompted me to make this 
change was a "file not found" error from svnadmin load when it encountered an 
entry in the dumpfile that was attempting to copy to a subdirectory in the 
orphaned directory whose parent directories had not yet been created.  I 
haven't fully investigated the exact sequence of events that leads to this 
condition, since the intuitively simple (perhaps naive) patch below seems to 
have been quite successful for me.  The gist of the change is this: if the 
parent path of the target path of a move operation does not exist, then create 
it (code largely copied from the add handler).
 
I am still working on a thorough review of the results of the conversion, but 
so far a number of diffs of projects at head and at a few labels are coming up 
clean.
 
 
Index: script/Vss2Svn/Dumpfile.pm
===================================================================
--- script/Vss2Svn/Dumpfile.pm  (revision 309)
+++ script/Vss2Svn/Dumpfile.pm  (working copy)
@@ -408,6 +408,21 @@
         return 0;
     }
+### HACK
+    my $success = $self->{repository}->exists_parent ($itempath);
+    if(!defined($success)) {
+        $self->add_error("Path consistency failure while trying to move "
+            . "item '$oldpath' to '$itempath' at revision 
$data->{revision_id}; skipping");
+        return 0;
+    }
+    elsif ($success == 0) {
+        $self->add_error("Parent path missing while trying to move "
+            . "item '$oldpath' to '$itempath' at revision 
$data->{revision_id}: adding missing "
+            . "parents");
+        $self->_create_svn_path ($nodes, $itempath);
+    }
+### ENDHACK
+
     my $node = Vss2Svn::Dumpfile::Node->new();
     $node->set_initial_props($itempath, $data);
     $node->{action} = 'add';

 
Regards,
Patrick
_______________________________________________
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

Reply via email to