aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2023-09-07 12:40:57 +0200
committerTobias Burnus <tobias@codesourcery.com>2023-09-07 12:40:57 +0200
commitfbbd9001e9b6f2c59b542cc53a8f9183514091ce (patch)
tree3a0edf68fbf8d07d0140d5280eeea4b25e4978a1 /contrib/gcc-changelog
parentff20bce9f5879878f352f1fcd6ade023a2067598 (diff)
downloadgcc-fbbd9001e9b6f2c59b542cc53a8f9183514091ce.zip
gcc-fbbd9001e9b6f2c59b542cc53a8f9183514091ce.tar.gz
gcc-fbbd9001e9b6f2c59b542cc53a8f9183514091ce.tar.bz2
Revert "contrib/gcc-changelog: Check whether revert-commit exists"
This reverts commit ffffffffffffffffffffffffffffffffffffffff.
Diffstat (limited to 'contrib/gcc-changelog')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py20
-rwxr-xr-xcontrib/gcc-changelog/git_email.py3
2 files changed, 7 insertions, 16 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 9110317..4f31310 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -329,15 +329,11 @@ class GitCommit:
self.revert_commit = m.group('hash')
break
if self.revert_commit:
- # The following happens for get_email.py:
- if not self.commit_to_info_hook:
- self.warnings.append(f"Invoked script can not obtain info about "
- f"reverted commits such as '{self.revert_commit}'")
- return
self.info = self.commit_to_info_hook(self.revert_commit)
- if not self.info:
- self.errors.append(Error('Cannot find to-be-reverted commit', self.revert_commit))
- return
+
+ # The following happens for get_email.py:
+ if not self.info:
+ return
self.check_commit_email()
@@ -800,18 +796,12 @@ class GitCommit:
orig_date = self.original_info.date
current_timestamp = orig_date.strftime(DATE_FORMAT)
elif self.cherry_pick_commit:
- info = (self.commit_to_info_hook
- and self.commit_to_info_hook(self.cherry_pick_commit))
+ info = self.commit_to_info_hook(self.cherry_pick_commit)
# it can happen that it is a cherry-pick for a different
# repository
if info:
timestamp = info.date.strftime(DATE_FORMAT)
else:
- if self.commit_to_info_hook:
- self.warnings.append(f"Cherry-picked commit not found: '{self.cherry_pick_commit}'")
- else:
- self.warnings.append(f"Invoked script can not obtain info about "
- f"cherry-picked commits such as '{self.revert_commit}'")
timestamp = current_timestamp
elif not timestamp or use_commit_ts:
timestamp = current_timestamp
diff --git a/contrib/gcc-changelog/git_email.py b/contrib/gcc-changelog/git_email.py
index 93808df..49f41f2 100755
--- a/contrib/gcc-changelog/git_email.py
+++ b/contrib/gcc-changelog/git_email.py
@@ -89,7 +89,8 @@ class GitEmail(GitCommit):
t = 'M'
modified_files.append((target if t != 'D' else source, t))
git_info = GitInfo(None, date, author, message, modified_files)
- super().__init__(git_info, commit_to_info_hook=None)
+ super().__init__(git_info,
+ commit_to_info_hook=lambda x: None)
def show_help():