1 |
On 09/15/2016 03:27 PM, Brian Dolbec wrote: |
2 |
> On Thu, 15 Sep 2016 14:47:31 -0700 |
3 |
> Zac Medico <zmedico@g.o> wrote: |
4 |
> |
5 |
>> On 09/15/2016 12:50 PM, Brian Dolbec wrote: |
6 |
>>> |
7 |
>>> From 08f6d22b366c8dc2968573ebc4fd4f0401ea67b7 Mon Sep 17 00:00:00 |
8 |
>>> 2001 From: Brian Dolbec <dolsen@g.o> |
9 |
>>> Date: Thu, 15 Sep 2016 12:45:10 -0700 |
10 |
>>> Subject: [PATCH] repoman: Update man page and commitmsgfile option |
11 |
>>> |
12 |
>>> Use .lower() on the leading message 9 charachters of hte message |
13 |
>>> text for the substitution test. |
14 |
>>> Update the man page for this new templating capability. |
15 |
>>> --- |
16 |
>>> repoman/man/repoman.1 | 6 +++++- |
17 |
>>> repoman/pym/repoman/actions.py | 2 +- |
18 |
>>> 2 files changed, 6 insertions(+), 2 deletions(-) |
19 |
>>> |
20 |
>>> diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1 |
21 |
>>> index 4a9122e..8df3207 100644 |
22 |
>>> --- a/repoman/man/repoman.1 |
23 |
>>> +++ b/repoman/man/repoman.1 |
24 |
>>> @@ -109,7 +109,11 @@ Behave as if no package.mask entries exist |
25 |
>>> (not allowed with commit mode) Adds a commit message via the |
26 |
>>> command line .TP |
27 |
>>> \fB-M\fR, \fB--commitmsgfile\fR |
28 |
>>> -Adds a commit message from the specified file |
29 |
>>> +Adds a commit message from the specified file. This option also |
30 |
>>> will perform +an automatic text substitution of a leading "cat/pkg: |
31 |
>>> " string (upper or lower +case) with the actual category/package |
32 |
>>> prefix as defined by the required message +format. Use this option |
33 |
>>> for templating a common commit message for multiple +package |
34 |
>>> updates. .TP |
35 |
>>> \fB-V\fR, \fB--version\fR |
36 |
>>> Show version info |
37 |
>>> diff --git a/repoman/pym/repoman/actions.py |
38 |
>>> b/repoman/pym/repoman/actions.py index 0534c29..9763c26 100644 |
39 |
>>> --- a/repoman/pym/repoman/actions.py |
40 |
>>> +++ b/repoman/pym/repoman/actions.py |
41 |
>>> @@ -108,7 +108,7 @@ class Actions(object): |
42 |
>>> " |
43 |
>>> --commitmsgfile='%s'\n" % self.options.commitmsgfile) else: |
44 |
>>> raise |
45 |
>>> - if commitmessage[:9] in ("cat/pkg: ", |
46 |
>>> "CAT/PKG: "): |
47 |
>>> + if commitmessage[:9].lower() in ("cat/pkg: |
48 |
>>> "): |
49 |
>> |
50 |
>> This is a string-in-string containment check unless you add a comma to |
51 |
>> make it a tuple like ("cat/pkg: ",). |
52 |
>> |
53 |
> |
54 |
> Doh, I removed that comma without realizing, thanks |
55 |
|
56 |
Otherwise, looks good. |
57 |
-- |
58 |
Thanks, |
59 |
Zac |