]>
Commit | Line | Data |
---|---|---|
baf5fa8a EW |
1 | #!/bin/sh |
2 | ||
3 | test_description='test that git handles an svn repository with empty symlinks' | |
4 | ||
7a98d9ab | 5 | TEST_FAILS_SANITIZE_LEAK=true |
baf5fa8a EW |
6 | . ./lib-git-svn.sh |
7 | test_expect_success 'load svn dumpfile' ' | |
8 | svnadmin load "$rawsvnrepo" <<EOF | |
9 | SVN-fs-dump-format-version: 2 | |
10 | ||
11 | UUID: 60780f9a-7df5-43b4-83ab-60e2c0673ef7 | |
12 | ||
13 | Revision-number: 0 | |
14 | Prop-content-length: 56 | |
15 | Content-length: 56 | |
16 | ||
17 | K 8 | |
18 | svn:date | |
19 | V 27 | |
20 | 2008-11-26T07:17:27.590577Z | |
21 | PROPS-END | |
22 | ||
23 | Revision-number: 1 | |
24 | Prop-content-length: 111 | |
25 | Content-length: 111 | |
26 | ||
27 | K 7 | |
28 | svn:log | |
29 | V 4 | |
30 | test | |
31 | K 10 | |
32 | svn:author | |
33 | V 12 | |
34 | normalperson | |
35 | K 8 | |
36 | svn:date | |
37 | V 27 | |
38 | 2008-11-26T07:18:03.511836Z | |
39 | PROPS-END | |
40 | ||
41 | Node-path: bar | |
42 | Node-kind: file | |
43 | Node-action: add | |
44 | Prop-content-length: 33 | |
45 | Text-content-length: 4 | |
46 | Text-content-md5: 912ec803b2ce49e4a541068d495ab570 | |
47 | Content-length: 37 | |
48 | ||
49 | K 11 | |
50 | svn:special | |
51 | V 1 | |
52 | * | |
53 | PROPS-END | |
54 | asdf | |
55 | ||
56 | Revision-number: 2 | |
57 | Prop-content-length: 121 | |
58 | Content-length: 121 | |
59 | ||
60 | K 7 | |
61 | svn:log | |
62 | V 13 | |
63 | bar => doink | |
64 | ||
65 | K 10 | |
66 | svn:author | |
67 | V 12 | |
68 | normalperson | |
69 | K 8 | |
70 | svn:date | |
71 | V 27 | |
72 | 2008-11-27T03:55:31.601672Z | |
73 | PROPS-END | |
74 | ||
75 | Node-path: bar | |
76 | Node-kind: file | |
77 | Node-action: change | |
78 | Text-content-length: 10 | |
79 | Text-content-md5: 92ca4fe7a9721f877f765c252dcd66c9 | |
80 | Content-length: 10 | |
81 | ||
82 | link doink | |
83 | ||
84 | EOF | |
85 | ' | |
86 | ||
87 | test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x' | |
88 | ||
704a3143 | 89 | test_expect_success SYMLINKS '"bar" is a symlink that points to "asdf"' ' |
baf5fa8a | 90 | test -L x/bar && |
becd67fd | 91 | (cd x && test xasdf = x"$(git cat-file blob HEAD:bar)") |
baf5fa8a EW |
92 | ' |
93 | ||
94 | test_expect_success 'get "bar" => symlink fix from svn' ' | |
95 | (cd x && git svn rebase) | |
96 | ' | |
97 | ||
704a3143 | 98 | test_expect_success SYMLINKS '"bar" remains a proper symlink' ' |
baf5fa8a | 99 | test -L x/bar && |
becd67fd | 100 | (cd x && test xdoink = x"$(git cat-file blob HEAD:bar)") |
baf5fa8a EW |
101 | ' |
102 | ||
103 | test_done |