public inbox for
 help / color / mirror / Atom feed
* [PATCH][pushed] contrib: run fetch before pushing Daily bump
@ 2022-10-05 18:41 Martin Liška
  2022-10-05 20:09 ` Tobias Burnus
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2022-10-05 18:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek, Jonathan Wakely

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.



	* gcc-changelog/ Do fetch before a push.
 contrib/gcc-changelog/ | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/gcc-changelog/ b/contrib/gcc-changelog/
index 05a9f7e402d..8462179b5ab 100755
--- a/contrib/gcc-changelog/
+++ b/contrib/gcc-changelog/
@@ -127,6 +127,7 @@ def update_current_branch(ref_name):
             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)
-            print('branch pulled and checked out')
+            print('branch pulled and checked out', flush=True)
             assert not repo.index.diff(None)
             print('branch is done\n', flush=True)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-06  9:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 18:41 [PATCH][pushed] contrib: run fetch before pushing Daily bump Martin Liška
2022-10-05 20:09 ` Tobias Burnus
2022-10-06  9:13   ` Martin Liška

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).