summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 85f022e)
raw | patch | inline | side by side (parent: 85f022e)
author | Bryan Jacobs <bjacobs@woti.com> | |
Wed, 31 Aug 2011 16:48:39 +0000 (12:48 -0400) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Thu, 1 Sep 2011 19:55:09 +0000 (19:55 +0000) |
"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>
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>
Documentation/git-svn.txt | patch | blob | history | |
git-svn.perl | patch | blob | history | |
t/t9158-git-svn-mergeinfo.sh | patch | blob | history |
index 6d4e1893b24b5f92b7dc1863aa30345ae8b9c301..e75fc191d35fa98eac96dbc2e0cbf3d6069e5737 100644 (file)
Add the given merge information during the dcommit
(e.g. `--mergeinfo="/branches/foo:1-10"`). All svn server versions can
store this information (as a property), and svn clients starting from
- version 1.5 can make use of it. 'git svn' currently does not use it
- and does not set it automatically.
+ version 1.5 can make use of it. To specify merge information from multiple
+ branches, use a single space character between the branches
+ (`--mergeinfo="/branches/foo:1-10 /branches/bar:3,5-6,8"`)
'branch'::
Create a branch in the SVN repository.
diff --git a/git-svn.perl b/git-svn.perl
index 32792d3ef344a85f97720f92b9488245a848354d..d0678372b9fd263d1ef896a04cb1fd0d8f1ba564 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
}
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) {
index 3ab43902b3412d887794b7ca41d37b67af657361..8c9539e1b47a817fff98bad1ed1a99e890386ec9 100755 (executable)
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