This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/2] allow running mklog as a filter
- From: Diego Novillo <dnovillo at google dot com>
- To: Trevor Saunders <tsaunders at mozilla dot com>
- Cc: Yury Gribov <y dot gribov at samsung dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Trevor Saunders <tbsaunde at mozilla dot com>
- Date: Fri, 9 May 2014 11:09:18 -0400
- Subject: Re: [PATCH 2/2] allow running mklog as a filter
- Authentication-results: sourceware.org; auth=none
- References: <1398737468-6981-1-git-send-email-tsaunders at mozilla dot com> <1398737468-6981-3-git-send-email-tsaunders at mozilla dot com> <535F362F dot 10700 at samsung dot com> <20140429101611 dot GB6192 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com>
On Tue, Apr 29, 2014 at 6:16 AM, Trevor Saunders <tsaunders@mozilla.com> wrote:
>> >+# In any case if we got the diff on stdin then write the ChangeLog to stdout.
>>
>> Hm, this is breaks semantics: you only dump CL instead of CL+diff just
>> because diff comes from stdin. Perhaps we could append contents of
>> @diff_lines here?
>
> I agree stdin gets different semantics than other files but I think
> that's sort of ok because it means you generated the patch somehow so
> presumably you can do that again if you need the patch. Writing the
> diff to stdout seems possible, but atleast for my use cases its
> annoying, but I guess I'm open to adding a flag or something.
I slightly prefer the semantics that gets me just the ChangeLog. The
workflow I'm envisioning is:
$ cat mypatch | mklog > message.txt
Diego.
>
>> >+if ($diff == "-") {
>>
>> This will work but 'eq' is preferred way to compare strings.
>
> oh perl
Indeed. I've always regretted writing this in perl. A python version
would be so much more pleasant to maintain.
OK with Yuri's suggestion of assuming '-' when ARGV is empty.
Diego.