summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-20 21:53:14 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-20 21:53:14 -0700
commit7d7fa4af2dbec7e7cc06e5ac176fe0b697ee867b (patch)
treef2b150564b2deca4a50ad1c519f4d6154f0f9159
parent0966be903d19dd9999568de3baa3f9815e1e4369 (diff)
downloadportage-7d7fa4af2dbec7e7cc06e5ac176fe0b697ee867b.tar.gz
portage-7d7fa4af2dbec7e7cc06e5ac176fe0b697ee867b.tar.bz2
portage-7d7fa4af2dbec7e7cc06e5ac176fe0b697ee867b.zip
UpdateChangeLog: tweak new/changed coded
-rw-r--r--pym/repoman/utilities.py17
1 files changed, 8 insertions, 9 deletions
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)))