From nobody Thu Apr 25 10:50:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555481561; cv=none; d=zoho.com; s=zohoarc; b=hj6tN6NVCJctcBYBrYUUXjaxYgipMyhGNmgy6wt5/fTjRkymK4iwDTzlWb6dXQkzwKcmarLVBGOu21uccZsQMowecMc/gJsrTtangTHjBHpXs+We+rfO1nYsUx5FoWC5/Z9EKI+kvpO0DytgcudHtFO2p7PYwUmKlrBvdqjQ9KE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555481561; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=I5qPv4iDkJSRW4gPoPq2U9cKh/INCBtdtiEhyW/jK5U=; b=g/C43SJEl7F172wcdKVs36N7lPCvjRKWULsqGxCrpVXM/B9BnhSFa3/Vf34TW3TE/NTqv4WjqsWx8fyOXFc+uoHNr1G8+yuQzE6uuzFCiEejPXUKuHXMbXuhCj6X7NxN6hQoHrQmG0R8w0VPXPT2x3djCkqTvJ5PRZ8wttRQaBg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555481561940590.4768939538587; Tue, 16 Apr 2019 23:12:41 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8BC71307CDD6; Wed, 17 Apr 2019 06:12:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F5F76013D; Wed, 17 Apr 2019 06:12:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 70857181AC45; Wed, 17 Apr 2019 06:12:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3H6C3ai000740 for ; Wed, 17 Apr 2019 02:12:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id C328A5D9D4; Wed, 17 Apr 2019 06:12:03 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD4B55D9D3 for ; Wed, 17 Apr 2019 06:12:01 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7CA881F12 for ; Wed, 17 Apr 2019 06:12:00 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id w16so271802wrl.1 for ; Tue, 16 Apr 2019 23:12:00 -0700 (PDT) Received: from donizetti.lan ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id a126sm1845174wmh.4.2019.04.16.23.11.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 23:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=+wAECYzqZOUd0pavUoRztMcnfyxinkFFJwafcrQGz9o=; b=HN87PWU7oC8lfR2Zjo84R5hj10OKZ643FjA1fssTWqMbrRDv1hUSCozi3w/mSV7vr3 HQlILJWTcVXk2gqB7pOFrhUzNAKIfmTFQbi4Zg/r9ZdkoKtaz1IWL8RVuhvnrkeAImUD dTDmNZ3/n68+0lIv0G8JycR4NdVUIZVr4jv0rlgCnv4Gah/0mDITuLLN99qVu5qPHmio 1c2gZcxWB/OG0u76KV4Ar7ORgH1EufOd6BwO2K+gQSUW7BnTZhxGWoMJNPyrUanK457j tcc6/qx0uPzicdak1GJvcvcvJvdkS8Aul2QxDY7Ct8MnwubZy2R6B8aV1v2xQLvHmza+ okEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=+wAECYzqZOUd0pavUoRztMcnfyxinkFFJwafcrQGz9o=; b=ZlW5CwTmo3rLXQnP9yeaKPRtGAy+KaSV7aTQ9MprDW1C7N3bA8x+6dVPvwrquzJh2g PK0INwDQXlRp4ys51m2x/RyFB1UlJumfhuyEAbCnaq8pR9fItONUMFkVSudMb9eQimF6 qpSdmJr1QqnbgdUch98QdenRfjgdOc1jIFwA8IxFEyai02goC4U4RpNl+tSiUG+yReyE q61o/etUPxLxm5lptO/V7NbME9ggLf15sgNBl689xAxWWc1bfg+QRufgaaI3MMTwcIMG ZBNFowg4fulFxPEEa8XqQ88bITczQmq9IHjybziDgUNNQ2knuClJA895AblNUsvONni3 FMNw== X-Gm-Message-State: APjAAAVwV+VGRVITSkWvuRcQP2scdHOxQXIHrsTmW1TgLOLcBeoGGVsq H+WI948PeVEfpxhv7iIOX+eCAcjE X-Google-Smtp-Source: APXvYqw0ckNvxIHKos6hPqDNc8RtCHQvATrr8384DiybQITu5gfRd3FIrD+jcnNQYvA6Nt1xtmKQtA== X-Received: by 2002:a5d:538d:: with SMTP id d13mr56697917wrv.45.1555481519222; Tue, 16 Apr 2019 23:11:59 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 08:11:58 +0200 Message-Id: <20190417061158.1404-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 17 Apr 2019 06:12:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 17 Apr 2019 06:12:00 +0000 (UTC) for IP:'209.85.221.68' DOMAIN:'mail-wr1-f68.google.com' HELO:'mail-wr1-f68.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.234 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.221.68 mail-wr1-f68.google.com 209.85.221.68 mail-wr1-f68.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] models: refine diffstat regexes X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 17 Apr 2019 06:12:40 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Avoid false positives by making the regexes more strict, and add a new regex for binary diffs. Signed-off-by: Paolo Bonzini --- api/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/models.py b/api/models.py index faae8c0..d2dafde 100644 --- a/api/models.py +++ b/api/models.py @@ -687,12 +687,15 @@ class Message(models.Model): cur =3D [] patterns =3D [ r"\S*\s*\|\s*[0-9]*( \+*-*)?$", + r"\S*\s*\|\s*Bin", r"\S* =3D> \S*\s*|\s*[0-9]* \+*-*$", r"[0-9]* files changed", r"1 file changed", r"(create|delete) mode [0-7]+", r"mode change [0-7]+", - r"rename ", + r"rename .*\([0-9]+%\)$", + r"copy .*\([0-9]+%\)$", + r"rewrite .*\([0-9]+%\)$", ] ret =3D [] for l in self.get_body().splitlines(): --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel