Eric Wong | baf5fa8 | 2009-01-11 16:51:11 -0800 | [diff] [blame] | 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: 4 |
| 45 | Text-content-md5: 912ec803b2ce49e4a541068d495ab570 |
| 46 | Content-length: 37 |
| 47 | |
| 48 | K 11 |
| 49 | svn:special |
| 50 | V 1 |
| 51 | * |
| 52 | PROPS-END |
| 53 | asdf |
| 54 | |
| 55 | Revision-number: 2 |
| 56 | Prop-content-length: 121 |
| 57 | Content-length: 121 |
| 58 | |
| 59 | K 7 |
| 60 | svn:log |
| 61 | V 13 |
| 62 | bar => doink |
| 63 | |
| 64 | K 10 |
| 65 | svn:author |
| 66 | V 12 |
| 67 | normalperson |
| 68 | K 8 |
| 69 | svn:date |
| 70 | V 27 |
| 71 | 2008-11-27T03:55:31.601672Z |
| 72 | PROPS-END |
| 73 | |
| 74 | Node-path: bar |
| 75 | Node-kind: file |
| 76 | Node-action: change |
| 77 | Text-content-length: 10 |
| 78 | Text-content-md5: 92ca4fe7a9721f877f765c252dcd66c9 |
| 79 | Content-length: 10 |
| 80 | |
| 81 | link doink |
| 82 | |
| 83 | EOF |
| 84 | ' |
| 85 | |
| 86 | test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x' |
| 87 | |
Johannes Sixt | 704a314 | 2009-03-04 22:38:24 +0100 | [diff] [blame] | 88 | test_expect_success SYMLINKS '"bar" is a symlink that points to "asdf"' ' |
Eric Wong | baf5fa8 | 2009-01-11 16:51:11 -0800 | [diff] [blame] | 89 | test -L x/bar && |
Elia Pinto | becd67f | 2016-01-12 11:49:30 +0000 | [diff] [blame] | 90 | (cd x && test xasdf = x"$(git cat-file blob HEAD:bar)") |
Eric Wong | baf5fa8 | 2009-01-11 16:51:11 -0800 | [diff] [blame] | 91 | ' |
| 92 | |
| 93 | test_expect_success 'get "bar" => symlink fix from svn' ' |
| 94 | (cd x && git svn rebase) |
| 95 | ' |
| 96 | |
Johannes Sixt | 704a314 | 2009-03-04 22:38:24 +0100 | [diff] [blame] | 97 | test_expect_success SYMLINKS '"bar" remains a proper symlink' ' |
Eric Wong | baf5fa8 | 2009-01-11 16:51:11 -0800 | [diff] [blame] | 98 | test -L x/bar && |
Elia Pinto | becd67f | 2016-01-12 11:49:30 +0000 | [diff] [blame] | 99 | (cd x && test xdoink = x"$(git cat-file blob HEAD:bar)") |
Eric Wong | baf5fa8 | 2009-01-11 16:51:11 -0800 | [diff] [blame] | 100 | ' |
| 101 | |
| 102 | test_done |