diff options
author | Guilherme Salgado <guilherme.salgado@linaro.org> | 2011-02-28 01:50:24 +0000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2011-03-08 15:07:49 +0800 |
commit | 479a6a88c41203aca1a1f44253554a4f28d2e248 (patch) | |
tree | 320ea1bda154c7591f1dde124d7716da0d4a96c0 /apps/patchwork/bin | |
parent | f7a3c5dff0da19e6bd737c51187a1f5aa7373c67 (diff) | |
download | patchwork-479a6a88c41203aca1a1f44253554a4f28d2e248.tar.bz2 patchwork-479a6a88c41203aca1a1f44253554a4f28d2e248.tar.xz |
parser: Allow pull requests to include a diff
If a patch comes along with a pull request and a diff, add both to the
Patch model.
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/bin')
-rwxr-xr-x | apps/patchwork/bin/parsemail.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/patchwork/bin/parsemail.py b/apps/patchwork/bin/parsemail.py index 2a4df38..c36dae4 100755 --- a/apps/patchwork/bin/parsemail.py +++ b/apps/patchwork/bin/parsemail.py @@ -185,15 +185,9 @@ def find_content(project, mail): patch = None comment = None - if patchbuf: - mail_headers(mail) + if pullurl or patchbuf: name = clean_subject(mail.get('Subject'), [project.linkname]) - patch = Patch(name = name, content = patchbuf, - date = mail_date(mail), headers = mail_headers(mail)) - - if pullurl: - name = clean_subject(mail.get('Subject'), [project.linkname]) - patch = Patch(name = name, pull_url = pullurl, + patch = Patch(name = name, pull_url = pullurl, content = patchbuf, date = mail_date(mail), headers = mail_headers(mail)) if commentbuf: |