Skip to content

Commit

Permalink
git-svn: update svn mergeinfo test suite
Browse files Browse the repository at this point in the history
Add a partial branch (e.g., a branch from a project subdirectory) to the
git-svn mergeinfo test repository.

Add a tag and a branch from that tag to the git-svn mergeinfo test repository.

Update the test script to expect a known failure in git-svn exposed by these
additions where merge info for partial branches is not preserved.

Signed-off-by: Andrew Myrick <amyrick@apple.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Andrew Myrick authored and Eric Wong committed Jan 23, 2010
1 parent a65f3c2 commit c79f118
Show file tree
Hide file tree
Showing 3 changed files with 485 additions and 127 deletions.
2 changes: 1 addition & 1 deletion t/t9151-svn-mergeinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test_expect_success 'svn non-merge merge commits did not become git merge commit
[ -z "$bad_non_merges" ]
'

test_expect_success 'everything got merged in the end' '
test_expect_failure 'everything got merged in the end' '
unmerged=$(git rev-list --all --not master)
[ -z "$unmerged" ]
'
Expand Down
65 changes: 63 additions & 2 deletions t/t9151/make-svnmerge-dump
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ i=0
cd foo
mkdir trunk
mkdir branches
svn add trunk branches
i=$(commit $i "Setup trunk and branches")
mkdir tags
svn add trunk branches tags
i=$(commit $i "Setup trunk, branches, and tags")

git cat-file blob 6683463e:Makefile > trunk/Makefile
svn add trunk/Makefile
Expand Down Expand Up @@ -155,6 +156,66 @@ svn merge ../branches/right --accept postpone
i=$(commit $i "non-merge right to trunk 2")
cd ..

say "Adding subdirectory to LEFT"
svn update
cd branches/left
mkdir subdir
echo "Yeehaw" > subdir/cowboy
svn add subdir
i=$(commit $i "add subdirectory to left branch")
cd ../../

say "Merging LEFT to TRUNK"
svn update
cd trunk
svn merge ../branches/left --accept postpone
i=$(commit $i "merge left to trunk")
cd ..

say "Make PARTIAL branch"
svn update
i=$(commit $i "make partial branch")
svn cp trunk/subdir branches/partial

say "Make a commit to PARTIAL"
svn update
cd branches/partial
echo "racecar" > palindromes
svn add palindromes
i=$(commit $i "partial update")
cd ../../

say "Merge PARTIAL to TRUNK"
svn update
cd trunk/subdir
svn merge ../../branches/partial --accept postpone
i=$(commit $i "merge partial to trunk")
cd ../../

say "Tagging trunk"
svn update
i=$(commit $i "tagging v1.0")
svn cp trunk tags/v1.0

say "Branching BUGFIX from v1.0"
svn update
i=$(commit $i "make bugfix branch from tag")
svn cp tags/v1.0 branches/bugfix

say "Make a commit to BUGFIX"
svn update
cd branches/bugfix/
echo "kayak" >> subdir/palindromes
i=$(commit $i "commit to bugfix")
cd ../../

say "Merge BUGFIX to TRUNK"
svn update
cd trunk
svn merge ../branches/bugfix/ --accept postpone
i=$(commit $i "Merge BUGFIX to TRUNK")
cd ..

cd ..
svnadmin dump foo.svn > svn-mergeinfo.dump

Expand Down
Loading

0 comments on commit c79f118

Please sign in to comment.