summaryrefslogtreecommitdiff
path: root/t/t9151-svn-mergeinfo.sh
diff options
context:
space:
mode:
authorSam Vilain <sam@vilain.net>2009-12-19 16:20:30 (GMT)
committerEric Wong <normalperson@yhbt.net>2009-12-21 10:32:46 (GMT)
commit1d144aa25edbb4dcda88abbaef8f336108b8d788 (patch)
tree9ce6aba9865df053177a92095fcd003fc5a8b83a /t/t9151-svn-mergeinfo.sh
parentaf57b41d41d4b1f85dceac57015539e3e0306859 (diff)
downloadgit-1d144aa25edbb4dcda88abbaef8f336108b8d788.zip
git-1d144aa25edbb4dcda88abbaef8f336108b8d788.tar.gz
git-1d144aa25edbb4dcda88abbaef8f336108b8d788.tar.bz2
git-svn: expand the svn mergeinfo test suite, highlighting some failures
As shown, git-svn has some problems; not all svn merges are correctly detected, and cherry picks may incorrectly be detected as real merges. These test cases will be marked as _success once the relevant fixes are in. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9151-svn-mergeinfo.sh')
-rwxr-xr-xt/t9151-svn-mergeinfo.sh27
1 files changed, 21 insertions, 6 deletions
diff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh
index f57daf4..dc3478f 100755
--- a/t/t9151-svn-mergeinfo.sh
+++ b/t/t9151-svn-mergeinfo.sh
@@ -15,12 +15,27 @@ test_expect_success 'load svn dump' "
git svn fetch --all
"
-test_expect_success 'represent svn merges without intervening commits' "
- [ `git cat-file commit HEAD^1 | grep parent | wc -l` -eq 2 ]
- "
+test_expect_failure 'all svn merges became git merge commits' '
+ unmarked=$(git rev-list --parents --all --grep=Merge |
+ grep -v " .* " | cut -f1 -d" ")
+ [ -z "$unmarked" ]
+ '
-test_expect_success 'represent svn merges with intervening commits' "
- [ `git cat-file commit HEAD | grep parent | wc -l` -eq 2 ]
- "
+test_expect_failure 'cherry picks did not become git merge commits' '
+ bad_cherries=$(git rev-list --parents --all --grep=Cherry |
+ grep " .* " | cut -f1 -d" ")
+ [ -z "$bad_cherries" ]
+ '
+
+test_expect_success 'svn non-merge merge commits did not become git merge commits' '
+ bad_non_merges=$(git rev-list --parents --all --grep=non-merge |
+ grep " .* " | cut -f1 -d" ")
+ [ -z "$bad_non_merges" ]
+ '
+
+test_expect_failure 'everything got merged in the end' '
+ unmerged=$(git rev-list --all --not master)
+ [ -z "$unmerged" ]
+ '
test_done