tests/unwrap-message-id.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Sep 2022 15:49:14 +0200
branchstable
changeset 49469 b5c8524827d2
parent 48875 6000f5b25c9b
permissions -rw-r--r--
dirstate-v2: no longer register the data-file during transaction If the data file change during the transaction, we cannot truncate it. The content of the file itself is fine as it will get backed up at the same time as the docket. Leaving the trailing data at the end of failed transaction is fine. The dirstate-v2 format supports it. The dead data will simply we written over if necessary.
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="")