git-svn: fix svn.pushmergeinfo handling of svn+ssh usernames.
authorJason Merrill <jason@redhat.com>
Fri, 15 Sep 2017 21:46:53 +0000 (17:46 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Sep 2017 01:06:22 +0000 (10:06 +0900)
Previously, svn dcommit of a merge with svn.pushmergeinfo set would
get error messages like "merge parent <X> for <Y> is on branch
svn+ssh://gcc.gnu.org/svn/gcc/trunk, which is not under the git-svn root
svn+ssh://jason@gcc.gnu.org/svn/gcc!"

So, let's call remove_username (as we do for svn info) before comparing
rooturl to branchurl.

Signed-off-by: Jason Merrill <jason@redhat.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-svn.perl
index d2404184ba2edc1ac330898ca610ad5e5df8d6c9..0b60c23e2fb716c928dd1b334926bccc25ab998e 100755 (executable)
@@ -931,6 +931,7 @@ sub cmd_dcommit {
                # information from different SVN repos, and paths
                # which are not underneath this repository root.
                my $rooturl = $gs->repos_root;
+               Git::SVN::remove_username($rooturl);
                foreach my $d (@$linear_refs) {
                        my %parentshash;
                        read_commit_parents(\%parentshash, $d);