public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3097] contrib: run fetch before pushing Daily bump
Date: Wed,  5 Oct 2022 18:42:58 +0000 (GMT)	[thread overview]
Message-ID: <20221005184258.E0C593858C2C@sourceware.org> (raw)

https://gcc.gnu.org/g:59110467908baf11d3c2100e29bdbf7090e11940

commit r13-3097-g59110467908baf11d3c2100e29bdbf7090e11940
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Oct 5 20:39:19 2022 +0200

    contrib: run fetch before pushing Daily bump
    
    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
    
    contrib/ChangeLog:
    
            * gcc-changelog/git_update_version.py: Do fetch before a push.

Diff:
---
 contrib/gcc-changelog/git_update_version.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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)

                 reply	other threads:[~2022-10-05 18:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221005184258.E0C593858C2C@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).