diff mbox

[PING^2] Skip preprocessor directives in mklog

Message ID 555219FC.8090703@samsung.com
State New
Headers show

Commit Message

Yury Gribov May 12, 2015, 3:19 p.m. UTC
On 04/30/2015 12:03 PM, Yury Gribov wrote:
> On 04/21/2015 02:26 PM, Yury Gribov wrote:
>> Hi all,
>>
>> Contrib/mklog is currently faked by preprocessor directives inside
>> functions to produce invalid ChangeLog.  The attached patch fixes this.
>>
>> Tested with my local mklog testsuite and http://paste.debian.net/167999/
>> .  Ok to commit?

Ping.

Comments

Diego Novillo May 12, 2015, 3:23 p.m. UTC | #1
The patch looks fine to me.

I'm not really involved in GCC development anymore. I would suggest
that this script should be maintained by whoever's been hacking on it
the most. It's a simple script, so it shouldn't be hard to find a new
maintainer for it.


Diegop.

On Tue, May 12, 2015 at 11:19 AM, Yury Gribov <y.gribov@samsung.com> wrote:
> On 04/30/2015 12:03 PM, Yury Gribov wrote:
>>
>> On 04/21/2015 02:26 PM, Yury Gribov wrote:
>>>
>>> Hi all,
>>>
>>> Contrib/mklog is currently faked by preprocessor directives inside
>>> functions to produce invalid ChangeLog.  The attached patch fixes this.
>>>
>>> Tested with my local mklog testsuite and http://paste.debian.net/167999/
>>> .  Ok to commit?
>
>
> Ping.
>
>
> commit 23a738d05393676e72db82cb527d5fb1b3060e2f
> Author: Yury Gribov <y.gribov@samsung.com>
> Date:   Tue Apr 21 14:17:23 2015 +0300
>
>     2015-04-21  Yury Gribov  <y.gribov@samsung.com>
>
>         * mklog: Ignore preprocessor directives.
>
> diff --git a/contrib/mklog b/contrib/mklog
> index f7974a7..455614b 100755
> --- a/contrib/mklog
> +++ b/contrib/mklog
> @@ -131,7 +131,6 @@ sub is_unified_hunk_start {
>  }
>
>  # Check if line is a top-level declaration.
> -# TODO: ignore preprocessor directives except maybe #define ?
>  sub is_top_level {
>         my ($function, $is_context_diff) = (@_);
>         if (is_unified_hunk_start ($function)
> @@ -143,7 +142,7 @@ sub is_top_level {
>         } else {
>                 $function =~ s/^.//;
>         }
> -       return $function && $function !~ /^[\s{]/;
> +       return $function && $function !~ /^[\s{#]/;
>  }
>
>  # Read contents of .diff file
>
Yury Gribov May 12, 2015, 3:33 p.m. UTC | #2
On 05/12/2015 06:23 PM, Diego Novillo wrote:
> The patch looks fine to me.
>
> I'm not really involved in GCC development anymore. I would suggest
> that this script should be maintained by whoever's been hacking on it
> the most. It's a simple script, so it shouldn't be hard to find a new
> maintainer for it.

Trevor, Tom,

Does anyone want to volunteer?

-Y
Tom de Vries May 12, 2015, 3:50 p.m. UTC | #3
On 12-05-15 17:33, Yury Gribov wrote:
> On 05/12/2015 06:23 PM, Diego Novillo wrote:
>> The patch looks fine to me.
>>
>> I'm not really involved in GCC development anymore. I would suggest
>> that this script should be maintained by whoever's been hacking on it
>> the most. It's a simple script, so it shouldn't be hard to find a new
>> maintainer for it.
>
> Trevor, Tom,
>
> Does anyone want to volunteer?
>

I'm not a good choice to be the maintainer of a perl script. I have very limited 
knowledge of it, and look at perl code maybe once per year. So I'm 
unvolunteering myself.

Thanks,
- Tom
Trevor Saunders May 12, 2015, 3:57 p.m. UTC | #4
On Tue, May 12, 2015 at 06:33:28PM +0300, Yury Gribov wrote:
> On 05/12/2015 06:23 PM, Diego Novillo wrote:
> >The patch looks fine to me.
> >
> >I'm not really involved in GCC development anymore. I would suggest
> >that this script should be maintained by whoever's been hacking on it
> >the most. It's a simple script, so it shouldn't be hard to find a new
> >maintainer for it.
> 
> Trevor, Tom,
> 
> Does anyone want to volunteer?

I think you'd be the best choice :)

 I read about as much perl as Tom, but given you've tested it and it
 seems sane I'll say ok if you want me to.

thanks!

 Trev

> 
> -Y
Diego Novillo May 12, 2015, 4:13 p.m. UTC | #5
On Tue, May 12, 2015 at 11:50 AM, Tom de Vries <Tom_deVries@mentor.com> wrote:

> I'm not a good choice to be the maintainer of a perl script.

I'm all kinds of sorry about the original choice of scripting
language. I'd just spend a couple of hours re-writing it in python.
Yury Gribov May 12, 2015, 4:14 p.m. UTC | #6
On 05/12/2015 06:57 PM, Trevor Saunders wrote:
> On Tue, May 12, 2015 at 06:33:28PM +0300, Yury Gribov wrote:
>> On 05/12/2015 06:23 PM, Diego Novillo wrote:
>>> The patch looks fine to me.
>>>
>>> I'm not really involved in GCC development anymore. I would suggest
>>> that this script should be maintained by whoever's been hacking on it
>>> the most. It's a simple script, so it shouldn't be hard to find a new
>>> maintainer for it.
>>
>> Trevor, Tom,
>>
>> Does anyone want to volunteer?
>
> I think you'd be the best choice :)
>
>   I read about as much perl as Tom, but given you've tested it and it
>   seems sane I'll say ok if you want me to.

Hm, looks like I'm the only one who perls here.  What should I do to 
become a maintainer?

-Y
Jeff Law May 12, 2015, 7:45 p.m. UTC | #7
On 05/12/2015 10:14 AM, Yury Gribov wrote:
> On 05/12/2015 06:57 PM, Trevor Saunders wrote:
>> On Tue, May 12, 2015 at 06:33:28PM +0300, Yury Gribov wrote:
>>> On 05/12/2015 06:23 PM, Diego Novillo wrote:
>>>> The patch looks fine to me.
>>>>
>>>> I'm not really involved in GCC development anymore. I would suggest
>>>> that this script should be maintained by whoever's been hacking on it
>>>> the most. It's a simple script, so it shouldn't be hard to find a new
>>>> maintainer for it.
>>>
>>> Trevor, Tom,
>>>
>>> Does anyone want to volunteer?
>>
>> I think you'd be the best choice :)
>>
>>   I read about as much perl as Tom, but given you've tested it and it
>>   seems sane I'll say ok if you want me to.
>
> Hm, looks like I'm the only one who perls here.  What should I do to
> become a maintainer?
I think we have our volunteer :-)

Jeff
Jeff Law May 12, 2015, 8:26 p.m. UTC | #8
On 05/12/2015 09:19 AM, Yury Gribov wrote:
> On 04/30/2015 12:03 PM, Yury Gribov wrote:
>> On 04/21/2015 02:26 PM, Yury Gribov wrote:
>>> Hi all,
>>>
>>> Contrib/mklog is currently faked by preprocessor directives inside
>>> functions to produce invalid ChangeLog.  The attached patch fixes this.
>>>
>>> Tested with my local mklog testsuite and http://paste.debian.net/167999/
>>> .  Ok to commit?
>
> Ping.
>
>
> mklog-1.diff
>
>
> commit 23a738d05393676e72db82cb527d5fb1b3060e2f
> Author: Yury Gribov<y.gribov@samsung.com>
> Date:   Tue Apr 21 14:17:23 2015 +0300
>
>      2015-04-21  Yury Gribov<y.gribov@samsung.com>
>
>      	* mklog: Ignore preprocessor directives.
Going to trust you on this one since I don't think anyone else does much 
with perl.

jeff
diff mbox

Patch

commit 23a738d05393676e72db82cb527d5fb1b3060e2f
Author: Yury Gribov <y.gribov@samsung.com>
Date:   Tue Apr 21 14:17:23 2015 +0300

    2015-04-21  Yury Gribov  <y.gribov@samsung.com>
    
    	* mklog: Ignore preprocessor directives.

diff --git a/contrib/mklog b/contrib/mklog
index f7974a7..455614b 100755
--- a/contrib/mklog
+++ b/contrib/mklog
@@ -131,7 +131,6 @@  sub is_unified_hunk_start {
 }
 
 # Check if line is a top-level declaration.
-# TODO: ignore preprocessor directives except maybe #define ?
 sub is_top_level {
 	my ($function, $is_context_diff) = (@_);
 	if (is_unified_hunk_start ($function)
@@ -143,7 +142,7 @@  sub is_top_level {
 	} else {
 		$function =~ s/^.//;
 	}
-	return $function && $function !~ /^[\s{]/;
+	return $function && $function !~ /^[\s{#]/;
 }
 
 # Read contents of .diff file