summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-10-05 20:39:19 +0200
committerMartin Liska <mliska@suse.cz>2022-10-05 20:42:43 +0200
commit59110467908baf11d3c2100e29bdbf7090e11940 (patch)
tree9997cb020857d2c0ec5021d6b33fc8fbe680f7e0 /contrib
parentef878564140cbcf23f479da88e07e5a996cec6bb (diff)
downloadgcc-59110467908baf11d3c2100e29bdbf7090e11940.tar.gz
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.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/gcc-changelog/git_update_version.py3
1 files changed, 2 insertions, 1 deletions
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)