From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id gBDYAJiB/mYuawAAqHPOHw:P1 (envelope-from ) for ; Thu, 03 Oct 2024 11:35:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gBDYAJiB/mYuawAAqHPOHw (envelope-from ) for ; Thu, 03 Oct 2024 13:35:52 +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=X8mNtrmr; dmarc=none; 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727955351; a=rsa-sha256; cv=none; b=QKhN8DCDvp52mLrJD+lgJYOgCiXRQSgQm02Vvj4mX8sY2eYIwZwKTu9sZysWb0F2g5ksS3 ksc7C0ANpDIvB+37OkRI2Cut7fJ5PbUYVONRANw9b9cSNmj4r3e3vyHJI3r794ellDky/e pCnd8kT3v2rdplDUf1qVBXaCo7TYxOPd12h8xsNGZD5c9wdKJYVyVNKiGQ4qz0+IP2VrPg VvwkOVK7Jc6on9FV9lyvqafJvx5v3bkb3EgcjTOPk7CfvQZWQZHv8KnGQHRcqrlxMz4vu8 IuXcwzOshgqEOxkD+VuwqebHC8lXOTmowbbvpLXUJdbucWqpoNLxe0wKYjG4EA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b=X8mNtrmr; dmarc=none; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727955351; 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=TA6sGFqGxxWDz8FrLWsZcl8WgKIfucnsCX5IOWL9Rx0=; b=hmrbhVysIfdlAkEYPIBFySUlxm8KqD3WMzTPBQ2OQJUEWqVZ+0IfBepkghvdRs5dpBV99X EiFQSnC8+PQRGbiAdqTRGYE63rSaBDGAX1NqFlYOvsCqLWNflXy2EA06AMudvuXa6FviB5 QhMApOfnBMyAOti6EQn+vj0/IJw0AmUCX4fTnq5E6EOTNvAsRHQQRmMtoIiZ1HHYw2iVvD czXrjtBhGm/ZSUIxsGfQE00LCgeNzKwM9NS2wuJWoc2B9o9pM2bYT7NuUeJbJSnNpafCuB ZMzFHaKo18RtHF4McgDWhxo8wTIB3qVh/Zxx7tXQwVKRyvRCKLN8aeWJxDGD/g== 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 8BC7B7E2D1 for ; Thu, 03 Oct 2024 13:35:51 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A4A9F5F7BD; Thu, 3 Oct 2024 11:27:01 +0000 (UTC) Received: from phubs.tethera.net (phubs.tethera.net [IPv6:2607:5300:60:3a9d::1]) by mail.notmuchmail.org (Postfix) with ESMTPS id 910BB5E50D for ; Thu, 3 Oct 2024 11:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net; i=@tethera.net; q=dns/txt; s=2024; t=1727954814; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=p/v+E5SPy4StwSlu333d7ad+DG3WAFSv3/lraInpuD8=; b=X8mNtrmrT9cKNOtNinAflv2Tfb6YwDhVLUOL9HAvXedqkzjmW0XoH/sah3y312vJISKpN dKWI2r8eCgwDCyQNiXSlyiWug6nrEWOTIqJ4pRVPBZHSur2MKOeYsNzRGgSP6J7iak8i0Ov pMfuke+M48RTE7GSLWtrWJcB1deWtFtTfZDkjrRWCqlpFIVJhRVYlM+jWjjpZYL7X2ViBYI f3Rc1G8nVDSnIOThyXoOO4uMxyWKXfwhCRyvK69zajoCNu1aXHvRys2r9yoAWtXSetOCPW1 tL2umiJCBUQPzQAvi8RqgwvewgOU80qkG1mysxffJNn3tEvOmLqSGARIh6ZA== 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 403E618006E for ; Thu, 3 Oct 2024 08:26:54 -0300 (ADT) Received: (nullmailer pid 719673 invoked by uid 1000); Thu, 03 Oct 2024 11:26:53 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: [PATCH v2 2/4] cli: start remote helper for git. In-Reply-To: <87ttdt4eiq.fsf@tethera.net> References: <20240908113937.286108-1-david@tethera.net> <20240908113937.286108-3-david@tethera.net> <87ttdt4eiq.fsf@tethera.net> Date: Thu, 03 Oct 2024 08:26:53 -0300 Message-ID: <87r08x4ebm.fsf@tethera.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Message-ID-Hash: 7VPHAZMWWI7BBM5XZDCIX7KWK7TUSSL5 X-Message-ID-Hash: 7VPHAZMWWI7BBM5XZDCIX7KWK7TUSSL5 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-Spam-Score: 0.71 X-Spam-Score: 0.71 X-Migadu-Queue-Id: 8BC7B7E2D1 X-Migadu-Scanner: mx10.migadu.com X-TUID: qJdG615MKFJn --=-=-= Content-Type: text/plain David Bremner writes: > 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). Ugh. And that version of the script was broken by screen scraping from notmuch. This one is hopefully ok. --=-=-= 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 --=-=-=--