summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2023-11-10 11:30:53 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-11-11 02:31:13 +0000
commit33deaa3b845f0d588ffd068003558be46f90aaac (patch)
tree29e879722d3fb45f367677d7f9f809878c00cf22 /BaseTools
parent706811819dcbc16ee53c621ee552f81cc87526e0 (diff)
downloadedk2-33deaa3b845f0d588ffd068003558be46f90aaac.tar.gz
edk2-33deaa3b845f0d588ffd068003558be46f90aaac.tar.bz2
edk2-33deaa3b845f0d588ffd068003558be46f90aaac.zip
BaseTools/Scripts/GetMaintainer: Sort output addresses
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> Acked-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Scripts/GetMaintainer.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py
index 1361fb6c0e..8097ba4e7b 100644
--- a/BaseTools/Scripts/GetMaintainer.py
+++ b/BaseTools/Scripts/GetMaintainer.py
@@ -192,14 +192,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)
recipients = get_maintainers(file, SECTIONS)
- ADDRESSES += recipients['maintainers'] + recipients['reviewers'] + recipients['lists']
+ ADDRESSES |= set(recipients['maintainers'] + recipients['reviewers'] + recipients['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)