From nobody Fri Mar 29 05:39:34 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 1519369196821671.9615129687411; Thu, 22 Feb 2018 22:59:56 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5073C28261; Fri, 23 Feb 2018 01:59:56 -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 5jrDo8pAbezt; Fri, 23 Feb 2018 01:59:56 -0500 (EST) Received: from turing.freelists.org (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0D4C42820E; Fri, 23 Feb 2018 01:59:56 -0500 (EST) Received: with ECARTIS (v1.0.0; list patchew-devel); Fri, 23 Feb 2018 01:59:55 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D3F2428261 for ; Fri, 23 Feb 2018 01:59:55 -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 6KRqi-FQaROB for ; Fri, 23 Feb 2018 01:59:55 -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 B1EAD2820E for ; Fri, 23 Feb 2018 01:59:55 -0500 (EST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60CE5EAEAB for ; Fri, 23 Feb 2018 06:59:55 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-21.pek2.redhat.com [10.72.12.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id C742A2024CAB; Fri, 23 Feb 2018 06:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org; s=turing; t=1519369196; bh=Ifky6Fxvoqm0DiPYRpdJOG8mYUYSBMU8oGYOZU9FLBI=; 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=tXsd0ZkaadTEG+b6V3iQqfdHAfDV1fmnU/YwmXyqgFDYulyJtVAWom8sNkEjdrLr4 bsO1x8aELBDNodfrJcy2SSTPIslR2KxQFENg2JYhuGCjvZutzMJD5IvZntmTcgJARF 0rmSz3XBYUi3Sz9MhB15zOIhb7Qxo4H0DGTmrGGk= 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=1519369196; bh=Ifky6Fxvoqm0DiPYRpdJOG8mYUYSBMU8oGYOZU9FLBI=; 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=tXsd0ZkaadTEG+b6V3iQqfdHAfDV1fmnU/YwmXyqgFDYulyJtVAWom8sNkEjdrLr4 bsO1x8aELBDNodfrJcy2SSTPIslR2KxQFENg2JYhuGCjvZutzMJD5IvZntmTcgJARF 0rmSz3XBYUi3Sz9MhB15zOIhb7Qxo4H0DGTmrGGk= 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: pbonzini@redhat.com, famz@redhat.com Subject: [patchew-devel] [PATCH v4 1/3] git: Improve info if git URL/repo/tag field missing Date: Fri, 23 Feb 2018 14:59:41 +0800 Message-Id: <20180223065943.15251-2-famz@redhat.com> In-Reply-To: <20180223065943.15251-1-famz@redhat.com> References: <20180223065943.15251-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 23 Feb 2018 06:59:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 23 Feb 2018 06:59:55 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'famz@redhat.com' RCPT:'' X-archive-position: 30 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 | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/mods/git.py b/mods/git.py index 2be8904..610aab5 100644 --- a/mods/git.py +++ b/mods/git.py @@ -155,17 +155,32 @@ 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), + }) + else: + message.status_tags.append({ + "title": format_html("Patches applied succeeded"), + "type": "info", + "char": "G", + }) + message.extra_status.append({ + "kind": "good", + "html": format_html('Patches applied successfully = ({})', + colorbox_a), + "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), - }) 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