Changeset 105670 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/BaseTools/Scripts/GetMaintainer.py
- Timestamp:
- Aug 14, 2024 1:16:30 PM (4 months ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-159268 /vendor/edk2/current 103735-103757,103769-103776,129194-164365
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/BaseTools/Scripts/GetMaintainer.py
r99404 r105670 77 77 matching the provided path in the provided section.""" 78 78 maintainers = [] 79 reviewers = [] 79 80 lists = [] 80 81 nowarn_status = ['Supported', 'Maintained'] … … 84 85 if status not in nowarn_status: 85 86 print('WARNING: Maintained status for "%s" is \'%s\'!' % (path, status)) 86 for address in section['maintainer'] , section['reviewer']:87 for address in section['maintainer']: 87 88 # Convert to list if necessary 88 89 if isinstance(address, list): 89 90 maintainers += address 90 91 else: 91 lists += [address] 92 maintainers += [address] 93 for address in section['reviewer']: 94 # Convert to list if necessary 95 if isinstance(address, list): 96 reviewers += address 97 else: 98 reviewers += [address] 92 99 for address in section['list']: 93 100 # Convert to list if necessary … … 97 104 lists += [address] 98 105 99 return maintainers, lists106 return {'maintainers': maintainers, 'reviewers': reviewers, 'lists': lists} 100 107 101 108 def get_maintainers(path, sections, level=0): … … 103 110 for matching ones.""" 104 111 maintainers = [] 112 reviewers = [] 105 113 lists = [] 106 114 for section in sections: 107 tmp_maint, tmp_lists = get_section_maintainers(path, section) 108 if tmp_maint: 109 maintainers += tmp_maint 110 if tmp_lists: 111 lists += tmp_lists 115 recipients = get_section_maintainers(path, section) 116 maintainers += recipients['maintainers'] 117 reviewers += recipients['reviewers'] 118 lists += recipients['lists'] 112 119 113 120 if not maintainers: … … 116 123 print('"%s": no maintainers found, looking for default' % path) 117 124 if level == 0: 118 maintainers = get_maintainers('<default>', sections, level=level + 1) 125 recipients = get_maintainers('<default>', sections, level=level + 1) 126 maintainers += recipients['maintainers'] 127 reviewers += recipients['reviewers'] 128 lists += recipients['lists'] 119 129 else: 120 130 print("No <default> maintainers set for project.") … … 122 132 return None 123 133 124 return maintainers + lists134 return {'maintainers': maintainers, 'reviewers': reviewers, 'lists': lists} 125 135 126 136 def parse_maintainers_line(line): … … 183 193 FILES = get_modified_files(REPO, ARGS) 184 194 185 ADDRESSES = []186 195 # Accumulate a sorted list of addresses 196 ADDRESSES = set([]) 187 197 for file in FILES: 188 198 print(file) 189 addresslist = get_maintainers(file, SECTIONS) 190 if addresslist: 191 ADDRESSES += addresslist 192 193 for address in list(OrderedDict.fromkeys(ADDRESSES)): 199 recipients = get_maintainers(file, SECTIONS) 200 ADDRESSES |= set(recipients['maintainers'] + recipients['reviewers'] + recipients['lists']) 201 ADDRESSES = list(ADDRESSES) 202 ADDRESSES.sort() 203 204 for address in ADDRESSES: 194 205 if '<' in address and '>' in address: 195 206 address = address.split('>', 1)[0] + '>'
Note:
See TracChangeset
for help on using the changeset viewer.