From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AD053139085 for ; Sat, 14 Jan 2017 19:10:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1530223417E; Sat, 14 Jan 2017 19:10:10 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EA18623417E for ; Sat, 14 Jan 2017 19:10:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E3A4D341134 for ; Sat, 14 Jan 2017 19:10:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9881D2714 for ; Sat, 14 Jan 2017 19:10:06 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1484420901.c4d6482f1869a7a06e41dd2a95eee700b82fe027.floppym@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: repoman/pym/repoman/actions.py X-VCS-Directories: repoman/pym/repoman/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: c4d6482f1869a7a06e41dd2a95eee700b82fe027 X-VCS-Branch: master Date: Sat, 14 Jan 2017 19:10:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 015ec8bd-e750-4aa1-8668-3f1e4403b85e X-Archives-Hash: d41fc0a7d41ca206b531a982d9b8630b commit: c4d6482f1869a7a06e41dd2a95eee700b82fe027 Author: Mike Gilbert gentoo org> AuthorDate: Sat Jan 14 16:52:38 2017 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Jan 14 19:08:21 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c4d6482f repoman: always add a newline if the message body is one line The second line in a git commit message is supposed to be blank. Also, use a regex to more exactly match a Field: value line. Before: dev-libs/libfoo: fix another bug Package-Manager: Portage-2.3.3, Repoman-2.3.1 After: dev-libs/libfoo: fix another bug Package-Manager: Portage-2.3.3, Repoman-2.3.1 Acked-by: Zac Medico gentoo.org> repoman/pym/repoman/actions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py index 58b00d4..6b0c645 100644 --- a/repoman/pym/repoman/actions.py +++ b/repoman/pym/repoman/actions.py @@ -6,6 +6,7 @@ import errno import io import logging import platform +import re import signal import sys import tempfile @@ -128,8 +129,9 @@ class Actions(object): myupdates, mymanifests, myremoved, mychanged, myautoadd, mynew, commitmessage) - lastline = commitmessage.splitlines()[-1] - if not ':' in lastline: + lines = commitmessage.splitlines() + lastline = lines[-1] + if len(lines) == 1 or re.match(r'^\S+:\s', lastline) is None: commitmessage += '\n' commit_footer = self.get_commit_footer()