On Fri, 13 Jan 2017 12:42:18 -0500
Mike Gilbert <[email protected]> wrote:

> This results in cleaner/more compact commit messages when the author
> has already included some "Field: value" pair in the commit message
> body.
> 
> This check simply looks for a colon in the last line of the commit
> message body.
> 
> Before:
>   dev-libs/libfoo: fix something
> 
>   Yada yada yada.
> 
>   Gentoo-Bug: 123
> 
>   Package-Manager: Portage-2.3.3, Repoman-2.3.1
> 
> After:
>   dev-libs/libfoo: fix something
> 
>   Yada yada yada.
> 
>   Gentoo-Bug: 123
>   Package-Manager: Portage-2.3.3, Repoman-2.3.1
> ---
>  repoman/pym/repoman/actions.py | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/repoman/pym/repoman/actions.py
> b/repoman/pym/repoman/actions.py index 189580ea2..58b00d494 100644
> --- a/repoman/pym/repoman/actions.py
> +++ b/repoman/pym/repoman/actions.py
> @@ -128,6 +128,10 @@ class Actions(object):
>                                       myupdates, mymanifests,
> myremoved, mychanged, myautoadd, mynew, commitmessage)
>  
> +             lastline = commitmessage.splitlines()[-1]
> +             if not ':' in lastline:
> +                     commitmessage += '\n'
> +
>               commit_footer = self.get_commit_footer()
>               commitmessage += commit_footer
>  
> @@ -337,7 +341,7 @@ class Actions(object):
>                       portage_version = "Unknown"
>               # Use new footer only for git (see bug #438364).
>               if self.vcs_settings.vcs in ["git"]:
> -                     commit_footer = "\n\nPackage-Manager:
> Portage-%s, Repoman-%s" % (
> +                     commit_footer = "\nPackage-Manager:
> Portage-%s, Repoman-%s" % ( portage.VERSION, VERSION)
>                       if report_options:
>                               commit_footer += "\nRepoMan-Options:
> " + " ".join(report_options) @@ -351,7 +355,7 @@ class
> Actions(object): unameout += platform.processor()
>                       else:
>                               unameout += platform.machine()
> -                     commit_footer = "\n\n"
> +                     commit_footer = "\n"
>                       if dco_sob:
>                               commit_footer += "Signed-off-by:
> %s\n" % (dco_sob, ) commit_footer += "(Portage version: %s/%s/%s" % \

looks good, you can push it once your enable to the repo...


-- 
Brian Dolbec <dolsen>


Reply via email to