project-config/tools/normalize_projects_yaml.py
Jeremy Stanley ef03e7fa36 Drop use of track-upstream
When upgrading from Gerrit 2.13 to 3.2 we stopped relying on a local
fork of its source and have been building from (more recently
completely unmolested) upstream source. This fork was the only place
we were relying on jeepyb's track-upstream feature, so we can stop
looking for it in our checks and normalization as well.

Remove the check_gerrit_projects_changed scripts as well, as they
only existed to run things where track-upstream was enabled.

Change-Id: I597c1a577c53e2db61413d9ec531378667691d2a
2021-07-06 16:45:22 +00:00

35 lines
966 B
Python
Executable File

#! /usr/bin/env python3
#
# 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 projectconfig_ruamellib as yaml
def main():
data = yaml.load(open('gerrit/projects.yaml'))
for project in data:
if 'upstream' in project:
del project['upstream']
with open('gerrit/projects.yaml', 'w') as out:
yaml.dump(data, stream=out)
if __name__ == '__main__':
main()