summaryrefslogtreecommitdiff
path: root/t/t9010-svn-fe.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-12-06 16:19:32 -0600
committerJunio C Hamano <gitster@pobox.com>2010-12-07 16:04:56 -0800
commit9e8c532108b9078812f23c53a2df3509e7ce71bf (patch)
treee4216f58b13421e826f0a243f21cef7eec4b31a1 /t/t9010-svn-fe.sh
parent6b01b67658e2905b550739f1aee56a00911ca13c (diff)
downloadgit-9e8c532108b9078812f23c53a2df3509e7ce71bf.tar.gz
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 't/t9010-svn-fe.sh')
-rwxr-xr-xt/t9010-svn-fe.sh55
1 files changed, 55 insertions, 0 deletions
diff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh
index 7dc06707a1..87945073b0 100755
--- a/t/t9010-svn-fe.sh
+++ b/t/t9010-svn-fe.sh
@@ -580,6 +580,61 @@ test_expect_success 'property deltas supported' '
test_cmp expect actual
'
+test_expect_success 'properties on /' '
+ reinit_git &&
+ cat <<-\EOF >expect &&
+ OBJID
+ OBJID
+ :000000 100644 OBJID OBJID A greeting
+ EOF
+ sed -e "s/X$//" <<-\EOF >changeroot.dump &&
+ SVN-fs-dump-format-version: 3
+
+ Revision-number: 1
+ Prop-content-length: 10
+ Content-length: 10
+
+ PROPS-END
+
+ Node-path: greeting
+ Node-kind: file
+ Node-action: add
+ Text-content-length: 0
+ Prop-content-length: 10
+ Content-length: 10
+
+ PROPS-END
+
+ Revision-number: 2
+ Prop-content-length: 10
+ Content-length: 10
+
+ PROPS-END
+
+ Node-path: X
+ 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
+ EOF
+ test-svn-fe changeroot.dump >stream &&
+ git fast-import <stream &&
+ {
+ git rev-list HEAD |
+ git diff-tree --root --always --stdin |
+ sed "s/$_x40/OBJID/g"
+ } >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'deltas for typechange' '
reinit_git &&
cat >expect <<-\EOF &&