Message ID | 29487d53-ef09-764b-cbd0-0fa09f459fc3@suse.cz |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp735198wrs; Wed, 5 Oct 2022 11:42:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54OVy7jYmhNM6tCZ2VI6KW3nFx9dmrwUwB2/hQx9jpVa6uMLWzJ/75ZoaHQ8yBHfBvnlsw X-Received: by 2002:a17:907:3e25:b0:783:29e1:c1ce with SMTP id hp37-20020a1709073e2500b0078329e1c1cemr764746ejc.303.1664995339505; Wed, 05 Oct 2022 11:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664995339; cv=none; d=google.com; s=arc-20160816; b=uXQymNRJZe2X7xDt5fCpHObFs5r76GmzG1p1P459K785lw3i6sPEzPi1VymwGXe9C0 mcrdThSOzzGH0flDlieQ/9/a62WSPmu2qN7RCdVo+ckLr6vfqkGBctiixHw4h306pF1E YA2t/HE877pvc1EjhQSaEb+Ap7+/DtyAGRYgNz2nBnsX0eg5TJkwGlkcSCnUf/maxM6E 3SKKLFrbyZs9rT8Bcw78Yr7ACM33khbdYcju11XpC2mUPk+l7yd3vraQH31ki+fVAVHp pzUD4BVnF8KW9zQTc3UDcJ/ugpzcyDG+XydNVbWN9sIzNOml+G7W2BB8qPy5UzSBaG6d Tthg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:to:subject:from:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=WEY/A41a7EgK5qpi3mH+FO5j1xSwMOgQAWcZcuVvJmQ=; b=rNPAmp8r4uLRsTBDDJz0yxu2mm2VH3z7D10im2x4FBaa+FhdJYgxvP4NbHBsrVD9s4 /4JCiDefa4YFlxztA+A9bcOLOxeYqIjnTkSK5dyUeTLqkfeuAhyFtpa8HF+uAZGSLSXU MbplN2ZTBWsbLDpBIMeBf8b0r/+Jso8b5BDui1KVXXwsc/AprjO5vlsMehVuYpFviaEN 0aOAxfw0mjEZ2x7mkMW+23CvsomC9/9N1UpTSdDwQg6tkS/peIFm26NRKJSnPfNgpVHV YZSK1qJwKpuYIMjkAji8yR8KAeHAbkeeGX/LKHmWsMAEcREL3t4IWfK1jaILMsxxeQmA a9kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=GEq4pFBo; dkim=neutral (no key) header.i=@gcc.gnu.org header.s=susede2_ed25519; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gs41-20020a1709072d2900b00788a4c018b5si13051057ejc.806.2022.10.05.11.42.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 11:42:19 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=GEq4pFBo; dkim=neutral (no key) header.i=@gcc.gnu.org header.s=susede2_ed25519; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E9B73857BBC for <ouuuleilei@gmail.com>; Wed, 5 Oct 2022 18:42:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 54BC83858C2C for <gcc-patches@gcc.gnu.org>; Wed, 5 Oct 2022 18:41:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 54BC83858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 38360219F6; Wed, 5 Oct 2022 18:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664995310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WEY/A41a7EgK5qpi3mH+FO5j1xSwMOgQAWcZcuVvJmQ=; b=GEq4pFBomg+hvO4SFe54uiys+AmrkXJP/kX5BBKVJOYdaZp+83BxucRfdQnt5Lh2jK9xQr E829WrcKrgQGTOIkKBF15JCnaK48T0sXbILv0r4YvNqBeo4lr6CSD8UE3hqxhdBRcJ1/Jl Ehv6Lb1XJD8cIzfGDCnq7vIiqQlkEGQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664995310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WEY/A41a7EgK5qpi3mH+FO5j1xSwMOgQAWcZcuVvJmQ=; b=fj2GKxVqu3xY4TIjDkiAtUMMlUcVxVzxkhkey2jU7YDcIt64R8H0pw+82ae/GOPAXIDd6F Iik+nkVRHN0eS9AQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1A9EA13345; Wed, 5 Oct 2022 18:41:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OoLEBO7PPWPAEgAAMHmgww (envelope-from <mliska@suse.cz>); Wed, 05 Oct 2022 18:41:50 +0000 Message-ID: <29487d53-ef09-764b-cbd0-0fa09f459fc3@suse.cz> Date: Wed, 5 Oct 2022 20:41:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= <mliska@suse.cz> Subject: [PATCH][pushed] contrib: run fetch before pushing Daily bump To: gcc-patches@gcc.gnu.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: Jakub Jelinek <jakub@redhat.com>, Jonathan Wakely <jwakely.gcc@gmail.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745874153249188202?= X-GMAIL-MSGID: =?utf-8?q?1745874153249188202?= |
Series |
[pushed] contrib: run fetch before pushing Daily bump
|
|
Commit Message
Martin Liška
Oct. 5, 2022, 6:41 p.m. UTC
As seen from recent days, the script fails when it pushes a branch while another revision was pushed by a user. Prevent that by doing fetch right before the pull. The error message example: cmdline: git push origin releases/gcc-11 stderr: 'fatal: unable to parse object: 4249a65c814287af667aa78789436d3fc618e80a error: remote unpack failed: eof before pack header was fully read I'm going to push the change and let's see if it mitigates the problem. Martin contrib/ChangeLog: * gcc-changelog/git_update_version.py: Do fetch before a push. --- contrib/gcc-changelog/git_update_version.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 05.10.22 20:41, Martin Liška wrote: > +++ b/contrib/gcc-changelog/git_update_version.py > @@ -127,6 +127,7 @@ def update_current_branch(ref_name): > repo.git.add(datestamp_path) > if not args.current: > repo.index.commit('Daily bump.') > + origin.fetch() > if args.push: > repo.git.push('origin', branch) > print('branch is pushed') Don't you need a 'rebase' in addition? Or alternately – putting 'fetch' before 'commit' and then 'merge' would be alternately possible. Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
On 10/5/22 22:09, Tobias Burnus wrote: > On 05.10.22 20:41, Martin Liška wrote: >> +++ b/contrib/gcc-changelog/git_update_version.py >> @@ -127,6 +127,7 @@ def update_current_branch(ref_name): >> repo.git.add(datestamp_path) >> if not args.current: >> repo.index.commit('Daily bump.') >> + origin.fetch() >> if args.push: >> repo.git.push('origin', branch) >> print('branch is pushed') > > Don't you need a 'rebase' in addition? Well, no, because that would mean the script won't generate a ChangeLog entry for some commits. > Or alternately – putting 'fetch' > before 'commit' and then 'merge' would be alternately possible. Well, the window is pretty small, in between 'git pull' and processing the ChangeLog entries it should take only a few seconds before a push is done. Anyway, it failed today again, let me add more robust logging. Martin > > Tobias > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
diff --git a/contrib/gcc-changelog/git_update_version.py b/contrib/gcc-changelog/git_update_version.py index 05a9f7e402d..8462179b5ab 100755 --- a/contrib/gcc-changelog/git_update_version.py +++ b/contrib/gcc-changelog/git_update_version.py @@ -127,6 +127,7 @@ def update_current_branch(ref_name): repo.git.add(datestamp_path) if not args.current: repo.index.commit('Daily bump.') + origin.fetch() if args.push: repo.git.push('origin', branch) print('branch is pushed') @@ -149,7 +150,7 @@ else: print('=== Working on: %s ===' % branch, flush=True) branch.checkout() origin.pull(rebase=True) - print('branch pulled and checked out') + print('branch pulled and checked out', flush=True) update_current_branch(name) assert not repo.index.diff(None) print('branch is done\n', flush=True)