{"thread":{"id":"24949","subject":"[PATCH] git-svn: check_cherry_pick should exclude commits already in our history","startedAt":"2010-09-02T16:46:48Z","lastAt":"2010-09-02T22:32:06Z","messageCount":3,"participants":["Steven Walter","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"149659","messageId":"1283446008-10858-1-git-send-email-stevenrwalter@gmail.com","threadId":"24949","inReplyTo":null,"subject":"[PATCH] git-svn: check_cherry_pick should exclude commits already in our history","fromName":"Steven Walter","fromEmail":"stevenrwalter@gmail.com","sentAt":"2010-09-02T16:46:48Z","receivedAt":"2010-09-02T16:46:48Z","isPatch":true,"sender":{"key":"stevenrwalter@gmail.com","avatar":"https://avatars.githubusercontent.com/u/79127?v=4"},"body":"From: Steven Walter <swalter@lpdev.prtdev.lexmark.com>\n\nThe merge-base between @$parents and $merge_tip may have been reached\nthrough a merge commit.  This means that some commits that are ancestors\nof @$parents will not be ancestors of $merge_base.  The mergeinfo\nproperty will not list commits that are ancestors of @$parents, so we\nneed to explicitly exclude them.\n---\n git-svn.perl |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 7a72f75..70edf80 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3087,9 +3087,10 @@ sub _rev_list {\n sub check_cherry_pick {\n \tmy $base = shift;\n \tmy $tip = shift;\n+\tmy $parents = shift;\n \tmy @ranges = @_;\n \tmy %commits = map { $_ => 1 }\n-\t\t_rev_list(\"--no-merges\", $tip, \"--not\", $base);\n+\t\t_rev_list(\"--no-merges\", $tip, \"--not\", $base, @$parents);\n \tfor my $range ( @ranges ) {\n \t\tdelete @commits{_rev_list($range)};\n \t}\n@@ -3249,6 +3250,7 @@ sub find_extra_svn_parents {\n \t\t# double check that there are no missing non-merge commits\n \t\tmy (@incomplete) = check_cherry_pick(\n \t\t\t$merge_base, $merge_tip,\n+\t\t\t$parents,\n \t\t\t@$ranges,\n \t\t       );\n \n-- \n1.7.0.5.gbc75a\n"},{"id":"149725","messageId":"20100902214707.GA2761@dcvr.yhbt.net","threadId":"24949","inReplyTo":"1283446008-10858-1-git-send-email-stevenrwalter@gmail.com","subject":"Re: [PATCH] git-svn: check_cherry_pick should exclude commits already in our history","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-09-02T21:47:55Z","receivedAt":"2010-09-02T21:47:55Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Steven Walter <stevenrwalter@gmail.com> wrote:\n> From: Steven Walter <swalter@lpdev.prtdev.lexmark.com>\n> \n> The merge-base between @$parents and $merge_tip may have been reached\n> through a merge commit.  This means that some commits that are ancestors\n> of @$parents will not be ancestors of $merge_base.  The mergeinfo\n> property will not list commits that are ancestors of @$parents, so we\n> need to explicitly exclude them.\n\nThanks Steven, looks reasonable to me.  Sign-off?\n\nSam: any objections?\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> ---\n>  git-svn.perl |    4 +++-\n>  1 files changed, 3 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 7a72f75..70edf80 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -3087,9 +3087,10 @@ sub _rev_list {\n>  sub check_cherry_pick {\n>  \tmy $base = shift;\n>  \tmy $tip = shift;\n> +\tmy $parents = shift;\n>  \tmy @ranges = @_;\n>  \tmy %commits = map { $_ => 1 }\n> -\t\t_rev_list(\"--no-merges\", $tip, \"--not\", $base);\n> +\t\t_rev_list(\"--no-merges\", $tip, \"--not\", $base, @$parents);\n>  \tfor my $range ( @ranges ) {\n>  \t\tdelete @commits{_rev_list($range)};\n>  \t}\n> @@ -3249,6 +3250,7 @@ sub find_extra_svn_parents {\n>  \t\t# double check that there are no missing non-merge commits\n>  \t\tmy (@incomplete) = check_cherry_pick(\n>  \t\t\t$merge_base, $merge_tip,\n> +\t\t\t$parents,\n>  \t\t\t@$ranges,\n>  \t\t       );\n>  \n> -- \n"},{"id":"149728","messageId":"1283466726-12643-1-git-send-email-stevenrwalter@gmail.com","threadId":"24949","inReplyTo":"20100902214707.GA2761@dcvr.yhbt.net","subject":"[PATCH] git-svn: check_cherry_pick should exclude commits already in our history","fromName":"Steven Walter","fromEmail":"stevenrwalter@gmail.com","sentAt":"2010-09-02T22:32:06Z","receivedAt":"2010-09-02T22:32:06Z","isPatch":true,"sender":{"key":"stevenrwalter@gmail.com","avatar":"https://avatars.githubusercontent.com/u/79127?v=4"},"body":"From: Steven Walter <swalter@lpdev.prtdev.lexmark.com>\n\nThe merge-base between @$parents and $merge_tip may have been reached\nthrough a merge commit.  This means that some commits that are ancestors\nof @$parents will not be ancestors of $merge_base.  The mergeinfo\nproperty will not list commits that are ancestors of @$parents, so we\nneed to explicitly exclude them.\n\nSigned-off-by: Steven Walter <stevenrwalter@gmail.com>\nAcked-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 9b046b6..c7c4dcd 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3118,9 +3118,10 @@ sub _rev_list {\n sub check_cherry_pick {\n \tmy $base = shift;\n \tmy $tip = shift;\n+\tmy $parents = shift;\n \tmy @ranges = @_;\n \tmy %commits = map { $_ => 1 }\n-\t\t_rev_list(\"--no-merges\", $tip, \"--not\", $base);\n+\t\t_rev_list(\"--no-merges\", $tip, \"--not\", $base, @$parents);\n \tfor my $range ( @ranges ) {\n \t\tdelete @commits{_rev_list($range)};\n \t}\n@@ -3296,6 +3297,7 @@ sub find_extra_svn_parents {\n \t\t# double check that there are no missing non-merge commits\n \t\tmy (@incomplete) = check_cherry_pick(\n \t\t\t$merge_base, $merge_tip,\n+\t\t\t$parents,\n \t\t\t@$ranges,\n \t\t       );\n \n-- \n1.7.0.4\n"}]}