3 # Copyright (c) 2007, 2009 Sam Vilain
6 test_description='git-svn svn mergeinfo properties'
10 test_expect_success 'load svn dump' "
11 svnadmin load -q '$rawsvnrepo' \
12 < '$TEST_DIRECTORY/t9151/svn-mergeinfo.dump' &&
13 git svn init --minimize-url -R svnmerge \
14 -T trunk -b branches '$svnrepo' &&
18 test_expect_success 'all svn merges became git merge commits' '
19 unmarked=$(git rev-list --parents --all --grep=Merge |
20 grep -v " .* " | cut -f1 -d" ")
24 test_expect_success 'cherry picks did not become git merge commits' '
25 bad_cherries=$(git rev-list --parents --all --grep=Cherry |
26 grep " .* " | cut -f1 -d" ")
27 [ -z "$bad_cherries" ]
30 test_expect_success 'svn non-merge merge commits did not become git merge commits' '
31 bad_non_merges=$(git rev-list --parents --all --grep=non-merge |
32 grep " .* " | cut -f1 -d" ")
33 [ -z "$bad_non_merges" ]
36 test_expect_success 'commit made to merged branch is reachable from the merge' '
37 before_commit=$(git rev-list --all --grep="trunk commit before merging trunk to b2")
38 merge_commit=$(git rev-list --all --grep="Merge trunk to b2")
39 not_reachable=$(git rev-list -1 $before_commit --not $merge_commit)
40 [ -z "$not_reachable" ]
43 test_expect_success 'merging two branches in one commit is detected correctly' '
44 f1_commit=$(git rev-list --all --grep="make f1 branch from trunk")
45 f2_commit=$(git rev-list --all --grep="make f2 branch from trunk")
46 merge_commit=$(git rev-list --all --grep="Merge f1 and f2 to trunk")
47 not_reachable=$(git rev-list -1 $f1_commit $f2_commit --not $merge_commit)
48 [ -z "$not_reachable" ]
51 test_expect_failure 'everything got merged in the end' '
52 unmerged=$(git rev-list --all --not master)