From patchwork Mon Feb 28 11:50:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guilherme Salgado X-Patchwork-Id: 84814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 380ECB7122 for ; Mon, 28 Feb 2011 22:50:33 +1100 (EST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by ozlabs.org (Postfix) with ESMTP id D9986B7106 for ; Mon, 28 Feb 2011 22:50:30 +1100 (EST) Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Pu1cS-0000P4-G7; Mon, 28 Feb 2011 11:50:28 +0000 Received: from [187.126.165.64] (helo=feioso) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Pu1cR-0008PE-S7; Mon, 28 Feb 2011 11:50:28 +0000 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by feioso (Postfix) with ESMTP id 37BC3416EA; Mon, 28 Feb 2011 08:50:24 -0300 (BRT) Subject: [PATCH] Make sure the diffs of pull requests are stored in the Patch object. To: patchwork@lists.ozlabs.org From: Guilherme Salgado Date: Mon, 28 Feb 2011 08:50:24 -0300 Message-ID: <20110228114705.9021.87375.stgit@localhost6.localdomain6> In-Reply-To: <20110218192734.7482.59325.stgit@localhost6.localdomain6> References: <20110218192734.7482.59325.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Cc: Jeremy Kerr , patches@linaro.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Signed-off-by: Guilherme Salgado --- apps/patchwork/bin/parsemail.py | 10 - .../mail/0002-git-pull-request-with-diff.mbox | 141 ++++++++++++++++++++ apps/patchwork/tests/patchparser.py | 15 ++ 3 files changed, 158 insertions(+), 8 deletions(-) create mode 100644 apps/patchwork/tests/mail/0002-git-pull-request-with-diff.mbox diff --git a/apps/patchwork/bin/parsemail.py b/apps/patchwork/bin/parsemail.py index 700cb6f..f823075 100755 --- a/apps/patchwork/bin/parsemail.py +++ b/apps/patchwork/bin/parsemail.py @@ -183,15 +183,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: diff --git a/apps/patchwork/tests/mail/0002-git-pull-request-with-diff.mbox b/apps/patchwork/tests/mail/0002-git-pull-request-with-diff.mbox new file mode 100644 index 0000000..b4d578c --- /dev/null +++ b/apps/patchwork/tests/mail/0002-git-pull-request-with-diff.mbox @@ -0,0 +1,141 @@ +From benh@kernel.crashing.org Fri Oct 22 11:51:02 2010 +Return-Path: +X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bilbo.ozlabs.org +X-Spam-Level: +X-Spam-Status: No, score=0.0 required=3.0 tests=none autolearn=disabled + version=3.3.1 +X-Original-To: jk@ozlabs.org +Delivered-To: jk@ozlabs.org +Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) + by ozlabs.org (Postfix) with ESMTP id ED4B3100937 + for ; Fri, 22 Oct 2010 14:51:54 +1100 (EST) +Received: by ozlabs.org (Postfix) + id BF799B70CB; Fri, 22 Oct 2010 14:51:50 +1100 (EST) +Delivered-To: linuxppc-dev@ozlabs.org +Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by ozlabs.org (Postfix) with ESMTPS id 94629B7043 + for ; Fri, 22 Oct 2010 14:51:49 +1100 (EST) +Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) + by gate.crashing.org (8.14.1/8.13.8) with ESMTP id o9M3p3SP018234; + Thu, 21 Oct 2010 22:51:04 -0500 +Subject: [git pull] Please pull powerpc.git next branch +From: Benjamin Herrenschmidt +To: Linus Torvalds +Date: Fri, 22 Oct 2010 14:51:02 +1100 +Message-ID: <1287719462.2198.37.camel@pasglop> +Mime-Version: 1.0 +X-Mailer: Evolution 2.30.3 +Cc: linuxppc-dev list , + Andrew Morton , + Linux Kernel list +X-BeenThere: linuxppc-dev@lists.ozlabs.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: Linux on PowerPC Developers Mail List +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Content-Type: text/plain; + charset="us-ascii" +Content-Transfer-Encoding: 7bit +Sender: linuxppc-dev-bounces+jk=ozlabs.org@lists.ozlabs.org +Errors-To: linuxppc-dev-bounces+jk=ozlabs.org@lists.ozlabs.org +X-UID: 11446 +X-Length: 16781 +Status: R +X-Status: N +X-KMail-EncryptionState: +X-KMail-SignatureState: +X-KMail-MDN-Sent: + +The following changes since commit e10117d36ef758da0690c95ecffc09d5dd7da479: + Linus Torvalds (1): + Merge branch 'upstream-linus' of git://git.kernel.org/.../jgarzik/libata-dev + +are available in the git repository at: + + git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus + +------------------> +H. Peter Anvin (1): + x86-32: Make sure the stack is set up before we use it +Matthieu CASTET (1): + x86, nx: Don't force pages RW when setting NX bits + +Suresh Siddha (1): + x86, mtrr: Avoid MTRR reprogramming on BP during boot on UP platforms + + + arch/x86/include/asm/smp.h | 5 +---- + arch/x86/kernel/acpi/sleep.c | 2 +- + arch/x86/kernel/cpu/mtrr/main.c | 10 +++++++++- + arch/x86/kernel/head_32.S | 30 +++++++++++++----------------- + arch/x86/kernel/smpboot.c | 4 ++-- + arch/x86/mm/pageattr.c | 8 -------- + 6 files changed, 26 insertions(+), 33 deletions(-) +diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h +index 4c2f63c..1f46951 100644 +--- a/arch/x86/include/asm/smp.h ++++ b/arch/x86/include/asm/smp.h +@@ -40,10 +40,7 @@ DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); + DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); + + /* Static state in head.S used to set up a CPU */ +-extern struct { +- void *sp; +- unsigned short ss; +-} stack_start; ++extern unsigned long stack_start; /* Initial stack pointer address */ + + struct smp_ops { + void (*smp_prepare_boot_cpu)(void); +diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c +index 69fd72a..4d9ebba 100644 +--- a/arch/x86/kernel/acpi/sleep.c ++++ b/arch/x86/kernel/acpi/sleep.c +@@ -100,7 +100,7 @@ int acpi_save_state_mem(void) + #else /* CONFIG_64BIT */ + header->trampoline_segment = setup_trampoline() >> 4; + #ifdef CONFIG_SMP +- stack_start.sp = temp_stack + sizeof(temp_stack); ++ stack_start = (unsigned long)temp_stack + sizeof(temp_stack); + early_gdt_descr.address = + (unsigned long)get_cpu_gdt_table(smp_processor_id()); + initial_gs = per_cpu_offset(smp_processor_id()); +diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c +index 01c0f3e..bebabec 100644 +--- a/arch/x86/kernel/cpu/mtrr/main.c ++++ b/arch/x86/kernel/cpu/mtrr/main.c +@@ -793,13 +793,21 @@ void set_mtrr_aps_delayed_init(void) + } + + /* +- * MTRR initialization for all AP's ++ * Delayed MTRR initialization for all AP's + */ + void mtrr_aps_init(void) + { + if (!use_intel()) + return; + ++ /* ++ * Check if someone has requested the delay of AP MTRR initialization, ++ * by doing set_mtrr_aps_delayed_init(), prior to this point. If not, ++ * then we are done. ++ */ ++ if (!mtrr_aps_delayed_init) ++ return; ++ + set_mtrr(~0U, 0, 0, 0); + mtrr_aps_delayed_init = false; + } +_______________________________________________ +Linuxppc-dev mailing list +Linuxppc-dev@lists.ozlabs.org +https://lists.ozlabs.org/listinfo/linuxppc-dev diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py index ff0025a..46cabc3 100644 --- a/apps/patchwork/tests/patchparser.py +++ b/apps/patchwork/tests/patchparser.py @@ -333,3 +333,18 @@ class GitPullTest(PatchTest): self.assertTrue(patch.pull_url is not None) self.assertTrue(patch.content is None) self.assertTrue(comment is not None) + + def testGitPullRequestWithDiff(self): + mail = read_mail('0002-git-pull-request-with-diff.mbox', + project = self.project) + (patch, comment) = find_content(self.project, mail) + self.assertTrue(patch is not None) + self.assertEqual( + ('git://git.kernel.org/pub/scm/linux/kernel/git/tip/' + 'linux-2.6-tip.git x86-fixes-for-linus'), + patch.pull_url) + self.assertTrue( + patch.content.startswith( + 'diff --git a/arch/x86/include/asm/smp.h'), + patch.content) + self.assertTrue(comment is not None)