From c59106d58a205be548986a37ebd09456a31f37bf Mon Sep 17 00:00:00 2001 From: toby Date: Fri, 11 May 2007 17:44:41 +0000 Subject: [PATCH] * Dumpfile.pm: Create the parent path of the target path of a move operation if it does not exist. Thanks to Stephen Lee and Patrick Kelsey for the patch. git-svn-id: http://vss2svn.googlecode.com/svn/trunk@310 2cfd5912-9055-84bd-9a12-e3c18a4b6e42 --- script/Vss2Svn/Dumpfile.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/script/Vss2Svn/Dumpfile.pm b/script/Vss2Svn/Dumpfile.pm index 50079fa..f941f27 100644 --- a/script/Vss2Svn/Dumpfile.pm +++ b/script/Vss2Svn/Dumpfile.pm @@ -407,7 +407,20 @@ sub _move_handler { . "missing recover; skipping"); return 0; } - + + my $success = $self->{repository}->exists_parent ($newpath); + if(!defined($success)) { + $self->add_error("Attempt to move item '$itempath' to '$newpath' at " + . "revision $data->{revision_id}, but path consistency failure at dest"); + return 0; + } + elsif ($success == 0) { + $self->add_error("Parent path missing while trying to move " + . "item '$itempath' to '$newpath' at " + . "revision $data->{revision_id}: adding missing parents"); + $self->_create_svn_path ($nodes, $newpath); + } + my $node = Vss2Svn::Dumpfile::Node->new(); $node->set_initial_props($itempath, $data); $node->{action} = 'add'; -- 2.11.4.GIT