summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 462e1f5)
raw | patch | inline | side by side (parent: 462e1f5)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Sat, 20 Nov 2010 00:49:17 +0000 (18:49 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 24 Nov 2010 22:51:43 +0000 (14:51 -0800) |
Take care of "Node-action: delete" as soon as possible, so we can stop
worrying about that case in the rest of the function.
Functional change: catch deletion nodes with features that would not
apply to them (text, properties, or origin data) and error out for
those cases.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
worrying about that case in the rest of the function.
Functional change: catch deletion nodes with features that would not
apply to them (text, properties, or origin data) and error out for
those cases.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn/svndump.c | patch | blob | history |
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 844076b669102a326ce17662fc5cdf3fe2f779fc..bc7002307369fceef983c88581c254b82ba3cc00 100644 (file)
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
if (node_ctx.textLength != LENGTH_UNKNOWN)
mark = next_blob_mark();
+ if (node_ctx.action == NODEACT_DELETE) {
+ if (mark || have_props || node_ctx.srcRev)
+ die("invalid dump: deletion node has "
+ "copyfrom info, text, or properties");
+ return repo_delete(node_ctx.dst);
+ }
+
if (have_props && node_ctx.propLength)
read_props();
if (mark && node_ctx.type == REPO_MODE_DIR)
die("invalid dump: directories cannot have text attached");
- if (node_ctx.action == NODEACT_DELETE) {
- repo_delete(node_ctx.dst);
- } else if (node_ctx.action == NODEACT_CHANGE ||
+ if (node_ctx.action == NODEACT_CHANGE ||
node_ctx.action == NODEACT_REPLACE) {
if (node_ctx.action == NODEACT_REPLACE &&
node_ctx.type == REPO_MODE_DIR)