| Submitter | Dirk Wallenstein |
|---|---|
| Date | April 13, 2011, 11:12 a.m. |
| Message ID | <20110413111221.GA21237@bottich> |
| Download | mbox | patch |
| Permalink | /patch/90985/ |
| State | Accepted |
| Headers | show |
Comments
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
Patch
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