| Message ID | 20260501110040.1874719-11-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633290; bh=39M3JYWfdwLSffdrqTANkLuDCO4p04dvMSDbTRj1exI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GcHz+Dn8ClB11ZevRBjFUIVrFvXmwUBVtHIYQpmJS1azLDAfgFd1XXT4l382xPpkm f/4GwAiTYTY778zNqeAWN7/l/a5ivT290sHvJdxUg1tIbdz9q1RJzFfsHbvDyHnE+z 0gaA3Via8OYeFzofhX32PRD2B8uCJlQdUInY7M3g= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CDFAF6A83F for <u-boot-concept@u-boot.org>; Fri, 1 May 2026 05:01:30 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cvdY-M6O_3bd for <u-boot-concept@u-boot.org>; Fri, 1 May 2026 05:01:30 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633288; bh=39M3JYWfdwLSffdrqTANkLuDCO4p04dvMSDbTRj1exI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lodjf89fu8W18tzlKVHSNlXsLe7PBVY03449RDJ27oCezllBIwNnN+jbI6hVFdDJw LmTFgdcH1H0soB29BWh8sb1bnxcjdoooGKw+zgNaIxT3xqIsSFmmwkCQ3ESjeS6+fG w1DKfDNz+mgB1siIZqNBOLEr/3UcQ77b70KlKwsk= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C70536A842 for <u-boot-concept@u-boot.org>; Fri, 1 May 2026 05:01:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633287; bh=+J3/aqy1Nj/XvQSkYYb5gCZnTRQxKliow/aTenjITyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n53eSF1ro4U/5qib7pbfQM4MuJoWVAmhoPfCWk3ZSWQHcpbaF2Weokj8xUCccQtP9 ARr/KFZxsBEwayI+21/uJ4dq1OpIgRJOpfkQ8gUVc6KIMlpsrQBYp5JXb4oDS64iPX R5giTpsHUCJL35A4X5lQJQ01uvgUabOaZhCEL24E= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1A28A6A82E; Fri, 1 May 2026 05:01:27 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id M-dMUsk0bDkB; Fri, 1 May 2026 05:01:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633286; bh=pT0Rnj47+oDflFStWK0OB+j0tDLf3Bi1OHyPgzD/BLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HfiRjmKKqVgpLO8UaqMziMaAC/WZJybTxf8pT4QYzxRnk/AwfZP5wieNDBRxLrNmi qzLz7gzXsiPl0k0UY73tNwlacddNDuWjIjQT4azD1ULHOkWmqr3unMPK3N1JJyhV+5 FD937W9a7QbCcfoTt00n4TgxyxvQl7ON/AVVDGSE= Received: from u-boot.org (unknown [174.51.25.52]) by mail.u-boot.org (Postfix) with ESMTPSA id 9856C6A78B; Fri, 1 May 2026 05:01:26 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Fri, 1 May 2026 05:00:02 -0600 Message-ID: <20260501110040.1874719-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260501110040.1874719-1-sjg@u-boot.org> References: <20260501110040.1874719-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: H4JOL67EVMS6R7KS5YF44H5CGNE2HYWS X-Message-ID-Hash: H4JOL67EVMS6R7KS5YF44H5CGNE2HYWS X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 10/29] patman: Use run_interactive() for git send-email List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/H4JOL67EVMS6R7KS5YF44H5CGNE2HYWS/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
patman: Review-flow improvements and shared helpers
|
|
Commit Message
Simon Glass
May 1, 2026, 11 a.m. UTC
From: Simon Glass <sjg@chromium.org> The output of 'git send-email' arrives in the wrong order: the 'Send this email?' prompt shows up before the email headers because email_patches() runs the command through cros_subprocess with an echo callback, which delivers PTY chunks unpredictably. Switch to run_interactive(), which keeps the child's stdout and stderr on a real PTY so the prompt and headers appear in the order git produces them. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/u_boot_pylib/gitutil.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tools/u_boot_pylib/gitutil.py b/tools/u_boot_pylib/gitutil.py index e216fd8393f..a7db37fd7df 100644 --- a/tools/u_boot_pylib/gitutil.py +++ b/tools/u_boot_pylib/gitutil.py @@ -655,14 +655,8 @@ def email_patches(series, cover_fname, args, dry_run, warn_on_error, cc_fname, cmd += args num_sent = 0 if not dry_run: - def echo_output(_stream, data): - os.write(sys.stdout.fileno(), data) - return False - - result = command.run_pipe( - [cmd], capture=True, output_func=echo_output, - raise_on_error=False, cwd=cwd, merge_stderr=True) - num_sent = result.stdout.count('Result: ') + captured = command.run_interactive(cmd, cwd) + num_sent = captured.count('Result: ') cmd_str = ' '.join([f'"{x}"' if ' ' in x and '"' not in x else x for x in cmd]) return cmd_str, num_sent