From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RFeB7-0003jV-Pu for garchives@archives.gentoo.org; Mon, 17 Oct 2011 03:47:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC67F21C034; Mon, 17 Oct 2011 03:47:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5C5B121C034 for ; Mon, 17 Oct 2011 03:47:45 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A1A761B400F for ; Mon, 17 Oct 2011 03:47:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BFFE880042 for ; Mon, 17 Oct 2011 03:47:43 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <630ea9d916bd6e09a1af6414ae7fbe83ecd2331f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/utilities.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 630ea9d916bd6e09a1af6414ae7fbe83ecd2331f Date: Mon, 17 Oct 2011 03:47:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: cb697cf007f3d52ac8d4302308c0e4c6 commit: 630ea9d916bd6e09a1af6414ae7fbe83ecd2331f Author: Zac Medico gentoo org> AuthorDate: Mon Oct 17 03:45:10 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Oct 17 03:45:10 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D630ea9d9 UpdateChangeLog: show trivial if nothing else Like echangelog does, show ChangeLog or Manifest if there are no other changes to display. --- pym/repoman/utilities.py | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index e4fc1a4..e068749 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -603,11 +603,26 @@ def UpdateChangeLog(pkgdir, category, package, new,= removed, changed, msg, prete newebuild =3D True if newebuild: clnew_lines.append(_unicode_decode('\n')) - new =3D ['+' + elem for elem in new if elem not in ['ChangeLog', 'Mani= fest']] - removed =3D ['-' + elem for elem in removed] - changed =3D [elem for elem in changed if elem not in ['ChangeLog', 'Ma= nifest']] - mesg =3D '%s; %s %s:' % (date, user, \ - ', '.join(chain(new,removed,changed))) + trivial_files =3D ('ChangeLog', 'Manifest') + display_new =3D ['+' + elem for elem in new + if elem not in trivial_files] + display_removed =3D ['-' + elem for elem in removed] + display_changed =3D [elem for elem in changed + if elem not in trivial_files] + 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 =3D ['+ChangeLog'] + elif 'ChangeLog' in changed: + display_changed =3D ['ChangeLog'] + elif 'Manifest' in new: + display_new =3D ['+Manifest'] + elif 'Manifest' in changed: + display_changed =3D ['Manifest'] + + mesg =3D '%s; %s %s:' % (date, user, ', '.join(chain( + display_new, display_removed, display_changed))) for line in textwrap.wrap(mesg, 80, \ initial_indent=3D' ', subsequent_indent=3D' ', \ break_on_hyphens=3DFalse):