Message ID | 20110413111221.GA21237@bottich |
---|---|
State | Accepted |
Headers | show |
Hi Dirk, > Drop the parse buffer if the start of a new diff is encountered in > state 1. Looks good, applied. No problem about the holdup :) Cheers, Jeremy
diff --git a/apps/patchwork/parser.py b/apps/patchwork/parser.py index 2b5e9a0..a432f4f 100644 --- a/apps/patchwork/parser.py +++ b/apps/patchwork/parser.py @@ -81,6 +81,11 @@ def parse_patch(text): commentbuf += line elif state == 1: + if line.startswith('diff') or line.startswith('===') \ + or line.startswith('Index: '): + commentbuf += buf + buf = '' + buf += line if line.startswith('--- '): state = 2