git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Walter <stevenrwalter@gmail.com>
To: git@vger.kernel.org, normalperson@yhbt.net
Cc: Steven Walter <swalter@lpdev.prtdev.lexmark.com>
Subject: [PATCH] git-svn: check_cherry_pick should exclude commits already in our history
Date: Thu,  2 Sep 2010 12:46:48 -0400	[thread overview]
Message-ID: <1283446008-10858-1-git-send-email-stevenrwalter@gmail.com> (raw)

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.
---
 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,
 		       );
 
-- 
1.7.0.5.gbc75a

             reply	other threads:[~2010-09-02 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 16:46 Steven Walter [this message]
2010-09-02 21:47 ` [PATCH] git-svn: check_cherry_pick should exclude commits already in our history Eric Wong
2010-09-02 22:32   ` Steven Walter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283446008-10858-1-git-send-email-stevenrwalter@gmail.com \
    --to=stevenrwalter@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    --cc=swalter@lpdev.prtdev.lexmark.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).