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