1 |
On Fri, 13 Jan 2017 12:42:18 -0500 |
2 |
Mike Gilbert <floppym@g.o> wrote: |
3 |
|
4 |
> This results in cleaner/more compact commit messages when the author |
5 |
> has already included some "Field: value" pair in the commit message |
6 |
> body. |
7 |
> |
8 |
> This check simply looks for a colon in the last line of the commit |
9 |
> message body. |
10 |
> |
11 |
> Before: |
12 |
> dev-libs/libfoo: fix something |
13 |
> |
14 |
> Yada yada yada. |
15 |
> |
16 |
> Gentoo-Bug: 123 |
17 |
> |
18 |
> Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
19 |
> |
20 |
> After: |
21 |
> dev-libs/libfoo: fix something |
22 |
> |
23 |
> Yada yada yada. |
24 |
> |
25 |
> Gentoo-Bug: 123 |
26 |
> Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
27 |
> --- |
28 |
> repoman/pym/repoman/actions.py | 8 ++++++-- |
29 |
> 1 file changed, 6 insertions(+), 2 deletions(-) |
30 |
> |
31 |
> diff --git a/repoman/pym/repoman/actions.py |
32 |
> b/repoman/pym/repoman/actions.py index 189580ea2..58b00d494 100644 |
33 |
> --- a/repoman/pym/repoman/actions.py |
34 |
> +++ b/repoman/pym/repoman/actions.py |
35 |
> @@ -128,6 +128,10 @@ class Actions(object): |
36 |
> myupdates, mymanifests, |
37 |
> myremoved, mychanged, myautoadd, mynew, commitmessage) |
38 |
> |
39 |
> + lastline = commitmessage.splitlines()[-1] |
40 |
> + if not ':' in lastline: |
41 |
> + commitmessage += '\n' |
42 |
> + |
43 |
> commit_footer = self.get_commit_footer() |
44 |
> commitmessage += commit_footer |
45 |
> |
46 |
> @@ -337,7 +341,7 @@ class Actions(object): |
47 |
> portage_version = "Unknown" |
48 |
> # Use new footer only for git (see bug #438364). |
49 |
> if self.vcs_settings.vcs in ["git"]: |
50 |
> - commit_footer = "\n\nPackage-Manager: |
51 |
> Portage-%s, Repoman-%s" % ( |
52 |
> + commit_footer = "\nPackage-Manager: |
53 |
> Portage-%s, Repoman-%s" % ( portage.VERSION, VERSION) |
54 |
> if report_options: |
55 |
> commit_footer += "\nRepoMan-Options: |
56 |
> " + " ".join(report_options) @@ -351,7 +355,7 @@ class |
57 |
> Actions(object): unameout += platform.processor() |
58 |
> else: |
59 |
> unameout += platform.machine() |
60 |
> - commit_footer = "\n\n" |
61 |
> + commit_footer = "\n" |
62 |
> if dco_sob: |
63 |
> commit_footer += "Signed-off-by: |
64 |
> %s\n" % (dco_sob, ) commit_footer += "(Portage version: %s/%s/%s" % \ |
65 |
|
66 |
looks good, you can push it once your enable to the repo... |
67 |
|
68 |
|
69 |
-- |
70 |
Brian Dolbec <dolsen> |