Interested in helping open source friends on HP-UX?
[git/mjg.git] / t / t9159-git-svn-no-parent-mergeinfo.sh
blob69e4815781c190207d406a4871a5dc5252690239
1 #!/bin/sh
2 test_description='git svn handling of root commits in merge ranges'
3 . ./lib-git-svn.sh
5 svn_ver="$(svn --version --quiet)"
6 case $svn_ver in
7 0.* | 1.[0-4].*)
8 skip_all="skipping git-svn test - SVN too old ($svn_ver)"
9 test_done
11 esac
13 test_expect_success 'test handling of root commits in merge ranges' '
14 mkdir -p init/trunk init/branches init/tags &&
15 echo "r1" > init/trunk/file.txt &&
16 svn_cmd import -m "initial import" init "$svnrepo" &&
17 svn_cmd co "$svnrepo" tmp &&
19 cd tmp &&
20 echo "r2" > trunk/file.txt &&
21 svn_cmd commit -m "Modify file.txt on trunk" &&
22 svn_cmd cp trunk@1 branches/a &&
23 svn_cmd commit -m "Create branch a from trunk r1" &&
24 svn_cmd propset svn:mergeinfo /trunk:1-2 branches/a &&
25 svn_cmd commit -m "Fake merge of trunk r2 into branch a" &&
26 mkdir branches/b &&
27 echo "r5" > branches/b/file2.txt &&
28 svn_cmd add branches/b &&
29 svn_cmd commit -m "Create branch b from thin air" &&
30 echo "r6" > branches/b/file2.txt &&
31 svn_cmd commit -m "Modify file2.txt on branch b" &&
32 svn_cmd cp branches/b@5 branches/c &&
33 svn_cmd commit -m "Create branch c from branch b r5" &&
34 svn_cmd propset svn:mergeinfo /branches/b:5-6 branches/c &&
35 svn_cmd commit -m "Fake merge of branch b r6 into branch c"
36 ) &&
37 git svn init -s "$svnrepo" &&
38 git svn fetch
41 test_done