summaryrefslogtreecommitdiff
path: root/t/t9151-svn-mergeinfo.sh
diff options
context:
space:
mode:
authorTuomas Suutari <tuomas.suutari@gmail.com>2010-02-22 07:57:21 (GMT)
committerEric Wong <normalperson@yhbt.net>2010-02-26 09:30:23 (GMT)
commit9560808f2ef5a34d2a69c454cfa6003a2f8467cb (patch)
tree6e8b75b6af40b8e5b8643bab54d26a4517685369 /t/t9151-svn-mergeinfo.sh
parentae5b370c9bbc161c68059cea7d9f7eb5b556e050 (diff)
downloadgit-9560808f2ef5a34d2a69c454cfa6003a2f8467cb.zip
git-9560808f2ef5a34d2a69c454cfa6003a2f8467cb.tar.gz
git-9560808f2ef5a34d2a69c454cfa6003a2f8467cb.tar.bz2
t9151: Add two new svn:mergeinfo test cases
When svn:mergeinfo contains two new parents in a specific order and one is ancestor of the other, it is possible that git-svn discards the wrong one. The first test case ("commit made to merged branch is reachable from the merge") proves this. The second test case ("merging two branches in one commit is detected correctly") is just for completeness, since there was no test for merging two (feature) branches to trunk in one commit. Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9151-svn-mergeinfo.sh')
-rwxr-xr-xt/t9151-svn-mergeinfo.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh
index 3569c62..353f543 100755
--- a/t/t9151-svn-mergeinfo.sh
+++ b/t/t9151-svn-mergeinfo.sh
@@ -33,6 +33,21 @@ test_expect_success 'svn non-merge merge commits did not become git merge commit
[ -z "$bad_non_merges" ]
'
+test_expect_failure 'commit made to merged branch is reachable from the merge' '
+ before_commit=$(git rev-list --all --grep="trunk commit before merging trunk to b2")
+ merge_commit=$(git rev-list --all --grep="Merge trunk to b2")
+ not_reachable=$(git rev-list -1 $before_commit --not $merge_commit)
+ [ -z "$not_reachable" ]
+ '
+
+test_expect_success 'merging two branches in one commit is detected correctly' '
+ f1_commit=$(git rev-list --all --grep="make f1 branch from trunk")
+ f2_commit=$(git rev-list --all --grep="make f2 branch from trunk")
+ merge_commit=$(git rev-list --all --grep="Merge f1 and f2 to trunk")
+ not_reachable=$(git rev-list -1 $f1_commit $f2_commit --not $merge_commit)
+ [ -z "$not_reachable" ]
+ '
+
test_expect_failure 'everything got merged in the end' '
unmerged=$(git rev-list --all --not master)
[ -z "$unmerged" ]