From nobody Sat Apr 20 06:41:02 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 206.53.239.180 is neither permitted nor denied by domain of freelists.org) client-ip=206.53.239.180; envelope-from=patchew-devel-bounce@freelists.org; helo=turing.freelists.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=none (zoho.com: 206.53.239.180 is neither permitted nor denied by domain of freelists.org) smtp.mailfrom=patchew-devel-bounce@freelists.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from turing.freelists.org (turing.freelists.org [206.53.239.180]) by mx.zohomail.com with SMTPS id 1519280022564150.6987949555786; Wed, 21 Feb 2018 22:13:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id F09842AAE2; Thu, 22 Feb 2018 01:13:41 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xjBXCnbvtZfn; Thu, 22 Feb 2018 01:13:41 -0500 (EST) Received: from turing.freelists.org (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id AD7AB2AAD6; Thu, 22 Feb 2018 01:13:41 -0500 (EST) Received: with ECARTIS (v1.0.0; list patchew-devel); Thu, 22 Feb 2018 01:13:41 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7C0042AAE2 for ; Thu, 22 Feb 2018 01:13:41 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0tm5tA_BGtwy for ; Thu, 22 Feb 2018 01:13:41 -0500 (EST) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 62B0A2AAD6 for ; Thu, 22 Feb 2018 01:13:41 -0500 (EST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 244128182D20 for ; Thu, 22 Feb 2018 06:13:41 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-115.pek2.redhat.com [10.72.12.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id C4C7FAF021; Thu, 22 Feb 2018 06:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org; s=turing; t=1519280021; bh=+Pgsyho+leuoCn0MZ4u+wQdDAmGe9Dl9M1BwyB2/LnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-help: List-unsubscribe:List-Id:List-subscribe:List-owner:List-post: List-archive; b=hl5hDp0jCpL/xQtaOPjADDQ4X7iSaNUD2RU6w42hy+cChyU05CUvnX2Dbd7FAQVEK Dgj9m4wriwJFIett0/XR6Eo7m7jMKh5NYLb38ZnOpwwmNlpFckSVyqsTatSqAnBfBf kAxzwHbyYgDbtC+hgX9cIk5NYIHG8+XxompJ1vRY= X-Virus-Scanned: Debian amavisd-new at turing.freelists.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org; s=turing; t=1519280021; bh=+Pgsyho+leuoCn0MZ4u+wQdDAmGe9Dl9M1BwyB2/LnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-help: List-unsubscribe:List-Id:List-subscribe:List-owner:List-post: List-archive; b=hl5hDp0jCpL/xQtaOPjADDQ4X7iSaNUD2RU6w42hy+cChyU05CUvnX2Dbd7FAQVEK Dgj9m4wriwJFIett0/XR6Eo7m7jMKh5NYLb38ZnOpwwmNlpFckSVyqsTatSqAnBfBf kAxzwHbyYgDbtC+hgX9cIk5NYIHG8+XxompJ1vRY= X-Original-To: patchew-devel@freelists.org X-Virus-Scanned: Debian amavisd-new at turing.freelists.org From: Fam Zheng To: patchew-devel@freelists.org Cc: famz@redhat.com Subject: [patchew-devel] [PATCH 1/2] git: Improve info if git URL/repo/tag field missing Date: Thu, 22 Feb 2018 14:13:29 +0800 Message-Id: <20180222061330.18996-2-famz@redhat.com> In-Reply-To: <20180222061330.18996-1-famz@redhat.com> References: <20180222061330.18996-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 22 Feb 2018 06:13:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 22 Feb 2018 06:13:41 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'famz@redhat.com' RCPT:'' X-archive-position: 21 X-ecartis-version: Ecartis v1.0.0 Sender: patchew-devel-bounce@freelists.org Errors-to: patchew-devel-bounce@freelists.org X-original-sender: famz@redhat.com Precedence: normal Reply-To: patchew-devel@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: patchew-devel X-List-ID: patchew-devel List-subscribe: List-owner: List-post: List-archive: X-list: patchew-devel X-ZohoMail-DKIM: pass (identity @freelists.org) X-ZohoMail: RDKM_0 RSF_4 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Fam Zheng --- mods/git.py | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/mods/git.py b/mods/git.py index 431b672..b397032 100644 --- a/mods/git.py +++ b/mods/git.py @@ -141,19 +141,33 @@ class GitModule(PatchewModule): git_url =3D message.get_property("git.url") git_repo =3D message.get_property("git.repo") git_tag =3D message.get_property("git.tag") - message.status_tags.append({ - "url": git_url, - "title": format_html("Applied as tag {} in repo {}", g= it_tag, git_repo), - "type": "info", - "char": "G", + if git_url: + message.status_tags.append({ + "url": git_url, + "title": format_html("Applied as tag {} in repo {}= ", git_tag, git_repo), + "type": "info", + "char": "G", + }) + if git_repo and git_tag: + message.extra_status.append({ + "kind": "good", + "html": format_html('Patches applied successfu= lly (tree, {}).
git fetch {} {}', + git_url, colorbox_a, git_r= epo, git_tag), + "extra": colorbox_div, + "id": "gitlog" + }) + else: + message.status_tags.append({ + "title": format_html("Patch apply succeeded"), + "type": "info", + "char": "G", + }) + message.extra_status.append({ + "kind": "good", + "html": format_html('Patches applied successfully'= ), + "extra": colorbox_div, + "id": "gitlog" }) - message.extra_status.append({ - "kind": "good", - "html": format_html('Patches applied successfully (tree, {}).
git fetch {} {}', - git_url, colorbox_a, git_repo, git= _tag), - "extra": colorbox_div, - "id": "gitlog" - }) if request.user.is_authenticated: if message.get_property("git.apply-failed") !=3D None or \ message.get_property("git.need-apply") =3D=3D None: --=20 2.14.3 From nobody Sat Apr 20 06:41:02 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 206.53.239.180 is neither permitted nor denied by domain of freelists.org) client-ip=206.53.239.180; envelope-from=patchew-devel-bounce@freelists.org; helo=turing.freelists.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=none (zoho.com: 206.53.239.180 is neither permitted nor denied by domain of freelists.org) smtp.mailfrom=patchew-devel-bounce@freelists.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from turing.freelists.org (turing.freelists.org [206.53.239.180]) by mx.zohomail.com with SMTPS id 1519280024546753.4785949041548; Wed, 21 Feb 2018 22:13:44 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0486D2AABB; Thu, 22 Feb 2018 01:13:44 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hempEPx-w8Kk; Thu, 22 Feb 2018 01:13:43 -0500 (EST) Received: from turing.freelists.org (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B54792A832; Thu, 22 Feb 2018 01:13:43 -0500 (EST) Received: with ECARTIS (v1.0.0; list patchew-devel); Thu, 22 Feb 2018 01:13:43 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 803FE2AAE3 for ; Thu, 22 Feb 2018 01:13:43 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SjGZXHXyp_k7 for ; Thu, 22 Feb 2018 01:13:43 -0500 (EST) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 5D8432AAD6 for ; Thu, 22 Feb 2018 01:13:43 -0500 (EST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1EEDAEAEA0 for ; Thu, 22 Feb 2018 06:13:43 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-115.pek2.redhat.com [10.72.12.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFABEAF021; Thu, 22 Feb 2018 06:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org; s=turing; t=1519280024; bh=ZyAOhVcQLTbsYXxtBzcPGBQBDgYyXLZNaOdnFykWWYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-help: List-unsubscribe:List-Id:List-subscribe:List-owner:List-post: List-archive; b=oqKYbwfPQSa1AuSFvLZ06qn9FUsavBchx81UDFmV/vGqO+EzwNUPoYOv3/HseeXCv nGCWE1qQ7ch1jfuxNK+KtlqwuF0Vp1wRdzUM0tV4zIsu8GjlGL3j8MulKSOpfrQqrB x3zA/+k+dXvnXIHIYDKjJauo5O1T0CQ8Xhvurwfw= X-Virus-Scanned: Debian amavisd-new at turing.freelists.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org; s=turing; t=1519280023; bh=ZyAOhVcQLTbsYXxtBzcPGBQBDgYyXLZNaOdnFykWWYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-help: List-unsubscribe:List-Id:List-subscribe:List-owner:List-post: List-archive; b=CsrtaawCa+grmqdbvJ5yjPho4iOGhRz6hLFynCXsTwwOcUqL0cOC5bPZuOSTShOy/ 1fZ3GgQ0sKlolqchSZIjJMk8YfSfe1Zsw3aW9ejGujJdq2xCFzMGOyw4bnmTHS6f6G ywHqfK0IzbRQYHZZwnnN2CDxkcexjn3Tl3/Nks8c= X-Original-To: patchew-devel@freelists.org X-Virus-Scanned: Debian amavisd-new at turing.freelists.org From: Fam Zheng To: patchew-devel@freelists.org Cc: famz@redhat.com Subject: [patchew-devel] [PATCH 2/2] subproject support Date: Thu, 22 Feb 2018 14:13:30 +0800 Message-Id: <20180222061330.18996-3-famz@redhat.com> In-Reply-To: <20180222061330.18996-1-famz@redhat.com> References: <20180222061330.18996-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 22 Feb 2018 06:13:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 22 Feb 2018 06:13:43 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'famz@redhat.com' RCPT:'' X-archive-position: 22 X-ecartis-version: Ecartis v1.0.0 Sender: patchew-devel-bounce@freelists.org Errors-to: patchew-devel-bounce@freelists.org X-original-sender: famz@redhat.com Precedence: normal Reply-To: patchew-devel@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: patchew-devel X-List-ID: patchew-devel List-subscribe: List-owner: List-post: List-archive: X-list: patchew-devel X-ZohoMail-DKIM: pass (identity @freelists.org) (identity @freelists.org) X-ZohoMail: RDKM_0 RSF_4 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This extends Project model to allow a simple (two-level) "subproject" hierarchy. A parent_project field is added. It can be NULL for the usual top-level projects, or can point to an existing top-level project, to make a "subproject". The project list page only shows top-level project. But the series list page shows series in both the top-level project or in a subprojct. The link to a subproject's information page is added in the top-level one's. Signed-off-by: Fam Zheng --- api/migrations/0022_project_parent_project.py | 21 +++++++++++++++++++++ api/models.py | 17 +++++++++++++++-- api/search.py | 2 +- tests/data/0019-libvirt-python.mbox.gz | Bin 0 -> 1816 bytes tests/data/0020-libvirt.mbox.gz | Bin 0 -> 4034 bytes tests/test_import.py | 26 ++++++++++++++++++++++= ++++ www/templates/project-detail.html | 9 +++++++++ www/views.py | 4 ++-- 8 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 api/migrations/0022_project_parent_project.py create mode 100644 tests/data/0019-libvirt-python.mbox.gz create mode 100644 tests/data/0020-libvirt.mbox.gz diff --git a/api/migrations/0022_project_parent_project.py b/api/migrations= /0022_project_parent_project.py new file mode 100644 index 0000000..ba91400 --- /dev/null +++ b/api/migrations/0022_project_parent_project.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-02-14 06:19 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies =3D [ + ('api', '0021_fix_recipients_utf8'), + ] + + operations =3D [ + migrations.AddField( + model_name=3D'project', + name=3D'parent_project', + field=3Dmodels.ForeignKey(blank=3DTrue, help_text=3D'Parent pr= oject which this\n project belongs to= ', null=3DTrue, on_delete=3Ddjango.db.models.deletion.CASCADE, to=3D'api.Pr= oject'), + ), + ] diff --git a/api/models.py b/api/models.py index a9cc5ce..9686e97 100644 --- a/api/models.py +++ b/api/models.py @@ -68,6 +68,13 @@ class Project(models.Model): display_order =3D models.IntegerField(default=3D0, help_text=3D"""Order number of the= project to display, higher number first""") + parent_project =3D models.ForeignKey('Project', on_delete=3Dmodels.CAS= CADE, + blank=3DTrue, null=3DTrue, + help_text=3D"""Parent project which= this + project belongs to. The parent must= be a + top project which has + parent_project=3DNULL""") + def __str__(self): return self.name =20 @@ -150,6 +157,9 @@ class Project(models.Model): return True return False =20 + def get_subprojects(self): + return Project.objects.filter(parent_project=3Dself) + class ProjectProperty(models.Model): project =3D models.ForeignKey('Project', on_delete=3Dmodels.CASCADE) name =3D models.CharField(max_length=3D1024, db_index=3DTrue) @@ -174,9 +184,12 @@ class MessageManager(models.Manager): q =3D super(MessageManager, self).get_queryset()\ .filter(is_series_head=3DTrue).prefetch_related('propertie= s', 'project') if isinstance(project, str): - q =3D q.filter(project__name=3Dproject) + po =3D Project.objects.get(name=3Dproject) elif isinstance(project, int): - q =3D q.filter(project__id=3Dproject) + po =3D Project.objects.get(id=3Dproject) + else: + return q + q =3D q.filter(project=3Dpo) | q.filter(project__parent_project=3D= po) return q =20 def find_series(self, message_id, project_name=3DNone): diff --git a/api/search.py b/api/search.py index 6fae279..ba3703c 100644 --- a/api/search.py +++ b/api/search.py @@ -192,7 +192,7 @@ Search text keyword in the email message. Example: elif term.startswith("project:"): cond =3D term[term.find(":") + 1:] self._projects.add(cond) - q =3D Q(project__name=3Dcond) + q =3D Q(project__name=3Dcond) | Q(project__parent_project__nam= e=3Dcond) else: # Keyword in subject is the default q =3D as_keywords(term) diff --git a/tests/data/0019-libvirt-python.mbox.gz b/tests/data/0019-libvi= rt-python.mbox.gz new file mode 100644 index 0000000000000000000000000000000000000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?MvK`m_7T$nez6FixF$*mtTre>+n7wfD$k6 zR}2-Y4SW9{yYIPpMhzQXrom~db-|D02?11sA3rvX6jN*xk<`E|$o*V-a?$Qz(M|rl zfB5g>8bxU;yl7VCYEHSfS0jHVb72I;##VDe5Gso+DGK1LXhAjb${)Am>6;0a;|h1b z0jvesvYP*{Ac`tlRZ%hW{4_*dGwUjW^W}d>OLJF6(R$TRG)iZb?eH0^JP|^7j@ei$ zy`u7Xb6282u-H!#Gu*>JcTI1FB@XE>`cxX0<2)QAdr0+%nU`VH%;C5R+)Dbam#D5 zRS%xo5$|M#O?FA^a$Th2KDu!JDt{xlE_j7?*_}Cy5d*dcjY7)rqjGk)lE$GYO5mlf zIwDT23AR(LQ@vtYM6VR}boFLcArIj1+yji|EWYg6g$~Wg$F>=3DVmopq%&hpFXRRmcJ zKN=3D5vzpfy_IAy#`b^uXe{&AWgnb+oi^Z}4LSUNM-THTxhJ;pWXCW~&->F#?o;x3+j z)6gw~+W&BrXbp>NJ@48L7x?|gPGHS?2J~s+^ZbP015dX{V(+Lo4Wp`7BxzRDF^4vD zy@T)BaST368dbF#zgp$*+$Z`cG3#gaFhS?Pc%$q4H7;}oX@~UV1z&=3DG;Di5c2l`XA znm>&Yz-QE!)01+(UAJdA$1z3%OWpe(y79Asf>_|wg?|_5S7Q>Wy>=3Di%@kQt^stBlrPoR6-L2 oL6J16A}IoX5fabtfSyPa&-6ved1U>Dr=3D7z81B@OGj4Lky0I +{% if project.get_subprojects %} +
+
Subprojects: + {% for p in project.get_subprojects %} + {{ p.name }} + {% endfor %} +
+
+{% endif %} {% for status in project.extra_status %}
{% if status.icon %} diff --git a/www/views.py b/www/views.py index 6fc29aa..75bc700 100644 --- a/www/views.py +++ b/www/views.py @@ -86,10 +86,10 @@ def prepare_series_list(request, sl): return [prepare_message(request, s, False) for s in sl] =20 def prepare_projects(): - return api.models.Project.objects.all().order_by('-display_order', 'na= me') + return api.models.Project.objects.filter(parent_project=3DNone).order_= by('-display_order', 'name') =20 def view_project_list(request): - return render_page(request, "project-list.html", projects=3Dprepare_pr= ojects) + return render_page(request, "project-list.html", projects=3Dprepare_pr= ojects()) =20 def gen_page_links(total, cur_page, pagesize, extra_params): max_page =3D int((total + pagesize - 1) / pagesize) --=20 2.14.3