From nobody Mon Sep 16 19:10:37 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