{"thread":{"id":"33045","subject":"[PATCH] In inproperly merges, the ranges contains additional character \"*\"","startedAt":"2013-03-01T13:33:07Z","lastAt":"2013-03-01T21:37:24Z","messageCount":3,"participants":["Jan Pešta","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"210459","messageId":"002101ce1681$4f261090$ed7231b0$@certicon.cz","threadId":"33045","inReplyTo":null,"subject":"[PATCH] In inproperly merges, the ranges contains additional character \"*\"","fromName":"Jan Pešta","fromEmail":"jan.pesta@certicon.cz","sentAt":"2013-03-01T13:33:07Z","receivedAt":"2013-03-01T13:33:07Z","isPatch":true,"sender":{"key":"jan.pesta@certicon.cz","avatar":"https://avatars.githubusercontent.com/u/5998957?v=4"},"body":"In inproperly merges, the ranges contains additional character \"*\".\n\nSee http://www.open.collab.net/community/subversion/articles/merge-info.html\nExtract:\nThe range r30430:30435 that was added to 1.5.x in this merge has a '*'\nsuffix for 1.5.x\\www.\nThis '*' is the marker for a non-inheritable mergeinfo range.\nThe '*' means that only the path on which the mergeinfo is explicitly set\nhas had this range merged into it.\n\nSigned-off-by: Jan Pesta <jan.pesta@certicon.cz>\n---\n perl/Git/SVN.pm | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm\nindex 0ebc68a..6bd18e9 100644\n--- a/perl/Git/SVN.pm\n+++ b/perl/Git/SVN.pm\n@@ -1493,6 +1493,7 @@ sub lookup_svn_merge {\n \tmy @merged_commit_ranges;\n \t# find the tip\n \tfor my $range ( @ranges ) {\n+\t\t$range =~ s/[*]$//;\n \t\tmy ($bottom, $top) = split \"-\", $range;\n \t\t$top ||= $bottom;\n \t\tmy $bottom_commit = $gs->find_rev_after( $bottom, 1, $top );\n-- \n1.8.1.msysgit.1\n"},{"id":"210468","messageId":"7v1ubzgg4e.fsf@alter.siamese.dyndns.org","threadId":"33045","inReplyTo":"002101ce1681$4f261090$ed7231b0$@certicon.cz","subject":"Re: [PATCH] In inproperly merges, the ranges contains additional character \"*\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-03-01T17:54:41Z","receivedAt":"2013-03-01T17:54:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jan Pešta <jan.pesta@certicon.cz> writes:\n\n> In inproperly merges, the ranges contains additional character \"*\".\n\nThanks, but -ECANNOTPARSE.  What are \"inproperly merges\"?\n\n> See http://www.open.collab.net/community/subversion/articles/merge-info.html\n> Extract:\n> The range r30430:30435 that was added to 1.5.x in this merge has a '*'\n> suffix for 1.5.x\\www.\n> This '*' is the marker for a non-inheritable mergeinfo range.\n> The '*' means that only the path on which the mergeinfo is explicitly set\n> has had this range merged into it.\n\nIf I am reading the above correctly, blindly removing '*' from the\nrange will record a wrong merge in the result, because on the SVN\nside only the history of part of the tree is merged but we represent\nthe result as a full merge (and Git only records full merge of\nhistories), no?\n\nMy gut feeling tells me that failing the import, saying \"We cannot\nrepresent this history\", might be a more honest and safe thing to\ndo.\n\n> Signed-off-by: Jan Pesta <jan.pesta@certicon.cz>\n> ---\n>  perl/Git/SVN.pm | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm\n> index 0ebc68a..6bd18e9 100644\n> --- a/perl/Git/SVN.pm\n> +++ b/perl/Git/SVN.pm\n> @@ -1493,6 +1493,7 @@ sub lookup_svn_merge {\n>  \tmy @merged_commit_ranges;\n>  \t# find the tip\n>  \tfor my $range ( @ranges ) {\n> +\t\t$range =~ s/[*]$//;\n>  \t\tmy ($bottom, $top) = split \"-\", $range;\n>  \t\t$top ||= $bottom;\n>  \t\tmy $bottom_commit = $gs->find_rev_after( $bottom, 1, $top );\n"},{"id":"210477","messageId":"001001ce16c4$f7265a50$e5730ef0$@certicon.cz","threadId":"33045","inReplyTo":"7v1ubzgg4e.fsf@alter.siamese.dyndns.org","subject":"RE: [PATCH] In inproperly merges, the ranges contains additional character \"*\"","fromName":"Jan Pešta","fromEmail":"jan.pesta@certicon.cz","sentAt":"2013-03-01T21:37:24Z","receivedAt":"2013-03-01T21:37:24Z","isPatch":true,"sender":{"key":"jan.pesta@certicon.cz","avatar":"https://avatars.githubusercontent.com/u/5998957?v=4"},"body":"Hi Junio,\n\nYou have right. But I think if there is a \"*\" sign, it should be skiped, instead of failing on comparing string with a number.\n\nI will prepare another patch.\n\nRegards,\nJan\n\nKind regards / S pozdravem\n \nJan Pešta\nSW Engineer Sr.\n\nCertiCon a.s., www.certicon.cz\nVaclavska 12\n12000 Prague 2\nCzech Republic\n \nOffice Prague: +420 224 904 406\nMobile: +420 604 794 306\n \nE-mail: jan.pesta@certicon.cz\n\n-----Original Message-----\nFrom: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On Behalf Of Junio C Hamano\nSent: Friday, March 01, 2013 6:55 PM\nTo: Jan Pešta\nCc: git@vger.kernel.org; 'Matthieu Moy'\nSubject: Re: [PATCH] In inproperly merges, the ranges contains additional character \"*\"\n\nJan Pešta <jan.pesta@certicon.cz> writes:\n\n> In inproperly merges, the ranges contains additional character \"*\".\n\nThanks, but -ECANNOTPARSE.  What are \"inproperly merges\"?\n\n> See http://www.open.collab.net/community/subversion/articles/merge-info.html\n> Extract:\n> The range r30430:30435 that was added to 1.5.x in this merge has a '*'\n> suffix for 1.5.x\\www.\n> This '*' is the marker for a non-inheritable mergeinfo range.\n> The '*' means that only the path on which the mergeinfo is explicitly set\n> has had this range merged into it.\n\nIf I am reading the above correctly, blindly removing '*' from the\nrange will record a wrong merge in the result, because on the SVN\nside only the history of part of the tree is merged but we represent\nthe result as a full merge (and Git only records full merge of\nhistories), no?\n\nMy gut feeling tells me that failing the import, saying \"We cannot\nrepresent this history\", might be a more honest and safe thing to\ndo.\n\n> Signed-off-by: Jan Pesta <jan.pesta@certicon.cz>\n> ---\n>  perl/Git/SVN.pm | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm\n> index 0ebc68a..6bd18e9 100644\n> --- a/perl/Git/SVN.pm\n> +++ b/perl/Git/SVN.pm\n> @@ -1493,6 +1493,7 @@ sub lookup_svn_merge {\n>  \tmy @merged_commit_ranges;\n>  \t# find the tip\n>  \tfor my $range ( @ranges ) {\n> +\t\t$range =~ s/[*]$//;\n>  \t\tmy ($bottom, $top) = split \"-\", $range;\n>  \t\t$top ||= $bottom;\n>  \t\tmy $bottom_commit = $gs->find_rev_after( $bottom, 1, $top );\n"}]}