# [PATCH] GIT SVN

4 messages from 2013-03-01 to 2013-03-01. Participants: Jan Pešta, Matthieu Moy.
Thread: https://gitlist.dev/t/33044

## Jan Pešta, 2013-03-01 12:24

Subject: [PATCH] GIT SVN
Message-ID: <000301ce1677$c9eb3f80$5dc1be80$@certicon.cz>
URL: https://gitlist.dev/e/000301ce1677%24c9eb3f80%245dc1be80%24%40certicon.cz

```
Sorry,
My fault :)

Here is a patch atached.

Jan

Kind regards / S pozdravem
 
Jan Pešta
SW Engineer Sr.

CertiCon a.s., www.certicon.cz
Vaclavska 12
12000 Prague 2
Czech Republic
 
Office Prague: +420 224 904 406
Mobile: +420 604 794 306
 
E-mail: jan.pesta@certicon.cz

-----Original Message-----
From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On Behalf
Of Jan Pešta
Sent: Friday, March 01, 2013 11:29 AM
To: git@vger.kernel.org
Subject: [PATCH]

Hi,

I found a problem when using GIT-SVN.

In inproperly merges in SVN causes that the ranges contains additional
character "*". 

Attached patch fix this issue, I have it already tested for several months.

Regards,
Jan


Kind regards / S pozdravem
 

Jan Pešta
SW Engineer Sr.

CertiCon a.s., www.certicon.cz
Vaclavska 12
12000 Prague 2
Czech Republic
 
Office Prague: +420 224 904 406
Mobile: +420 604 794 306
 
E-mail: jan.pesta@certicon.cz


--
To unsubscribe from this list: send the line "unsubscribe git" in the body
of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html


diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index 0ebc68a..6bd18e9 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1493,6 +1493,7 @@ sub lookup_svn_merge {
 	my @merged_commit_ranges;
 	# find the tip
 	for my $range ( @ranges ) {
+		$range =~ s/[*]$//;
 		my ($bottom, $top) = split "-", $range;
 		$top ||= $bottom;
 		my $bottom_commit = $gs->find_rev_after( $bottom, 1, $top );

```

## Matthieu Moy, 2013-03-01 12:29

Subject: Re: [PATCH] GIT SVN
Message-ID: <vpqsj4fmhgu.fsf@grenoble-inp.fr>
URL: https://gitlist.dev/e/vpqsj4fmhgu.fsf%40grenoble-inp.fr
In-Reply-To: <000301ce1677$c9eb3f80$5dc1be80$@certicon.cz>

```
Jan Pešta <jan.pesta@certicon.cz> writes:

> Sorry,
> My fault :)
>
> Here is a patch atached.

Still, please, read Documentation/SubmittingPatches. Your patch cannot
be included as it is because of lack of sign-off.

Also, please write a commit message describing why this change is
needed. Where is this extra "*" comming from, and why do you need to
remove it?

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Jan Pešta, 2013-03-01 12:55

Subject: RE: [PATCH] GIT SVN
Message-ID: <001001ce167c$0f376f10$2da64d30$@certicon.cz>
URL: https://gitlist.dev/e/001001ce167c%240f376f10%242da64d30%24%40certicon.cz
In-Reply-To: <vpqsj4fmhgu.fsf@grenoble-inp.fr>

```
Hi again,

Finally I created patch according to document.

Please have a look on referenced site for more details.

Currently I have a problems in our project, where SVN is main repository and
merge-info contains "*" which causes troubles in SVN.pm.

Regards,
Jan

Kind regards / S pozdravem
 
Jan Pešta
SW Engineer Sr.

CertiCon a.s., www.certicon.cz
Vaclavska 12
12000 Prague 2
Czech Republic
 
Office Prague: +420 224 904 406
Mobile: +420 604 794 306
 
E-mail: jan.pesta@certicon.cz


-----Original Message-----
From: Matthieu Moy [mailto:Matthieu.Moy@grenoble-inp.fr] 
Sent: Friday, March 01, 2013 1:29 PM
To: Jan Pešta
Cc: git@vger.kernel.org
Subject: Re: [PATCH] GIT SVN

Jan Pešta <jan.pesta@certicon.cz> writes:

> Sorry,
> My fault :)
>
> Here is a patch atached.

Still, please, read Documentation/SubmittingPatches. Your patch cannot be
included as it is because of lack of sign-off.

Also, please write a commit message describing why this change is needed.
Where is this extra "*" comming from, and why do you need to remove it?

Thanks,

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/


>From 03aefff110cc46a82e87c01fed38ac6bb22b353b Mon Sep 17 00:00:00 2001
From: Jan Pesta <jan.pesta@certicon.cz>
Date: Fri, 1 Mar 2013 10:30:42 +0100
Subject: [PATCH] In inproperly merges, the ranges contains additional
 character "*".

See http://www.open.collab.net/community/subversion/articles/merge-info.html
Extract:
The range r30430:30435 that was added to 1.5.x in this merge has a '*' suffix for 1.5.x\www.
This '*' is the marker for a non-inheritable mergeinfo range.
The '*' means that only the path on which the mergeinfo is explicitly set has had this range merged into it.
---
 perl/Git/SVN.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index 0ebc68a..6bd18e9 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1493,6 +1493,7 @@ sub lookup_svn_merge {
 	my @merged_commit_ranges;
 	# find the tip
 	for my $range ( @ranges ) {
+		$range =~ s/[*]$//;
 		my ($bottom, $top) = split "-", $range;
 		$top ||= $bottom;
 		my $bottom_commit = $gs->find_rev_after( $bottom, 1, $top );
-- 
1.8.1.msysgit.1


```

## Matthieu Moy, 2013-03-01 13:07

Subject: Re: [PATCH] GIT SVN
Message-ID: <vpqip5bmfo6.fsf@grenoble-inp.fr>
URL: https://gitlist.dev/e/vpqip5bmfo6.fsf%40grenoble-inp.fr
In-Reply-To: <001001ce167c$0f376f10$2da64d30$@certicon.cz>

```
Jan Pešta <jan.pesta@certicon.cz> writes:

> Hi again,
>
> Finally I created patch according to document.

This is much better, but you still haven't taken into account some
important parts of Documentation/SubmittingPatches (the part about
attachments Vs inline patch, and the part about sign-off).

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```
