Skip to contentSkip to conversation

scripts/get_maintainer.pl: Correctly CC the maintainers

PATCH In review Julien Grall 3 participants 3 messages Nov 20, 2014 – Nov 25, 2014 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 scripts/get_maintainer.pl: Correctly CC the maintainers

The current script is setting $email_remove_duplicates to 1 by default, on complex patch (see [1]), this will result to ommitting randomly some maintainers.

This is because, the script will:
1) Get the list of maintainers of the file (incidentally all the maintainers in "THE REST" role are added). If the email address already exists in the global list, skip it. => The role will be lost
2) Filter the list to remove the entry with "THE REST" role

So if a maintainers is marked with "THE REST" role on the first file and actually be an x86 maintainers on the script, the script will only retain the "THE REST" role. During the filtering step, this maintainers will therefore be dropped.

This patch fixes this by setting $email_remove_duplicates to 0 by default. The new behavior of the script will be:
1) Append the list of maintainers for every file
2) Filter the list to remove the entry with "THE REST" role
3) Remove duplicated email address

Example:

Patch: https://patches.linaro.org/41083/

Before the patch:

Daniel De Graaf <[email protected]>
Ian Jackson <[email protected]> Stefano Stabellini <[email protected]> Ian Campbell <[email protected]>
Wei Liu <[email protected]>
George Dunlap <[email protected]> [email protected]

After the patch:

Daniel De Graaf <[email protected]>
Ian Jackson <[email protected]> Stefano Stabellini <[email protected]> Ian Campbell <[email protected]>
Wei Liu <[email protected]>
Stefano Stabellini <[email protected]> Tim Deegan <[email protected]>
Keir Fraser <[email protected]>
Jan Beulich <[email protected]>
George Dunlap <[email protected]> [email protected]

[1] http://lists.xenproject.org/archives/html/xen-devel/2014-11/msg00060.html

---
Changes in v2:
- Rework the commit message to explain the problem and the solution more clearly

I would like to see this patch in Xen 4.5 and backported to Xen 4.4 (first time the script has been introduced).

Developpers using this script won't ommitted to cc some maintainers, and it will avoid maintainers complaining about miss CC.

The only drawbacks I can see is if the maintainers is referenced twice in the file MAINTAINERS with different email, the script won't notice it's duplicated and list 2 times. Though, for this one it could be fixed by modifying the MAINTAINERS file. Is it worth for Xen 4.5? For know, it seems to only happen with Stefano.

---
 scripts/get_maintainer.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/get_maintainer.pl +1 -1
index df920e2..cc445cd 100755
@@ -35,7 +35,7 @@ my $email_git_min_percent = 5;
 my $email_git_since = "1-year-ago";
 my $email_hg_since = "-365";
 my $interactive = 0;
-my $email_remove_duplicates = 1;
+my $email_remove_duplicates = 0;
 my $email_use_mailmap = 1;
 my $email_drop_the_rest_supporter_if_supporter_found = 1;
 my $output_multiline = 1;
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · Julien Grall

The current script is setting $email_remove_duplicates to 1 by default, on complex patch (see [1]), this will result to ommitting randomly some maintainers.

One could see that as feature - the emails about bugs or patches to review don't land in your inbox!

Quoted 59 lines

This is because, the script will:
1) Get the list of maintainers of the file (incidentally all the maintainers in "THE REST" role are added). If the email address already exists in the global list, skip it. => The role will be lost
2) Filter the list to remove the entry with "THE REST" role

So if a maintainers is marked with "THE REST" role on the first file and actually be an x86 maintainers on the script, the script will only retain the "THE REST" role. During the filtering step, this maintainers will therefore be dropped.

This patch fixes this by setting $email_remove_duplicates to 0 by default. The new behavior of the script will be:
1) Append the list of maintainers for every file
2) Filter the list to remove the entry with "THE REST" role
3) Remove duplicated email address

Example:

Patch: https://patches.linaro.org/41083/

Before the patch:

Daniel De Graaf <[email protected]>
Ian Jackson <[email protected]> Stefano Stabellini <[email protected]> Ian Campbell <[email protected]>
Wei Liu <[email protected]>
George Dunlap <[email protected]> [email protected]

After the patch:

Daniel De Graaf <[email protected]>
Ian Jackson <[email protected]> Stefano Stabellini <[email protected]> Ian Campbell <[email protected]>
Wei Liu <[email protected]>
Stefano Stabellini <[email protected]> Tim Deegan <[email protected]>
Keir Fraser <[email protected]>
Jan Beulich <[email protected]>
George Dunlap <[email protected]> [email protected]

[1] http://lists.xenproject.org/archives/html/xen-devel/2014-11/msg00060.html

---
Changes in v2:
- Rework the commit message to explain the problem and the solution more clearly

I would like to see this patch in Xen 4.5 and backported to Xen 4.4 (first time the script has been introduced).

Quoted 8 lines

Developpers using this script won't ommitted to cc some maintainers, and it will avoid maintainers complaining about miss CC.

The only drawbacks I can see is if the maintainers is referenced twice in the file MAINTAINERS with different email, the script won't notice it's duplicated and list 2 times. Though, for this one it could be fixed by modifying the MAINTAINERS file. Is it worth for Xen 4.5? For know, it seems to only happen with Stefano.

I am OK with this going in Xen 4.5.

Thank you.

Quoted 25 lines
---
 scripts/get_maintainer.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/get_maintainer.pl +1 -1
index df920e2..cc445cd 100755
@@ -35,7 +35,7 @@ my $email_git_min_percent = 5;
 my $email_git_since = "1-year-ago";
 my $email_hg_since = "-365";
 my $interactive = 0;
-my $email_remove_duplicates = 1;
+my $email_remove_duplicates = 0;
 my $email_use_mailmap = 1;
 my $email_drop_the_rest_supporter_if_supporter_found = 1;
 my $output_multiline = 1;
Signature · 7 lines
1.7.10.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#2 lore raw
Quoted 11 lines · Konrad Rzeszutek Wilk
Quoted 11 lines

---
Changes in v2:
- Rework the commit message to explain the problem and the solution more clearly

I would like to see this patch in Xen 4.5 and backported to Xen 4.4 (first time the script has been introduced).

Developpers using this script won't ommitted to cc some maintainers, and it will avoid maintainers complaining about miss CC.

Quoted 7 lines
Quoted 5 lines

The only drawbacks I can see is if the maintainers is referenced twice in the file MAINTAINERS with different email, the script won't notice it's duplicated and list 2 times. Though, for this one it could be fixed by modifying the MAINTAINERS file. Is it worth for Xen 4.5? For know, it seems to only happen with Stefano.

I am OK with this going in Xen 4.5.

Acked + Applied, thanks.