From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ABAsFJy1kWATUgAAgWs5BA (envelope-from ) for ; Tue, 04 May 2021 22:59:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0B3GD5y1kWB+OAAAB5/wlQ (envelope-from ) for ; Tue, 04 May 2021 20:59:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0CB8E1B3DE for ; Tue, 4 May 2021 22:59:08 +0200 (CEST) Received: from localhost ([::1]:42584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1le28J-0004M5-6I for larch@yhetil.org; Tue, 04 May 2021 16:59:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le28E-0004LZ-Ef for guix-patches@gnu.org; Tue, 04 May 2021 16:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1le28E-0002S8-6w for guix-patches@gnu.org; Tue, 04 May 2021 16:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1le28E-0008TF-52 for guix-patches@gnu.org; Tue, 04 May 2021 16:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48232] [PATCH 0/2] Add mercurial-commitsigs and some changes to Mercurial. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 04 May 2021 20:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48232 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48232@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162016188932515 (code B ref -1); Tue, 04 May 2021 20:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2021 20:58:09 +0000 Received: from localhost ([127.0.0.1]:55398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1le27N-0008SN-Dn for submit@debbugs.gnu.org; Tue, 04 May 2021 16:58:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:44184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1le27K-0008SH-IT for submit@debbugs.gnu.org; Tue, 04 May 2021 16:58:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le27K-0004Iu-9n for guix-patches@gnu.org; Tue, 04 May 2021 16:58:06 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:51194 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le27I-0001rN-KD for guix-patches@gnu.org; Tue, 04 May 2021 16:58:06 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1620161882; bh=40JRkgm+CEEIy8jmLZGTt1lKekEue6QMC1JHSz5b/gU=; h=From:To:Subject:References:Date; b=cXtwu1QBRyv43vEgTr1tK5wmv4rX5fCrsIB9O6VfFYaoH3YrW4eoS3TZwrWbS6OmW 5Ad4TzxAetEC5XeMKG9FIJnAZSRC+DSadpQxo3t366bgarwq8k9CcQ9L1Vzv7k8vJ3 ONWd2n0hdSE56jlHPQE7oMknYWCoie+ZZmBnVk7c= References: Date: Tue, 04 May 2021 22:58:01 +0200 Message-ID: <87k0oecj3a.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 34 X-Spam_score: 3.4 X-Spam_bar: +++ X-Spam_report: (3.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620161948; 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:resent-cc: resent-from:resent-sender:resent-message-id:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=IPD3wWJxCLbFd7zZD3nzwlkqP59FewhiRZGMmuF4Qm8=; b=FF1QxH+Y8V9YBtj0c6LJAhhU0yy8i/32ktqzUrJwr4ySHDd5r//vCZYUPsBv6fYQeQuZst btorZ3bgZwN26S7Hs6A/aGOlvOnJlOEYJFgPkiYHoD8cN0qVk3s/ccafH1QO/QCntaDu0M MYOCjaWNLPxpr9jN4Pk46DaSaKX/wAoNLJ6lpCWPMz/B/OyOr7X2y+YtE8ThSIhesWWm7r MYG31pikmHcLN7EK8COUOfmlB5liU/mX7Gg55LdKhZofUj7NNPysR5CoyX5UgcrUtrqh59 QPyYKuTQy85unaEFDV5sNxz/4GikUDo3m25aPujStDlsZHXRKcet9oeJBMNyQg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620161948; a=rsa-sha256; cv=none; b=Lpxjgv3PINGlVX74urbR1SxLA/VInQqMu8m9f46PZaOMoDvbd3m74+Ki/RYmASbhQq043m Gtdp+6pT2GLOKrFfl3vrhnApo4t/ptl8HVhYQlBAkHkU9u0eG1ebpf2KrPcB+R7eo6gCSA jRLr1pplU1D/CcL23JQe7uvuNRVS8XKu6GLLoHnhjqNbqIGRYIDdElSAzMTtKwAt1vjz9i cV0DFOLBtoX9FPNpwlAQh5hu1i4h5cUVNu0SCuS2j8WDeJf7eDuEY3gJqrcFeFnF3fSi7D RXjcccq/4h41r6HvbQyTtfBQUgCQcMJz/KmAh71RZS5CuBoVOJmWtok2lNN1MQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=cXtwu1QB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.14 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=cXtwu1QB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 0CB8E1B3DE X-Spam-Score: 0.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: EveVgg49s4ZT The first patch adds the commitsigs extension for Mercurial, it allows users to sign Mercurial changesets (equivalent to Git commits) with GnuPG or OpenSSL. The second patch adds PYTHONPATH to the =E2=80=98native-search-paths=E2=80= =99 field of Mercurial, this allows Mercurial to automatically find third-party extensions (like commitsigs) installed in /gnu/store/...-profile/lib/python3.8/site-packages/hgext3rd. By default, it only looks at /gnu/store/...-mercurial/lib/python3.8/site-packages/hgext3rd. However, I am not sure this is the best approach since it messes with PYTHONPATH, AFAIK there is no such things as a HGEXTENSIONS variable I could set. Another problem is that I have to hardcode =E2=80=9Cpython3.8= =E2=80=9D, this would obviously have to be updated if the default Python version gets updated. I did try to do something like this: #+begin_src scheme (string-append "lib/python" (string-join (drop-right (string-split (package-version python) #\.) 1) ".") "/site-packages/hgext3rd") #+end_src but it just gave me a confusing error message when trying to build it; it worked fine if I hit {C-x C-e} in Emacs, though. What we could do instead is to delegate the work of installing Mercurial extensions to Guix Home[1] (I am currently working on adding a service for Mercurial[2]) and add a =E2=80=98mercurial-extension-file-path=E2=80=99= key to the =E2=80=98properties=E2=80=99 field of Mercurial extensions so Guix Home can= tell Mercurial where to find the extension by the relevant lines in hgrc. We could have a package definition like this: #+begin_src scheme (package (name "mercurial-commitsigs") ... (properties '((mercurial-extension-file-path . "commitsigs.py")))) #+end_src hgrc: #+begin_src [extensions] commitsigs =3D /gnu/store/...-mercurial-commitsigs/commitsigs.py #+end_src [1]: https://yhetil.org/guix-devel/878s6u2pco.fsf@trop.in/ [2]: https://lists.sr.ht/~abcdw/rde-devel/patches/22421 Xinglu Chen (2): gnu: Add mercurial-commitsigs. gnu: mercurial: Add PYTHONPATH to =E2=80=98native-search-paths=E2=80=99. gnu/packages/version-control.scm | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) base-commit: aa7eeabe9a782afc2535581298990050d16b1895 --=20 2.31.1