* [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution
@ 2016-09-15 19:50 Brian Dolbec
2016-09-15 19:57 ` Brian Dolbec
2016-09-15 21:47 ` Zac Medico
0 siblings, 2 replies; 5+ messages in thread
From: Brian Dolbec @ 2016-09-15 19:50 UTC (permalink / raw
To: gentoo-portage-dev
From 08f6d22b366c8dc2968573ebc4fd4f0401ea67b7 Mon Sep 17 00:00:00 2001
From: Brian Dolbec <dolsen@gentoo.org>
Date: Thu, 15 Sep 2016 12:45:10 -0700
Subject: [PATCH] repoman: Update man page and commitmsgfile option
Use .lower() on the leading message 9 charachters of hte message text for the substitution
test.
Update the man page for this new templating capability.
---
repoman/man/repoman.1 | 6 +++++-
repoman/pym/repoman/actions.py | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1
index 4a9122e..8df3207 100644
--- a/repoman/man/repoman.1
+++ b/repoman/man/repoman.1
@@ -109,7 +109,11 @@ Behave as if no package.mask entries exist (not allowed with commit mode)
Adds a commit message via the command line
.TP
\fB-M\fR, \fB--commitmsgfile\fR
-Adds a commit message from the specified file
+Adds a commit message from the specified file. This option also will perform
+an automatic text substitution of a leading "cat/pkg: " string (upper or lower
+case) with the actual category/package prefix as defined by the required message
+format. Use this option for templating a common commit message for
multiple +package updates.
.TP
\fB-V\fR, \fB--version\fR
Show version info
diff --git a/repoman/pym/repoman/actions.py
b/repoman/pym/repoman/actions.py index 0534c29..9763c26 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -108,7 +108,7 @@ class Actions(object):
"
--commitmsgfile='%s'\n" % self.options.commitmsgfile) else:
raise
- if commitmessage[:9] in ("cat/pkg: ",
"CAT/PKG: "):
+ if commitmessage[:9].lower() in ("cat/pkg: "):
commitmessage = self.msg_prefix() +
commitmessage[9:]
if not commitmessage or not commitmessage.strip():
--
2.9.3
--
Brian Dolbec <dolsen>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution
2016-09-15 19:50 [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution Brian Dolbec
@ 2016-09-15 19:57 ` Brian Dolbec
2016-09-15 21:47 ` Zac Medico
1 sibling, 0 replies; 5+ messages in thread
From: Brian Dolbec @ 2016-09-15 19:57 UTC (permalink / raw
To: gentoo-portage-dev
On Thu, 15 Sep 2016 12:50:13 -0700
Brian Dolbec <dolsen@gentoo.org> wrote:
> From 08f6d22b366c8dc2968573ebc4fd4f0401ea67b7 Mon Sep 17 00:00:00 2001
> From: Brian Dolbec <dolsen@gentoo.org>
> Date: Thu, 15 Sep 2016 12:45:10 -0700
> Subject: [PATCH] repoman: Update man page and commitmsgfile option
>
> Use .lower() on the leading message 9 charachters of hte message text
> for the substitution test.
Fixed this line:
Use .lower() on the leading 9 characters of the message text for the
substitution test.
--
Brian Dolbec <dolsen>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution
2016-09-15 19:50 [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution Brian Dolbec
2016-09-15 19:57 ` Brian Dolbec
@ 2016-09-15 21:47 ` Zac Medico
2016-09-15 22:27 ` Brian Dolbec
1 sibling, 1 reply; 5+ messages in thread
From: Zac Medico @ 2016-09-15 21:47 UTC (permalink / raw
To: gentoo-portage-dev
On 09/15/2016 12:50 PM, Brian Dolbec wrote:
>
> From 08f6d22b366c8dc2968573ebc4fd4f0401ea67b7 Mon Sep 17 00:00:00 2001
> From: Brian Dolbec <dolsen@gentoo.org>
> Date: Thu, 15 Sep 2016 12:45:10 -0700
> Subject: [PATCH] repoman: Update man page and commitmsgfile option
>
> Use .lower() on the leading message 9 charachters of hte message text for the substitution
> test.
> Update the man page for this new templating capability.
> ---
> repoman/man/repoman.1 | 6 +++++-
> repoman/pym/repoman/actions.py | 2 +-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1
> index 4a9122e..8df3207 100644
> --- a/repoman/man/repoman.1
> +++ b/repoman/man/repoman.1
> @@ -109,7 +109,11 @@ Behave as if no package.mask entries exist (not allowed with commit mode)
> Adds a commit message via the command line
> .TP
> \fB-M\fR, \fB--commitmsgfile\fR
> -Adds a commit message from the specified file
> +Adds a commit message from the specified file. This option also will perform
> +an automatic text substitution of a leading "cat/pkg: " string (upper or lower
> +case) with the actual category/package prefix as defined by the required message
> +format. Use this option for templating a common commit message for
> multiple +package updates.
> .TP
> \fB-V\fR, \fB--version\fR
> Show version info
> diff --git a/repoman/pym/repoman/actions.py
> b/repoman/pym/repoman/actions.py index 0534c29..9763c26 100644
> --- a/repoman/pym/repoman/actions.py
> +++ b/repoman/pym/repoman/actions.py
> @@ -108,7 +108,7 @@ class Actions(object):
> "
> --commitmsgfile='%s'\n" % self.options.commitmsgfile) else:
> raise
> - if commitmessage[:9] in ("cat/pkg: ",
> "CAT/PKG: "):
> + if commitmessage[:9].lower() in ("cat/pkg: "):
This is a string-in-string containment check unless you add a comma to
make it a tuple like ("cat/pkg: ",).
> commitmessage = self.msg_prefix() +
> commitmessage[9:]
> if not commitmessage or not commitmessage.strip():
>
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution
2016-09-15 21:47 ` Zac Medico
@ 2016-09-15 22:27 ` Brian Dolbec
2016-09-16 2:17 ` Zac Medico
0 siblings, 1 reply; 5+ messages in thread
From: Brian Dolbec @ 2016-09-15 22:27 UTC (permalink / raw
To: gentoo-portage-dev
On Thu, 15 Sep 2016 14:47:31 -0700
Zac Medico <zmedico@gentoo.org> wrote:
> On 09/15/2016 12:50 PM, Brian Dolbec wrote:
> >
> > From 08f6d22b366c8dc2968573ebc4fd4f0401ea67b7 Mon Sep 17 00:00:00
> > 2001 From: Brian Dolbec <dolsen@gentoo.org>
> > Date: Thu, 15 Sep 2016 12:45:10 -0700
> > Subject: [PATCH] repoman: Update man page and commitmsgfile option
> >
> > Use .lower() on the leading message 9 charachters of hte message
> > text for the substitution test.
> > Update the man page for this new templating capability.
> > ---
> > repoman/man/repoman.1 | 6 +++++-
> > repoman/pym/repoman/actions.py | 2 +-
> > 2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1
> > index 4a9122e..8df3207 100644
> > --- a/repoman/man/repoman.1
> > +++ b/repoman/man/repoman.1
> > @@ -109,7 +109,11 @@ Behave as if no package.mask entries exist
> > (not allowed with commit mode) Adds a commit message via the
> > command line .TP
> > \fB-M\fR, \fB--commitmsgfile\fR
> > -Adds a commit message from the specified file
> > +Adds a commit message from the specified file. This option also
> > will perform +an automatic text substitution of a leading "cat/pkg:
> > " string (upper or lower +case) with the actual category/package
> > prefix as defined by the required message +format. Use this option
> > for templating a common commit message for multiple +package
> > updates. .TP
> > \fB-V\fR, \fB--version\fR
> > Show version info
> > diff --git a/repoman/pym/repoman/actions.py
> > b/repoman/pym/repoman/actions.py index 0534c29..9763c26 100644
> > --- a/repoman/pym/repoman/actions.py
> > +++ b/repoman/pym/repoman/actions.py
> > @@ -108,7 +108,7 @@ class Actions(object):
> > "
> > --commitmsgfile='%s'\n" % self.options.commitmsgfile) else:
> > raise
> > - if commitmessage[:9] in ("cat/pkg: ",
> > "CAT/PKG: "):
> > + if commitmessage[:9].lower() in ("cat/pkg:
> > "):
>
> This is a string-in-string containment check unless you add a comma to
> make it a tuple like ("cat/pkg: ",).
>
Doh, I removed that comma without realizing, thanks
--
Brian Dolbec <dolsen>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution
2016-09-15 22:27 ` Brian Dolbec
@ 2016-09-16 2:17 ` Zac Medico
0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2016-09-16 2:17 UTC (permalink / raw
To: gentoo-portage-dev
On 09/15/2016 03:27 PM, Brian Dolbec wrote:
> On Thu, 15 Sep 2016 14:47:31 -0700
> Zac Medico <zmedico@gentoo.org> wrote:
>
>> On 09/15/2016 12:50 PM, Brian Dolbec wrote:
>>>
>>> From 08f6d22b366c8dc2968573ebc4fd4f0401ea67b7 Mon Sep 17 00:00:00
>>> 2001 From: Brian Dolbec <dolsen@gentoo.org>
>>> Date: Thu, 15 Sep 2016 12:45:10 -0700
>>> Subject: [PATCH] repoman: Update man page and commitmsgfile option
>>>
>>> Use .lower() on the leading message 9 charachters of hte message
>>> text for the substitution test.
>>> Update the man page for this new templating capability.
>>> ---
>>> repoman/man/repoman.1 | 6 +++++-
>>> repoman/pym/repoman/actions.py | 2 +-
>>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1
>>> index 4a9122e..8df3207 100644
>>> --- a/repoman/man/repoman.1
>>> +++ b/repoman/man/repoman.1
>>> @@ -109,7 +109,11 @@ Behave as if no package.mask entries exist
>>> (not allowed with commit mode) Adds a commit message via the
>>> command line .TP
>>> \fB-M\fR, \fB--commitmsgfile\fR
>>> -Adds a commit message from the specified file
>>> +Adds a commit message from the specified file. This option also
>>> will perform +an automatic text substitution of a leading "cat/pkg:
>>> " string (upper or lower +case) with the actual category/package
>>> prefix as defined by the required message +format. Use this option
>>> for templating a common commit message for multiple +package
>>> updates. .TP
>>> \fB-V\fR, \fB--version\fR
>>> Show version info
>>> diff --git a/repoman/pym/repoman/actions.py
>>> b/repoman/pym/repoman/actions.py index 0534c29..9763c26 100644
>>> --- a/repoman/pym/repoman/actions.py
>>> +++ b/repoman/pym/repoman/actions.py
>>> @@ -108,7 +108,7 @@ class Actions(object):
>>> "
>>> --commitmsgfile='%s'\n" % self.options.commitmsgfile) else:
>>> raise
>>> - if commitmessage[:9] in ("cat/pkg: ",
>>> "CAT/PKG: "):
>>> + if commitmessage[:9].lower() in ("cat/pkg:
>>> "):
>>
>> This is a string-in-string containment check unless you add a comma to
>> make it a tuple like ("cat/pkg: ",).
>>
>
> Doh, I removed that comma without realizing, thanks
Otherwise, looks good.
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-16 2:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 19:50 [gentoo-portage-dev] [Patch] 1/1 New commitmsgfile "cat/pkg: " auto-substitution Brian Dolbec
2016-09-15 19:57 ` Brian Dolbec
2016-09-15 21:47 ` Zac Medico
2016-09-15 22:27 ` Brian Dolbec
2016-09-16 2:17 ` Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox