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>
This commit is contained in:
Bryan Jacobs
2011-08-31 12:48:39 -04:00
committed by Eric Wong
parent 85f022e9c1
commit 98c4ab32f8
3 changed files with 19 additions and 2 deletions

View File

@ -559,6 +559,9 @@ sub cmd_dcommit {
}
my $expect_url = $url;
Git::SVN::remove_username($expect_url);
if (defined($_merge_info)) {
$_merge_info =~ tr{ }{\n};
}
while (1) {
my $d = shift @$linear_refs or last;
unless (defined $last_rev) {