tests/unwrap-message-id.py
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 48875 6000f5b25c9b
permissions -rw-r--r--
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43334
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     1
import sys
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     2
44405
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     3
for line in sys.stdin:
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     4
    if line.lower() in ("message-id: \n", "in-reply-to: \n"):
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     5
        line = line[:-2]
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     6
    print(line, end="")