From nobody Fri Apr 19 21:35:12 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547200966107518.6362940426736; Fri, 11 Jan 2019 02:02:46 -0800 (PST) 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 CFBFEC075BF5; Fri, 11 Jan 2019 10:02:44 +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 BDB0B601A3; Fri, 11 Jan 2019 10:02:44 +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 AF67E3F7CD; Fri, 11 Jan 2019 10:02:44 +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 x0BA2hIf022694 for ; Fri, 11 Jan 2019 05:02:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8CA3C17D57; Fri, 11 Jan 2019 10:02:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82B0D6B628 for ; Fri, 11 Jan 2019 10:02:39 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (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 95952C04F4DD for ; Fri, 11 Jan 2019 10:02:37 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id r10so14488984wrs.10 for ; Fri, 11 Jan 2019 02:02:37 -0800 (PST) Received: from donizetti.lan ([2001:b07:6468:f312:29c6:8eb4:8a56:e1f2]) by smtp.gmail.com with ESMTPSA id k7sm59223761wrl.51.2019.01.11.02.02.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 02:02:35 -0800 (PST) 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=0w7Lor4nyBr6rhqGhJJGx41timfup6E0fn7rZN0VLNU=; b=UUNsAfDJlC0y5wYpJZajnUOnnqLSOfeACHEG7DPl5JidHBogeHHAg3h7ntcF2vuLiG Ebc6+rx8Og8P7t5Ndl32a+Mb6brx/hc1c9p89ZyhHkoWo/bG1yiWFP2i4btYae8TYTog IVK5DAMovH7SpQVcxGVJU8DxWUQuzKsT16NohxO/2svqAh2kByppe78/W2+NU0gMl1CS GLs/7QJrf6Q/ZfHdpDE6V7QZSjDWxdHE6jYHWLBAtvvSt6jrloxVEKHft/rn5AcCyDzx GvVTgaKjUCDaiL+DolbzDVqZGsqZS7NtDOPIHxpwI2WPQ61uy6LUQgWhvwOlb01hZ/d+ orUw== 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=0w7Lor4nyBr6rhqGhJJGx41timfup6E0fn7rZN0VLNU=; b=uSdK2jXVq192J9cjvWdr49z6IrDBZzQ+bM1VJgJ0UEKFJsO7Z9wfP7DR0MJLEZPNhe 0hZJQvc5aRDIl+18+jXtvZ790Ow6jlITVIef1oQCHeGngIYD9egGXVJWEwjpTwqG7P8c pWkSikRuxLEoGeOJRx7cfq0dHPK4Xmmb+HpUg4ucSeFryr9Ym4hteV2DgzThzbxie178 2RihPhxoA8dHoH4JvjIurc5wENzbu9kPGI4UkZynWPkflbuzZ+sTkyWebJu2LPZGMazn yMs0+/pwGzYHwQ8876MlopzE00UT3pc4G1IkgSXcMxOeIcC9XJIxne0GPjs9dpEiLwBr EvWA== X-Gm-Message-State: AJcUukdeWrksPB9u4POMQBpvue+06XABOa+2sw80vOLG59Ec98poto80 pd1kE8krsHY5mwgvjNp0qjEAmIDMfHo= X-Google-Smtp-Source: ALg8bN6Fm3+iArinri4x9kMDAjJVhdL2TuIA1LVFBKUjoeF91aOHKgmIoUl3SPAAur4WfCC5RL8rew== X-Received: by 2002:a05:6000:100f:: with SMTP id a15mr13291473wrx.298.1547200955777; Fri, 11 Jan 2019 02:02:35 -0800 (PST) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 11 Jan 2019 11:02:33 +0100 Message-Id: <20190111100233.24335-2-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.31]); Fri, 11 Jan 2019 10:02:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 11 Jan 2019 10:02:37 +0000 (UTC) for IP:'209.85.221.65' DOMAIN:'mail-wr1-f65.google.com' HELO:'mail-wr1-f65.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.008 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.221.65 mail-wr1-f65.google.com 209.85.221.65 mail-wr1-f65.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] applier: synchronize tags lazily into the cache 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.31]); Fri, 11 Jan 2019 10:02:44 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Every time the patchew's applier mode is restarted, it repopulates a cache of git repositories. For QEMU, the git repo has thousands of tags which take a very long time to create. Synchronize refs/heads/* only (--mirror=3Dfetch would synchronize all of refs/*); the tags are only used by patchew-cli when a Based-on trailer is found, and can be populated lazily. Signed-off-by: Paolo Bonzini --- patchew-cli | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/patchew-cli b/patchew-cli index 5a39f79..6a78f81 100755 --- a/patchew-cli +++ b/patchew-cli @@ -43,9 +43,19 @@ def git_clone_repo(clone, remote, head, logf, checkout= =3DTrue, recursive=3DFalse): cwd=3Dcache_repo, stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PIPE) - subprocess.check_call(["git", "remote", "add", "-f", "--mirror=3Dfetch= ", + subprocess.check_call(["git", "remote", "add", remote_name, remote], cwd=3Dcache_repo, stdout=3Dlogf, stderr=3Dlogf) + subprocess.check_call(["git", "config", + "remote.%s.fetch" % (remote_name,), + "+refs/heads/*:refs/heads/*"], cwd=3Dcache_repo, + stdout=3Dlogf, stderr=3Dlogf) + if head.startswith("refs/tags/"): + subprocess.check_call(["git", "fetch", remote_name, "+%s:%s" % (he= ad, head)], + cwd=3Dcache_repo, stdout=3Dlogf, stderr=3Dlo= gf) + else: + subprocess.check_call(["git", "fetch", remote_name], cwd=3Dcache_r= epo, + stdout=3Dlogf, stderr=3Dlogf) clone_cmd =3D ["git", "clone", "-q"] if recursive: clone_cmd +=3D ["--recursive"] --=20 2.20.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel