diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-12-06 16:19:32 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-07 16:04:56 -0800 |
commit | 9e8c532108b9078812f23c53a2df3509e7ce71bf (patch) | |
tree | e4216f58b13421e826f0a243f21cef7eec4b31a1 /vcs-svn | |
parent | 6b01b67658e2905b550739f1aee56a00911ca13c (diff) | |
download | git-9e8c532108b9078812f23c53a2df3509e7ce71bf.tar.gz git-9e8c532108b9078812f23c53a2df3509e7ce71bf.tar.xz |
vcs-svn: Allow change nodes for root of tree (/)
It is not uncommon for a svn repository to include change records for
properties at the top level of the tracked tree:
Node-path:
Node-kind: dir
Node-action: change
Prop-delta: true
Prop-content-length: 43
Content-length: 43
K 10
svn:ignore
V 11
build-area
PROPS-END
Unfortunately a recent svn-fe change (vcs-svn: More dump format sanity
checks, 2010-11-19) causes such nodes to be rejected with the error
message
fatal: invalid dump: path to be modified is missing
The repo_tree module does not keep a dirent for the root of the tree.
Add a block to the dump parser to take care of this case.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'vcs-svn')
-rw-r--r-- | vcs-svn/svndump.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index c71a57599..1669d0fa5 100644 --- a/vcs-svn/svndump.c +++ b/vcs-svn/svndump.c @@ -221,7 +221,10 @@ static void handle_node(void) } if (mark && type == REPO_MODE_DIR) die("invalid dump: directories cannot have text attached"); - if (node_ctx.action == NODEACT_CHANGE) { + if (node_ctx.action == NODEACT_CHANGE && !~*node_ctx.dst) { + if (type != REPO_MODE_DIR) + die("invalid dump: root of tree is not a regular file"); + } else if (node_ctx.action == NODEACT_CHANGE) { uint32_t mode = repo_modify_path(node_ctx.dst, 0, mark); if (!mode) die("invalid dump: path to be modified is missing"); |