2020-06-08 16:40:44 -07:00
|
|
|
#! /usr/bin/env python3
|
2015-03-05 15:49:20 -08: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.
|
|
|
|
|
2019-04-10 13:11:23 +00:00
|
|
|
import projectconfig_ruamellib as yaml
|
2015-03-05 15:49:20 -08:00
|
|
|
|
2017-10-21 18:00:13 +02:00
|
|
|
|
2015-03-05 15:49:20 -08:00
|
|
|
def main():
|
|
|
|
|
|
|
|
data = yaml.load(open('gerrit/projects.yaml'))
|
|
|
|
|
2015-03-05 15:57:58 -08:00
|
|
|
for project in data:
|
2021-07-01 22:45:22 +00:00
|
|
|
if 'upstream' in project:
|
2015-03-05 15:57:58 -08:00
|
|
|
del project['upstream']
|
|
|
|
|
2015-03-05 15:49:20 -08:00
|
|
|
with open('gerrit/projects.yaml', 'w') as out:
|
2019-04-09 19:35:05 +02:00
|
|
|
yaml.dump(data, stream=out)
|
2015-03-05 15:49:20 -08:00
|
|
|
|
2020-01-14 09:39:30 +11:00
|
|
|
|
2015-03-05 15:49:20 -08:00
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|