All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] get_maintainer.pl: Default to --no-git-fallback
Date: Wed, 22 Oct 2014 15:25:25 -0400	[thread overview]
Message-ID: <544804A5.6090202@terremark.com> (raw)
In-Reply-To: <20141022082932.GB7797@redhat.com>

On 10/22/14 04:29, Michael S. Tsirkin wrote:
> On Wed, Oct 22, 2014 at 10:03:53AM +0200, Markus Armbruster wrote:
>> "Michael S. Tsirkin" <mst@redhat.com> writes:
>>
>>> On Wed, Oct 22, 2014 at 09:01:24AM +0200, Markus Armbruster wrote:
>>>> "Michael S. Tsirkin" <mst@redhat.com> writes:
>>>>
>>>>> On Tue, Oct 21, 2014 at 03:34:46PM +0200, Markus Armbruster wrote:
>>>>>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>>>>>
>>>>>>> On 10/20/2014 04:15 PM, Michael S. Tsirkin wrote:
>>>>>>>> What do you want to happen in this case?
>>>>>>>> Won't this cause even more patches to fall to the floor?
>>>>>>>>
>>>>>>>> The benefit seems marginal, the risk high.
>>>>>>> I agree with Michael.
>>>>>>>
>>>>>>> Can we detect if get_maintainer.pl is invoked as a cccmd, and in this
>>>>>>> case default to --no-git-fallback?  If it is invoked manually, I would
>>>>>>> like to show the committers (I will then cherry pick the right ones).
>>>>>> I don't like context-sensitive defaults.  Too much magic.
>>>>>>
>>>>>> What about this: if get_maintainer.pl comes up empty, it points you to
>>>>>> --git-fallback.
>>>>> This is exactly what it's doing now :)
>>>> Nope.  This is what it's doing now:
>>>>
>>>>      $ scripts/get_maintainer.pl -f util/cutils.c
>>>>      Luiz Capitulino <lcapitulino@redhat.com> (commit_signer:1/2=50%)
>>>>      Eric Blake <eblake@redhat.com> (commit_signer:1/2=50%)
>>>>      Alexey Kardashevskiy <aik@ozlabs.ru> (commit_signer:1/2=50%)
>>>>      Laszlo Ersek <lersek@redhat.com> (commit_signer:1/2=50%)
>>>>      Amit Shah <amit.shah@redhat.com> (commit_signer:1/2=50%)
>>>>
>>>> A sufficiently seasoned contributor will spot the "commit_signer" tags,
>>>> and the output as a hint to find people to copy.  In this particular
>>>> case, he'll recognize the hint is useless.  Maybe he'll try something
>>>> like --git-since 2010 or --git-blame then.  I'd just peruse git-log.
>>>>
>>>> A less seasoned contributor will blindly copy all five.
>>> I give up. What's the correct answer?
>>> I frankly don't know whom should one copy on this file.
>>> Fabrice?
>> Fabrice would be a textbook example of a useless cc.
>>
>> I'd pick based on the patch's contents.  For instance, if it fixes a
>> function that is used by block stuff only, try copying block
>> maintainers.  You get the idea.  It's an art, not something a dumb
>> script can do.
>>
>> An inexperienced contributor probably won't be able to find out whom to
>> copy here.  Making him send out five mostly useless copies is not a
>> solution.
> Maybe disable fallback just for utils:
>
> +UTIL
> +M: qemu-devel@nongnu.org
> +S: Odd Fixes
> +F: util/
>
>> Don proposed adding a catchall maintainer, and Peter refined
>> it to qemu-unmaintained@...  This could serve as a formal cry "I have no
>> idea who could review this, please help me".
>>
>> [...]
> The list is a good idea. But I'd like a flag to avoid adding that
> automatically. Call it --expert or whatever. So need to write some
> code in get_maintainer.
>

I.E just what I proposed.  Here is an adjusted version.  I have not 
posted it
as a patch because the list is missing...

    -Don Slutz

 From cf608abd785cc55c292215f2b7f18370eaf0969c Mon Sep 17 00:00:00 2001
From: Don Slutz <dslutz@verizon.com>
Date: Mon, 20 Oct 2014 16:06:35 -0400
Subject: [PATCH] get_maintainer.pl: Add 'THE REST'

For an example of how this might look:

k=50;i=0;for sha in $(git log --no-merges --format=format:"%h" -$k);do
  let i=$i+1
  git show $sha >/tmp/a
  clear
  echo $i
  head -20 /tmp/a
  echo
  echo
  echo to:
  ./scripts/get_maintainer.pl --no-git-fallback --no-m /tmp/a
  echo
  echo cc:
  ./scripts/get_maintainer.pl --no-git-fallback --no-l /tmp/a
  echo
  echo to \(git-fallback\):
  ./scripts/get_maintainer.pl --git-fallback --no-m /tmp/a
  echo
  echo cc \(git-fallback\):
  ./scripts/get_maintainer.pl --git-fallback --no-l /tmp/a
  read foo
