From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Rebecca Cran <rebecca@bsdio.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Bob Feng <bob.c.feng@intel.com>,
Yuwei Chen <yuwei.chen@intel.com>,
Leif Lindholm <quic_llindhol@quicinc.com>
Subject: [edk2-devel] [edk2-stable202311][Patch v2 4/4] BaseTools/Scripts/GetMaintainer: Sort output addresses
Date: Fri, 10 Nov 2023 09:04:03 -0800 [thread overview]
Message-ID: <20231110170403.1068-5-michael.d.kinney@intel.com> (raw)
In-Reply-To: <20231110170403.1068-1-michael.d.kinney@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4593
Sort the list of output addresses alphabetically so this
script produces the same output even if the order of patches
in a patch series is modified such that that order of files
processed by this script changes.
Use set() logic instead of OrderedDict to accumulate the
list of unique addresses that are sorted alphabetically.
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
BaseTools/Scripts/GetMaintainer.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py
index a887962dd1bd..b33546b10f21 100644
--- a/BaseTools/Scripts/GetMaintainer.py
+++ b/BaseTools/Scripts/GetMaintainer.py
@@ -191,15 +191,16 @@ if __name__ == '__main__':
else:
FILES = get_modified_files(REPO, ARGS)
- ADDRESSES = []
-
+ # Accumulate a sorted list of addresses
+ ADDRESSES = set([])
for file in FILES:
print(file)
maintainers, reviewers, lists = get_maintainers(file, SECTIONS)
- if maintainers or reviewers or lists:
- ADDRESSES += (maintainers + reviewers + lists)
+ ADDRESSES |= set(maintainers + reviewers + lists)
+ ADDRESSES = list(ADDRESSES)
+ ADDRESSES.sort()
- for address in list(OrderedDict.fromkeys(ADDRESSES)):
+ for address in ADDRESSES:
if '<' in address and '>' in address:
address = address.split('>', 1)[0] + '>'
print(' %s' % address)
--
2.40.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111045): https://edk2.groups.io/g/devel/message/111045
Mute This Topic: https://groups.io/mt/102510793/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2023-11-10 17:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 17:03 [edk2-devel] [edk2-stable202311][Patch v2 0/4] BaseTools/Scripts/GetMaintainer: Handle reviewer only case Michael D Kinney
2023-11-10 17:04 ` [edk2-devel] [edk2-stable202311][Patch v2 1/4] BaseTools/Scripts/GetMaintainer: Fix logic bug collecting maintainers Michael D Kinney
2023-11-10 17:04 ` [edk2-devel] [edk2-stable202311][Patch v2 2/4] BaseTools/Scripts/GetMaintainer: Handle reviewer only case Michael D Kinney
2023-11-10 17:04 ` [edk2-devel] [edk2-stable202311][Patch v2 3/4] BaseTools/Scripts/GetMaintainer: Simplify logic Michael D Kinney
2023-11-10 17:04 ` Michael D Kinney [this message]
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-list 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=20231110170403.1068-5-michael.d.kinney@intel.com \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox