git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Luke Diamand <luke@diamand.org>,
	Yang Zhao <yang.zhao@skyboxlabs.com>,
	Andrey Mazo <ahippo@yandex.com>
Cc: git@vger.kernel.org, Ben Keene <seraphire@gmail.com>,
	"Ben Keene via GitGitGadget" <gitgitgadget@gmail.com>
Subject: Re: [PATCH] git-p4.py: fix --prepare-p4-only error with multiple commits
Date: Fri, 01 May 2020 11:39:50 -0700	[thread overview]
Message-ID: <xmqq1ro3mrd5.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.775.git.git.1588352952840.gitgitgadget@gmail.com> (Ben Keene via GitGitGadget's message of "Fri, 01 May 2020 17:09:12 +0000")

"Ben Keene via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Ben Keene <seraphire@gmail.com>
>
> When using git p4 submit with the --prepare-p4-only option, the program
> should prepare a single p4 changelist and notify the user that more
> commits are pending and then stop processing.
>
> A bug has been introduced by the p4-changelist hook feature that
> causes the program to continue to try and process all pending
> changelists at the same time.
>
> The function applyCommit should return True when applying the commit
> was successful and the program should continue. In the case of the
> --prepare-p4-only flag, the function should return False, alerting the
> caller that the program should not proceed with additional commits.
>
> Change the return value from True to False in the applyCommit function
> when git-p4 is executed with --prepare-p4-only flag.
>
> Signed-off-by: Ben Keene <seraphire@gmail.com>
> ---

I do not do P4, so asking those who touched the program in the past
year and half for opinions.

Thanks.

> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-775%2Fseraphire%2Fseraphire%2Fp4-hook-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-775/seraphire/seraphire/p4-hook-v1
> Pull-Request: https://github.com/git/git/pull/775
>
>  git-p4.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/git-p4.py b/git-p4.py
> index b8b2a1679e7..d9ced1bf552 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -1984,7 +1984,7 @@ def get_diff_description(self, editedFiles, filesToAdd, symlinks):
>          return (diff + newdiff).replace('\r\n', '\n')
>  
>      def applyCommit(self, id):
> -        """Apply one commit, return True if it succeeded."""
> +        """Apply one commit, return True if it should continue processing."""
>  
>          print("Applying", read_pipe(["git", "show", "-s",
>                                       "--format=format:%h %s", id]))
> @@ -2222,7 +2222,7 @@ def applyCommit(self, id):
>                          print("  " + f)
>                  print("")
>                  sys.stdout.flush()
> -                return True
> +                return False
>  
>              if self.edit_template(fileName):
>                  if not self.no_verify:
>
> base-commit: d61d20c9b413225793f8a0b491bbbec61c184e26

  reply	other threads:[~2020-05-01 18:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 17:09 [PATCH] git-p4.py: fix --prepare-p4-only error with multiple commits Ben Keene via GitGitGadget
2020-05-01 18:39 ` Junio C Hamano [this message]
2020-05-06  3:44 ` Junio C Hamano
2020-05-12 13:15 ` [PATCH v2] " Ben Keene via GitGitGadget
2020-05-12 20:05   ` Junio C Hamano
2020-05-17  8:31     ` Luke Diamand

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqq1ro3mrd5.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=ahippo@yandex.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=luke@diamand.org \
    --cc=seraphire@gmail.com \
    --cc=yang.zhao@skyboxlabs.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).