done;echo Check $i

Signed-off-by: Don Slutz <dslutz@verizon.com>
---
  MAINTAINERS               |  9 +++++++++
  scripts/get_maintainer.pl | 15 +++++++++++++++
  2 files changed, 24 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 206bf7e..14abb0b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1018,3 +1018,12 @@ M: Chrysostomos Nanakos <cnanakos@grnet.gr>
  M: Chrysostomos Nanakos <chris@include.gr>
  S: Maintained
  F: block/archipelago.c
+
+Everything not covered above
+----------------------------
+THE REST
+M: qemu-unmaintained@nongnu.org
+L: qemu-devel@nongnu.org
+S: Orphan
+F: *
+F: */
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index d5eee8c..b9580b0 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -37,6 +37,7 @@ my $email_hg_since = "-365";
  my $interactive = 0;
  my $email_remove_duplicates = 1;
  my $email_use_mailmap = 1;
+my $email_drop_the_rest_orphan_if_supporter_found = 1;
  my $output_multiline = 1;
  my $output_separator = ", ";
  my $output_roles = 0;
@@ -196,6 +197,7 @@ if (!GetOptions(
                 'i|interactive!' => \$interactive,
                 'remove-duplicates!' => \$email_remove_duplicates,
                 'mailmap!' => \$email_use_mailmap,
+               'drop_the_rest_orphan!' => 
\$email_drop_the_rest_orphan_if_supporter_found,
                 'm!' => \$email_maintainer,
                 'n!' => \$email_usename,
                 'l!' => \$email_list,
@@ -647,6 +649,19 @@ sub get_maintainers {
         }
      }

+    if ($email_drop_the_rest_orphan_if_supporter_found && $#email_to > 0) {
+        my @email_new;
+        my $do_replace = 0;
+        foreach my $email (@email_to) {
+            if ($email->[1] ne 'orphan minder:THE REST') {
+                $do_replace = 1;
+                push @email_new, $email;
+            }
+        }
+        @email_to = @email_new
+            if $do_replace;
+    }
+
      foreach my $email (@email_to, @list_to) {
         $email->[0] = deduplicate_email($email->[0]);
      }
-- 
1.8.4

  reply	other threads:[~2014-10-22 19:25 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20  9:19 [Qemu-devel] [PATCH] get_maintainer.pl: Default to --no-git-fallback Markus Armbruster
2014-10-20 12:27 ` Don Slutz
2014-10-20 14:04 ` Peter Maydell
2014-10-20 14:15   ` Michael S. Tsirkin
2014-10-20 14:19     ` Peter Maydell
2014-10-20 19:03       ` Michael S. Tsirkin
2014-10-20 20:10         ` Don Slutz
2014-10-20 21:07           ` Peter Maydell
2014-10-21  9:31         ` Markus Armbruster
2014-10-21 10:00           ` Michael S. Tsirkin
2014-10-21 12:22             ` Markus Armbruster
2014-10-21 12:38               ` Michael S. Tsirkin
2014-10-21 13:29                 ` Markus Armbruster
2014-10-21 22:30                   ` Michael S. Tsirkin
2014-10-22  6:39                     ` Markus Armbruster
2014-10-22  7:01                       ` Michael S. Tsirkin
2014-10-22  8:10                         ` Thomas Huth
2014-10-22  8:18                           ` Michael S. Tsirkin
2014-10-20 18:38     ` Paolo Bonzini
2014-10-21 11:09       ` Gerd Hoffmann
2014-10-21 11:15         ` Michael S. Tsirkin
2014-10-21 11:23           ` Gerd Hoffmann
2014-10-21 11:35             ` Michael S. Tsirkin
2014-10-21 13:34       ` Markus Armbruster
2014-10-21 13:39         ` Paolo Bonzini
2014-10-21 13:46         ` Kirill Batuzov
2014-10-21 22:31         ` Michael S. Tsirkin
2014-10-22  7:01           ` Markus Armbruster
2014-10-22  7:12             ` Michael S. Tsirkin
2014-10-22  7:45               ` Paolo Bonzini
2014-10-22  8:03               ` Markus Armbruster
2014-10-22  8:29                 ` Michael S. Tsirkin
2014-10-22 19:25                   ` Don Slutz [this message]
2014-10-21  6:22     ` Thomas Huth
2014-10-21  9:19     ` Markus Armbruster
2014-10-21 13:40       ` Kirill Batuzov
2014-10-21 14:15         ` Markus Armbruster
2014-10-21 22:35           ` Michael S. Tsirkin
2014-10-20 15:06 ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544804A5.6090202@terremark.com \
    --to=dslutz@verizon.com \
    --cc=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.