Jeff King | 32aedd5 | 2008-03-12 17:42:15 -0400 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
James Y Knight | 20b3d20 | 2007-05-24 00:37:06 -0400 | [diff] [blame] | 3 | test_description='test that git handles an svn repository with missing md5sums' |
| 4 | |
| 5 | . ./lib-git-svn.sh |
| 6 | |
| 7 | # Loading a node from a svn dumpfile without a Text-Content-Length |
| 8 | # field causes svn to neglect to store or report an md5sum. (it will |
| 9 | # calculate one if you had put Text-Content-Length: 0). This showed |
Ondřej Bílka | 98e023d | 2013-07-29 10:18:21 +0200 | [diff] [blame] | 10 | # up in a repository created with cvs2svn. |
James Y Knight | 20b3d20 | 2007-05-24 00:37:06 -0400 | [diff] [blame] | 11 | |
| 12 | cat > dumpfile.svn <<EOF |
| 13 | SVN-fs-dump-format-version: 1 |
| 14 | |
| 15 | Revision-number: 1 |
| 16 | Prop-content-length: 98 |
| 17 | Content-length: 98 |
| 18 | |
| 19 | K 7 |
| 20 | svn:log |
| 21 | V 0 |
| 22 | |
| 23 | K 10 |
| 24 | svn:author |
| 25 | V 4 |
| 26 | test |
| 27 | K 8 |
| 28 | svn:date |
| 29 | V 27 |
| 30 | 2007-05-06T12:37:01.153339Z |
| 31 | PROPS-END |
| 32 | |
| 33 | Node-path: md5less-file |
| 34 | Node-kind: file |
| 35 | Node-action: add |
| 36 | Prop-content-length: 10 |
| 37 | Content-length: 10 |
| 38 | |
| 39 | PROPS-END |
| 40 | |
| 41 | EOF |
| 42 | |
Bryan Donlan | f69e836 | 2008-05-04 01:37:59 -0400 | [diff] [blame] | 43 | test_expect_success 'load svn dumpfile' 'svnadmin load "$rawsvnrepo" < dumpfile.svn' |
James Y Knight | 20b3d20 | 2007-05-24 00:37:06 -0400 | [diff] [blame] | 44 | |
Nanako Shiraishi | f964732 | 2008-09-10 06:25:27 +0900 | [diff] [blame] | 45 | test_expect_success 'initialize git svn' 'git svn init "$svnrepo"' |
Nanako Shiraishi | 1364ff2 | 2008-09-08 19:02:08 +0900 | [diff] [blame] | 46 | test_expect_success 'fetch revisions from svn' 'git svn fetch' |
James Y Knight | 20b3d20 | 2007-05-24 00:37:06 -0400 | [diff] [blame] | 47 | test_done |