annotate tests/unwrap-message-id.py @ 46800:186c0f6fbc16

tests: ask any chg instance to terminate before looking at sqlite dbs There are spurious errors in CI where the database is still locked, so force the daemon to quit to get deterministic behavior. Since the kill command itself is racy, also sleep 2s to give the server time to wake up and exit. Differential Revision: https://phab.mercurial-scm.org/D10244
author Joerg Sonnenberger <joerg@bec.de>
date Sat, 20 Mar 2021 00:37:57 +0100
parents a1908951ca42
children 6000f5b25c9b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43334
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
1 from __future__ import absolute_import, print_function
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
2
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
3 import sys
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
4
44405
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
5 for line in sys.stdin:
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
6 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
7 line = line[:-2]
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
8 print(line, end="")