From: Zac Medico Date: Fri, 21 Oct 2011 04:53:14 +0000 (-0700) Subject: UpdateChangeLog: tweak new/changed coded X-Git-Tag: v2.2.0_alpha70~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7d7fa4af2dbec7e7cc06e5ac176fe0b697ee867b;p=portage.git UpdateChangeLog: tweak new/changed coded --- diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index 0ecc92cc7..6b4bd5098 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -629,7 +629,7 @@ def UpdateChangeLog(pkgdir, user, msg, skel_path, category, package, # check modified files and the ChangeLog for copyright updates # patches and diffs (identified by .patch and .diff) are excluded - for fn in new + changed: + for fn in chain(new, changed): if fn.endswith('.diff') or fn.endswith('.patch'): continue update_copyright(os.path.join(pkgdir, fn), year, pretend) @@ -711,14 +711,13 @@ def UpdateChangeLog(pkgdir, user, msg, skel_path, category, package, if not (display_new or display_removed or display_changed): # If there's nothing else to display, show one of the # trivial files. - if 'ChangeLog' in new: - display_new = ['+ChangeLog'] - elif 'ChangeLog' in changed: - display_changed = ['ChangeLog'] - elif 'Manifest' in new: - display_new = ['+Manifest'] - elif 'Manifest' in changed: - display_changed = ['Manifest'] + for fn in trivial_files: + if fn in new: + display_new = ['+' + fn] + break + elif fn in changed: + display_changed = [fn] + break mesg = '%s; %s %s:' % (date, user, ', '.join(chain( display_new, display_removed, display_changed)))