git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] In inproperly merges, the ranges contains additional character "*"

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 1, 2013, 17:54 UTC
Message-ID
<7v1ubzgg4e.fsf@alter.siamese.dyndns.org>
In-Reply-To
<002101ce1681$4f261090$ed7231b0$@certicon.cz>
Jan Pešta <jan.pesta@certicon.cz> writes:
> In inproperly merges, the ranges contains additional character "*".
Thanks, but -ECANNOTPARSE.  What are "inproperly merges"?
Show 7 quoted lines
> 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.

If I am reading the above correctly, blindly removing '*' from the range will record a wrong merge in the result, because on the SVN side only the history of part of the tree is merged but we represent the result as a full merge (and Git only records full merge of histories), no?

My gut feeling tells me that failing the import, saying "We cannot represent this history", might be a more honest and safe thing to do.

Show 17 quoted lines
> Signed-off-by: Jan Pesta <jan.pesta@certicon.cz>
> ---
>  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 );
Previous: Jan PeštaNext: Jan Pešta
Message 2 of 3 in “In inproperly merges, the ranges contains additional character "*"”
  1. In inproperly merges, the ranges contains additional character "*"Jan Pešta, Mar 1, 2013
  2. Junio C HamanoMar 1, 2013
  3. Jan PeštaMar 1, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.