diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-30 18:30:04 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-30 18:30:04 -0400 |
commit | 4d1673ea2d845709f1fed3cd314c7a36e53a1c65 (patch) | |
tree | 391c9f1d4f33e97c5490cfa5ded0b246c1b3a4c6 | |
parent | 7e035d16a7c6903b6f4ffa6cd41834367647ece6 (diff) | |
download | b4-4d1673ea2d845709f1fed3cd314c7a36e53a1c65.tar.gz |
Escape From lines in git-format-patch output
We need a valid mboxo format for python, so make sure to escape all
From lines not actually starting a new message, per mboxo requirements.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/pr.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -222,6 +222,10 @@ def explode(gitdir, lmsg, savefile): logger.critical(out) sys.exit(ecode) + # Fix From lines to make sure this is a valid mboxo + out = re.sub(r'^From (?![a-f0-9]+ \w+ \w+ \d+ \d+:\d+:\d+ \d+$)', '>From ', out, 0, re.M) + print(out) + # Save patches into a temporary file patchmbx = mkstemp()[1] with open(patchmbx, 'w') as fh: |