From nobody Fri Apr 19 01:03:09 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1605881452; cv=none; d=zohomail.com; s=zohoarc; b=ZzGkBphMl2KZz4Zo9GjKnA17gxQvXr9kJ0iC0oIXrAgmmUXJzn2rmLX44P42flHD15INmpb3dkkjEI1QO6xobWyu0ogiVkYzSPvaEJrfZIEVUYdaOGN81uJXHW3/vjx6HX4adrNXqKHzrloR5jA02AUst/NLbXygZnpVERj/ChM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605881452; 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; bh=OvoewxcB80ZM/G7/Aw+vwHBJv383ZgrpWevgrL3t73o=; b=nLwpvX+eQLTMn9u3O1d9SkSg/UmvoyPqgIFXGZZDydHHKh7X0CqVhj2dixw5TATcsYaGeP5It57QrTOAFou5/1aC4mm9pdYaRPdiwDfrmm6/lJBLwCufJyBk1P+fmLH0+x/lyzToGsa8EZhx3+o7WtOaM9HGuiprw+a49WHK9Us= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605881452396575.0929860502849; Fri, 20 Nov 2020 06:10:52 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-345-1nchB-8AOiCYcAhjP7auZw-1; Fri, 20 Nov 2020 09:10:49 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A4F8100A645; Fri, 20 Nov 2020 14:10:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 332615C230; Fri, 20 Nov 2020 14:10:48 +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 2C40E4A7C6; Fri, 20 Nov 2020 14:10:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKEAkhV002961 for ; Fri, 20 Nov 2020 09:10:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 14B185C230; Fri, 20 Nov 2020 14:10:46 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-204.ams2.redhat.com [10.36.112.204]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A07B5C1D5 for ; Fri, 20 Nov 2020 14:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605881451; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OvoewxcB80ZM/G7/Aw+vwHBJv383ZgrpWevgrL3t73o=; b=DW86DcLN2QtL3upX5c1ieAJuPFJCPFUwjX5ZZUeqZrJ53gsRzV7iB4FFBK+hTK08Eccixb uCHgx7oC50CgaGpQxcGKpnNB5FfCl12Uw/Jir9QPX3K8j/b1BZdLdavppQVIyilnSfPzjM EjRDtH4PzBuUIhQWS0RRriaiEeNzxNk= X-MC-Unique: 1nchB-8AOiCYcAhjP7auZw-1 From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 20 Nov 2020 15:10:38 +0100 Message-Id: <20201120141039.153568-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH v2] tweak how the importer limits itself to 100 commits only 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: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use "old_head..new_head ^new_head~100" to go back 100 commits on the first parent only. This way, merge commits are counted as one. --- patchew-cli | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/patchew-cli b/patchew-cli index 9cfdf36..f872c1d 100755 --- a/patchew-cli +++ b/patchew-cli @@ -361,14 +361,17 @@ class ProjectCommand(SubCommand): if old_head =3D=3D new_head: logging.info("no change since last update") return + commit_range =3D "%s..%s" % (old_head, new_head) except: - old_head =3D "%s~100" % new_head + commit_range =3D new_head =20 try: # TODO: relax this 100 limit, which probably need an API chang= e. + # using -100 would count all commits, while "^HEAD~100" counts= merge + # commits as one new_commits =3D ( subprocess.check_output( - ["git", "rev-list", "-n", "100", "%s..%s" % (old_head,= new_head)], cwd=3Dclone + ["git", "rev-list", commit_range, "^%s~100" % new_head= ], cwd=3Dclone ) .decode() .splitlines() --=20 2.28.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel