summaryrefslogtreecommitdiff
path: root/PRESUBMIT.py
blob: 64abb3cfc754a6ecb309670a972b74582a585cd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Copyright 2023 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Hook to stop people from running `git cl`."""

import sys

USE_PYTHON3 = True


def CheckChangeOnUpload(_input_api, _output_api):
    print(
        "ERROR: CrOS repos use `repo upload`, not `git cl upload`.\n"
        "See https://chromium.googlesource.com/chromiumos/docs/+/HEAD/contributing.md#upload-changes.",
        file=sys.stderr,
    )
    sys.exit(1)