2020-06-08 16:40:44 -07:00
|
|
|
#! /usr/bin/env python3
|
2015-09-28 17:05:37 -04:00
|
|
|
#
|
|
|
|
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
|
|
# implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import locale
|
|
|
|
import sys
|
2019-04-10 13:11:23 +00:00
|
|
|
import projectconfig_ruamellib as yaml
|
2015-09-28 17:05:37 -04:00
|
|
|
|
2017-10-21 18:00:13 +02:00
|
|
|
|
2015-09-28 17:05:37 -04:00
|
|
|
def main():
|
|
|
|
locale.setlocale(locale.LC_COLLATE, 'C')
|
|
|
|
|
|
|
|
chandata = yaml.load(open('gerritbot/channels.yaml'))
|
2019-04-09 19:35:05 +02:00
|
|
|
|
2017-10-21 18:00:13 +02:00
|
|
|
for k, v in chandata.items():
|
2015-09-28 17:05:37 -04:00
|
|
|
v['projects'] = sorted(v['projects'])
|
|
|
|
|
2019-04-09 19:35:05 +02:00
|
|
|
yaml.dump(chandata, stream=sys.stdout)
|
2015-09-28 17:05:37 -04:00
|
|
|
|
2020-01-14 09:39:30 +11:00
|
|
|
|
2015-09-28 17:05:37 -04:00
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|