From nobody Wed May 15 10:00:25 2024 Delivered-To: importer@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=1605881324; cv=none; d=zohomail.com; s=zohoarc; b=JuS8iuoWYHjXpVNTvBO58Aow1/cnctR/ekS6n+Jj/O4CK+uR+B3zS6aA77FbVuGLVCw+D2HkSp8fcl/Nn8us/4oWTbfzW0jiCYSYBErbB8cjEU1fZ8BrRTnZ1QRnj7PxmSrePv2BDsHrxptUP/tLY6o3u1ZPTXcuS84ujb3OHAM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605881324; 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=WHBIZSlagh2NxJB6wNxczhVeFPvFxhKXtT3IWJvPy+Y=; b=EvMWGOAA9wLHdPWosqfsiymMp+yS2bR5FEjDJNHtavIfrq7iDkVEgWYnwvXxO13nGykcxYGfFVjeIKxPbNZzHJZ4j8qwcknP+D100YkU2Na4/kVb/yJOgpsQvZyRay8CCxEFh0fRm3hVQ/jd+ZwL7zuRTTpnav/j9co6C/tf5R8= 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 160588132427415.642368403522482; Fri, 20 Nov 2020 06:08:44 -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-305-eDAvVqMyPSWWjwd-xGw9wQ-1; Fri, 20 Nov 2020 09:08:40 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B35B100A643; Fri, 20 Nov 2020 14:08:39 +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 323845D6BA; Fri, 20 Nov 2020 14:08:39 +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 C9C754EEEE; Fri, 20 Nov 2020 14:08:24 +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 0AKE8NJn002578 for ; Fri, 20 Nov 2020 09:08:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8ADF65C230; Fri, 20 Nov 2020 14:08:23 +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 086435C1D5 for ; Fri, 20 Nov 2020 14:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605881323; 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=WHBIZSlagh2NxJB6wNxczhVeFPvFxhKXtT3IWJvPy+Y=; b=WmnZdYR2PltEfsLhkcNhEZnEsbO8dzBufBLQAMGjt+EZAn1gTWgWrLXXX+ZVWGX806UuU9 F4QMt17IBHyDdqQOuR4nHBrw4dpaAnVj+H7IvFKdDdit7iTnZ10sn/TMjSIl0Dkb9UOHbP dOITdVWkvbHZdc06u4Xjn1mNVf/WyBM= X-MC-Unique: eDAvVqMyPSWWjwd-xGw9wQ-1 From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 20 Nov 2020 15:08:03 +0100 Message-Id: <20201120140803.153272-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] 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.15 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patchew-cli b/patchew-cli index 9cfdf36..0b53516 100755 --- a/patchew-cli +++ b/patchew-cli @@ -361,14 +361,14 @@ class ProjectCommand(SubCommand): if old_head =3D=3D new_head: logging.info("no change since last update") return - except: - old_head =3D "%s~100" % 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", "%s..%s" % (old_head, new_head), "= ^%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