diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-11-20 00:52:59 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-24 22:52:47 (GMT) |
commit | 414e569e453a49171b1f3db613f88378324104e8 (patch) | |
tree | a20484f495e60704c6fa5258bbef67d19c5fc702 /vcs-svn/svndump.c | |
parent | 1c7bb316169c700df0d1711555564f86c9cb9366 (diff) | |
download | git-414e569e453a49171b1f3db613f88378324104e8.zip git-414e569e453a49171b1f3db613f88378324104e8.tar.gz git-414e569e453a49171b1f3db613f88378324104e8.tar.bz2 |
vcs-svn: Reject path nodes without Node-action
It would be better to flag such errors and let the import proceed
anyway, but for now it is simpler not to worry about recovery
from such weird cases.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'vcs-svn/svndump.c')
-rw-r--r-- | vcs-svn/svndump.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index 4fdfcbb..0af8ac6 100644 --- a/vcs-svn/svndump.c +++ b/vcs-svn/svndump.c @@ -174,7 +174,8 @@ static void handle_node(void) if (node_ctx.srcRev) { repo_copy(node_ctx.srcRev, node_ctx.src, node_ctx.dst); - node_ctx.action = NODEACT_CHANGE; + if (node_ctx.action == NODEACT_ADD) + node_ctx.action = NODEACT_CHANGE; } if (mark && type == REPO_MODE_DIR) @@ -182,8 +183,10 @@ static void handle_node(void) if (node_ctx.action == NODEACT_CHANGE) node_ctx.type = repo_modify_path(node_ctx.dst, 0, mark); - else /* Node-action: add */ + else if (node_ctx.action == NODEACT_ADD) repo_add(node_ctx.dst, type, mark); + else + die("invalid dump: Node-path block lacks Node-action"); if (have_props) { const uint32_t old_mode = node_ctx.type; |