hgext/fastannotate/error.py
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 23 Aug 2018 12:24:41 +0900
changeset 40092 58786930ea27
parent 39210 1ddb296e0dee
child 43076 2372284d9457
permissions -rw-r--r--
tests: use environment variable indirectly Using environment variable directly in heredoc python code will cause syntax error at checking module importation by import-checker.py strictly, because "$varname" is invalid in Python syntax. "$varname" becomes valid after environment variable substitution by shell at writing text into file. Current import-checker.py overlooks code fragment changed in this patch, because of a restriction below for a line starting code fragment. - filename must be specified before limit mark NG: cat <<EOF > FILE.py OK: cat > FILE.py <<EOF import-checker.py itself is fixed in subsequent patch.

# Copyright 2016-present Facebook. All Rights Reserved.
#
# error: errors used in fastannotate
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import

class CorruptedFileError(Exception):
    pass

class CannotReuseError(Exception):
    """cannot reuse or update the cache incrementally"""