self.changelog_locations = list(default_changelog_locations)
if ref_name:
version = sys.maxsize
- if ref_name.startswith('refs/heads/releases/gcc-'):
+ if 'releases/gcc-' in ref_name:
version = int(ref_name.split('-')[-1])
if version >= 12:
# HSA and BRIG were removed in GCC 12
origin = repo.remotes['origin']
-def update_current_branch():
+def update_current_branch(ref_name):
commit = repo.head.commit
commit_count = 1
while commit:
if len(head.parents) == 2:
head = head.parents[1]
commits = parse_git_revisions(args.git_path, '%s..%s'
- % (commit.hexsha, head.hexsha))
+ % (commit.hexsha, head.hexsha), ref_name)
commits = [c for c in commits if c.info.hexsha not in IGNORED_COMMITS]
for git_commit in reversed(commits):
prepend_to_changelog_files(repo, args.git_path, git_commit,
branch.checkout()
origin.pull(rebase=True)
print('branch pulled and checked out')
- update_current_branch()
+ update_current_branch(name)
assert not repo.index.diff(None)
print('branch is done\n', flush=True)