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