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

Re: [PATCH] git-svn: check_cherry_pick should exclude commits already in our history

From
EWEric Wong <normalperson@yhbt.net>
Date
Sep 2, 2010, 21:47 UTC
Message-ID
<20100902214707.GA2761@dcvr.yhbt.net>
In-Reply-To
<1283446008-10858-1-git-send-email-stevenrwalter@gmail.com>
Steven Walter <stevenrwalter@gmail.com> wrote:
Show 7 quoted lines
> From: Steven Walter <swalter@lpdev.prtdev.lexmark.com>
> 
> The merge-base between @$parents and $merge_tip may have been reached
> through a merge commit.  This means that some commits that are ancestors
> of @$parents will not be ancestors of $merge_base.  The mergeinfo
> property will not list commits that are ancestors of @$parents, so we
> need to explicitly exclude them.
Thanks Steven, looks reasonable to me.  Sign-off?
Sam: any objections?
Acked-by: Eric Wong <normalperson@yhbt.net>
Show 29 quoted lines
> ---
>  git-svn.perl |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 7a72f75..70edf80 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -3087,9 +3087,10 @@ sub _rev_list {
>  sub check_cherry_pick {
>  	my $base = shift;
>  	my $tip = shift;
> +	my $parents = shift;
>  	my @ranges = @_;
>  	my %commits = map { $_ => 1 }
> -		_rev_list("--no-merges", $tip, "--not", $base);
> +		_rev_list("--no-merges", $tip, "--not", $base, @$parents);
>  	for my $range ( @ranges ) {
>  		delete @commits{_rev_list($range)};
>  	}
> @@ -3249,6 +3250,7 @@ sub find_extra_svn_parents {
>  		# double check that there are no missing non-merge commits
>  		my (@incomplete) = check_cherry_pick(
>  			$merge_base, $merge_tip,
> +			$parents,
>  			@$ranges,
>  		       );
>  
> -- 
Previous: Steven WalterNext: Steven Walter
Message 2 of 3 in “git-svn: check_cherry_pick should exclude commits already in our history”
  1. git-svn: check_cherry_pick should exclude commits already in our historySteven Walter, Sep 2, 2010
  2. Eric WongSep 2, 2010
  3. git-svn: check_cherry_pick should exclude commits already in our historySteven Walter, Sep 2, 2010

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.