Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
patch: better changelog for patch additions during rebases
Browse files Browse the repository at this point in the history
If we added a new patch as part of a larger rebase operation, then we
should describe this action in human-readable terms.
  • Loading branch information
ktdreyer committed Nov 28, 2018
1 parent cbc6a8e commit 4636b98
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions rhcephpkg/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,17 @@ def generate_changelog(self, series):
for p in series:
# If there was some in-place Git modification for this patch,
# (.git_action attribute), include that in our log.
try:
action = p.git_action
# Make common actions human-readable:
if action == 'M':
action = 'Modified'
if action == 'D':
action = 'Deleted'
if action == 'R':
# We don't log .patch file renames
continue
change = '%s %s' % (action, p.path)
except AttributeError:
action = getattr(p, 'git_action', 'A')
# Make common actions human-readable:
if action == 'M':
action = 'Modified'
if action == 'D':
action = 'Deleted'
if action == 'R':
# We don't log .patch file renames
continue
change = '%s %s' % (action, p.path)
if action == 'A':
# This was a simple patch addition, so just log the patch's
# subject.
change = p.subject
Expand Down

0 comments on commit 4636b98

Please sign in to comment.