From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aNswE0d5mmDacAAAgWs5BA (envelope-from ) for ; Tue, 11 May 2021 14:32:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yFL0Dkd5mmApXQAA1q6Kng (envelope-from ) for ; Tue, 11 May 2021 12:32:07 +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 BF1D027250 for ; Tue, 11 May 2021 14:32:06 +0200 (CEST) Received: from localhost ([::1]:45900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgRYT-0007rh-Sz for larch@yhetil.org; Tue, 11 May 2021 08:32:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgRWU-0006k2-9F for guix-patches@gnu.org; Tue, 11 May 2021 08:30:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgRWU-0006p5-0W for guix-patches@gnu.org; Tue, 11 May 2021 08:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgRWT-0004rK-RH for guix-patches@gnu.org; Tue, 11 May 2021 08:30:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48232] [PATCH 0/2] Add mercurial-commitsigs and some changes to Mercurial. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 May 2021 12:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48232 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: 48232@debbugs.gnu.org Received: via spool by 48232-submit@debbugs.gnu.org id=B48232.162073617218620 (code B ref 48232); Tue, 11 May 2021 12:30:01 +0000 Received: (at 48232) by debbugs.gnu.org; 11 May 2021 12:29:32 +0000 Received: from localhost ([127.0.0.1]:35264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgRW0-0004qF-CY for submit@debbugs.gnu.org; Tue, 11 May 2021 08:29:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgRVy-0004q3-AO for 48232@debbugs.gnu.org; Tue, 11 May 2021 08:29:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47516) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgRVs-0006Ry-Rk; Tue, 11 May 2021 08:29:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42548 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgRVp-00081b-OA; Tue, 11 May 2021 08:29:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87k0oecj3a.fsf@yoctocell.xyz> <87lf8l36so.fsf_-_@gnu.org> <87bl9hh5nw.fsf@yoctocell.xyz> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?UTF-8?Q?Flor=C3=A9al?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 11 May 2021 14:29:20 +0200 In-Reply-To: <87bl9hh5nw.fsf@yoctocell.xyz> (Xinglu Chen's message of "Tue, 11 May 2021 13:27:15 +0200") Message-ID: <87zgx1zc67.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1620736326; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=GYdCdp3Q2I9vkuEK2FUQYKAecCRQ/Vrc0hqP9KGOr1Y=; b=UDcIjfUeRc76xXIRopYzCr9R0Y29+sepFUscY4hvzdcQrBDLdUn0xwykfKC4dRv+CvRRK6 b1frR8KH2dkRnPUJKl320scVQC79qOWx3ymbRGCoYedaMMznh71p7DnfiX5SpIx1of4eHH 81AB9UQR17aU+/gu41lA+X1mspyTV+rjee0YQlqWAh0q6hNcgBFDrss1oesTLZHuF/pcnv PNWdZUui2L4cEZ8E57aQhYcGIgR4lVS7ZepZScSGlxuq1JzojlFoDCZI2a66+o6f+8eDkt bVgXcQ9xsOcd2xK/6K84pUXJoAZcL4DISDDOV0BX6TopLASDZjXxRcxir2lRjg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620736326; a=rsa-sha256; cv=none; b=Re/InsApNFqLWj9qXBRc62d2niQXYMZuGNQPT3OAryVY498INoWEAjCC2Pv7k7HP+IHcB0 0HJP41afll64RI5Zk5irwjXlGJuEgS8nuQ63PhQ+V4xhy6IQb4Ev43r5dFhwmofFK5Dwyy kobY4+JA0qvgD+MRJeWlqE/vqPTAn4tzQPOMgI0id0culWOqdq7QxP/8AdndqwjMVLHX7L RXSSuGJg9+kpZjeMMJJLqQ4zOmuMr6jzCVUzaTITOZz6K59J70EtfqyPa6ktONRqxaG3hx VxgI0pczJKDCGqcMkTpsR72u+sZzNMfZEirMTKNhPCSi1HFWPDRyvegWtTmM2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: BF1D027250 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: vZAABB3B0M5t Xinglu Chen skribis: > On Tue, May 11 2021, Ludovic Court=C3=A8s wrote: > >> Hi, >> >> Xinglu Chen skribis: >> >>> 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. >> >> Is /hgext3rd a convention that upstream recommends? > > I don=E2=80=99t think they mention it in their docs, but the hgext3rd/ di= rectory > already contained one file (__init__.py), and I have seen one Mercurial > extension that put their Python files in a hgext3rd/ directory[1]. OK, sounds good. >>> 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: >> >> Messing up with PYTHONPATH is indeed not great since it =E2=80=9Cbelongs= =E2=80=9D to >> Python. >> >> Could we instead patch Mercurial so it honors a specific environment >> variable, like HG_EXTENSION_PATH? > > I am not familiar with the Mercurial codebase, but I guess we could try. > Or perhaps we could wrap the =E2=80=98hg=E2=80=99 binary to set PYTHONPAT= H so it finds > the extensions. I think wrapping is not an option because the wrapper doesn=E2=80=99t know = where the profile is. Let=E2=80=99s see if you can adjust hg to honor a new environment variable, and if not, we=E2=80=99ll see=E2=80=A6 Thanks! Ludo=E2=80=99.