From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id eK7rC2uA/mZX3AAAqHPOHw:P1 (envelope-from ) for ; Thu, 03 Oct 2024 11:30:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eK7rC2uA/mZX3AAAqHPOHw (envelope-from ) for ; Thu, 03 Oct 2024 13:30:51 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b="TwHnxh5/"; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727955051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fPRtlM5/qV5m4j5MmTOb0s9hQRdUDRLnvCLdhH4H1aI=; b=AKD+5YMzgUikol7bd0j0kwq9ynuOji1GPHBAA203SddysyWEdxje7cyFVTocXKB0yqHyvI XHCduE6vc0FSx+OUuunyZdLPcDMnhq1lDA4vhJiZSMVKai17fdh6I/sEorWNm4CjN3ufqM xA2IlB+9KrtPGgiSYacmCwOIhLIr0u2PK3x02MA9nOK1h1EslVSryOVhf0J9TeEff1lnQC hM+QuKO5fxM50Bq2lyJdHqCk4VLqL2vgTVyP8gDN4as1LH5rJ7erRSmfZt5rj7DN5KMqcx 2yzb/5AQ8aOl5X1/zokPNxIA9bO9uDaUKYfXkwNDSheekaVUICSMooLPspP1Tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b="TwHnxh5/"; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727955051; a=rsa-sha256; cv=none; b=QUK3kYihsQh8WEHTRq52p7cBwGsouxL+luF9EzyMaoodNT3UMqdkg+q9eIUfJaqTncH4M5 McglGZEyGm/3QXnDkPCdREchFGRMWEdsBXdY1EqyXyjl8IRY9sEysANbcIB+cWz2s3d4+W MOGH75OYsGsrsE/qKwY2W5eSznDZZfpeqIHKAI6Ngi42xik6Yg9sBCOUSHrxku7T+sW4hk SOdvCXTBhzaGhLBrK/sfmjXIIuQmCIfAMGlunH9OuPtxlYFT5AxC3odXxAo6hEbzwO+6lu FxHvWylnKllPurBf+NXqYbkmEErWxF21+OxO1ULqBThOunAqI1+XhGdEifSY7w== Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9C2C0814BC for ; Thu, 03 Oct 2024 13:30:50 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CD7A75F6B6; Thu, 3 Oct 2024 11:22:48 +0000 (UTC) Received: from phubs.tethera.net (phubs.tethera.net [IPv6:2607:5300:60:3a9d::1]) by mail.notmuchmail.org (Postfix) with ESMTPS id 5F4915E50D for ; Thu, 3 Oct 2024 11:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net; i=@tethera.net; q=dns/txt; s=2024; t=1727954557; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=DjoWOfkvmmcOMtivv/lY3etXtThpe9Bo8z2rsLkYITI=; b=TwHnxh5/xb6CVZ91+KZCGEr8/kjkGuSp9lMmHr7deVtOKUlvp99s3BrnnEvSej4OAaAhv EgW6VRF4ICnvC+OSN+es+fg2YYk4+eH5H6hjzC3C3p6OscpmwPur0lO9SVAuNQybZb7SYqQ 2ZWhOJ+AjQPGpB/KsgGzcP2q9vQWdXQVMC6q++khDZppTuG7BfKeYdL6BphlqJSHJ3hOiXL dVswKPjCmYHjjzYNWNRAG+qJwsvYQppTREChAgudB6tJxAHzGTkrpX3Jjdi5qBSWOjzVgN5 pGbGwDMjCFsOOtjESmMJAMOpQ37lZ8cAYY+ZKd6PkWerL3U5w6OnHUzYRm6w== Received: from tethera.net (fctnnbsc51w-159-2-211-58.dhcp-dynamic.fibreop.nb.bellaliant.net [159.2.211.58]) by phubs.tethera.net (Postfix) with ESMTPS id 8F67518006E for ; Thu, 3 Oct 2024 08:22:37 -0300 (ADT) Received: (nullmailer pid 629201 invoked by uid 1000); Thu, 03 Oct 2024 11:22:37 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: [PATCH v2 2/4] cli: start remote helper for git. In-Reply-To: <20240908113937.286108-3-david@tethera.net> References: <20240908113937.286108-1-david@tethera.net> <20240908113937.286108-3-david@tethera.net> Date: Thu, 03 Oct 2024 08:22:37 -0300 Message-ID: <87ttdt4eiq.fsf@tethera.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Message-ID-Hash: V45E7X5VJXKLLLMRTOIZUDEQZABLSGES X-Message-ID-Hash: V45E7X5VJXKLLLMRTOIZUDEQZABLSGES X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 6.28 X-Spam-Score: 6.28 X-Migadu-Queue-Id: 9C2C0814BC X-TUID: Rk2Cr0gcI/QM --=-=-= Content-Type: text/plain David Bremner writes: > +EXPECTED=$NOTMUCH_SRCDIR/test/git-remote.expected-output > +MAKE_EXPORT_PY=$NOTMUCH_SRCDIR/test/make-export.py I see I lost the script make-export.py going from v1 to v2. I will re-roll the series to include it, but I want try a refactor that puts the URL parsing into the library in a new notmuch_database_open_url function that can be re-used by e.g. neomutt (hopefully). --=-=-= Content-Type: text/x-python Content-Disposition: inline; filename=make-export.py # generate a test input for the 'export' subcommand of the # git-remote-notmuch helper from notmuch2 import Database from time import time from hashlib import sha1 def hexencode(str): output_charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_@=.," out = "" for char in str: if not char in output_charset: out+= f"%{ord(char):x}" else: out+= char return out db = Database(config=Database.CONFIG.SEARCH) count=1 print("export") mark={} for msg in db.messages(""): mark[msg.messageid]=count blob="" for tag in msg.tags: blob += f"{tag}\n" print (f"blob\nmark :{count}"); print (f"data {len(blob)}\n{blob}") count=count+1 print (f"\ncommit refs/heads/master\nmark :{count+1}") ctime = int(time()) print (f"author Notmuch Test Suite {ctime} +0000") print (f"committer Notmuch Test Suite {ctime} +0000") print (f"data 8\nignored") for msg in db.messages(""): digest = sha1(msg.messageid.encode('utf8')).hexdigest() filename = hexencode(msg.messageid) print (f"M 100644 :{mark[msg.messageid]} digest[0:2]}/{digest[2:4]}/{filename}/tags") print("\ndone\n") --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --=-=-=--