summaryrefslogtreecommitdiff
path: root/t/t9158-git-svn-mergeinfo.sh
diff options
context:
space:
mode:
authorBryan Jacobs <bjacobs@woti.com>2011-08-31 16:48:39 (GMT)
committerEric Wong <normalperson@yhbt.net>2011-09-01 19:55:09 (GMT)
commit98c4ab32f80d00d0254bfdcab8d934dcda6a7504 (patch)
treec129f11b84e4faf77db205fd41181fba67306e1d /t/t9158-git-svn-mergeinfo.sh
parent85f022e9c124ffeda31a50cab878e1418d694d87 (diff)
downloadgit-98c4ab32f80d00d0254bfdcab8d934dcda6a7504.zip
git-98c4ab32f80d00d0254bfdcab8d934dcda6a7504.tar.gz
git-98c4ab32f80d00d0254bfdcab8d934dcda6a7504.tar.bz2
git-svn: Teach dcommit --mergeinfo to handle multiple lines
"svn dcommit --mergeinfo" replaces the svn:mergeinfo property in an upstream SVN repository with the given text. The svn:mergeinfo property may contain commits originating on multiple branches, separated by newlines. Cause space characters in the mergeinfo to be replaced by newlines, allowing a user to create history representing multiple branches being merged into one. Update the corresponding documentation and add a test for the new functionality. Signed-off-by: Bryan Jacobs <bjacobs@woti.com> Acked-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9158-git-svn-mergeinfo.sh')
-rwxr-xr-xt/t9158-git-svn-mergeinfo.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t9158-git-svn-mergeinfo.sh b/t/t9158-git-svn-mergeinfo.sh
index 3ab4390..8c9539e 100755
--- a/t/t9158-git-svn-mergeinfo.sh
+++ b/t/t9158-git-svn-mergeinfo.sh
@@ -38,4 +38,17 @@ test_expect_success 'verify svn:mergeinfo' '
test "$mergeinfo" = "/branches/foo:1-10"
'
+test_expect_success 'change svn:mergeinfo multiline' '
+ touch baz &&
+ git add baz &&
+ git commit -m "baz" &&
+ git svn dcommit --mergeinfo="/branches/bar:1-10 /branches/other:3-5,8,10-11"
+'
+
+test_expect_success 'verify svn:mergeinfo multiline' '
+ mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk)
+ test "$mergeinfo" = "/branches/bar:1-10
+/branches/other:3-5,8,10-11"
+'
+
test_done