From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0Bl4KlBqmmDvUwAAgWs5BA (envelope-from ) for ; Tue, 11 May 2021 13:28:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6DkNJlBqmmBkYQAAB5/wlQ (envelope-from ) for ; Tue, 11 May 2021 11:28:16 +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 373902578F for ; Tue, 11 May 2021 13:28:16 +0200 (CEST) Received: from localhost ([::1]:38748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgQYh-000303-C0 for larch@yhetil.org; Tue, 11 May 2021 07:28:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgQYU-0002zq-3A for guix-patches@gnu.org; Tue, 11 May 2021 07:28:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgQYT-0003zF-Rp for guix-patches@gnu.org; Tue, 11 May 2021 07:28:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgQYT-0000zx-MC for guix-patches@gnu.org; Tue, 11 May 2021 07:28:01 -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, 11 May 2021 11:28: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 48232@debbugs.gnu.org Received: via spool by 48232-submit@debbugs.gnu.org id=B48232.16207324433793 (code B ref 48232); Tue, 11 May 2021 11:28:01 +0000 Received: (at 48232) by debbugs.gnu.org; 11 May 2021 11:27:23 +0000 Received: from localhost ([127.0.0.1]:35184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgQXr-0000z7-5t for submit@debbugs.gnu.org; Tue, 11 May 2021 07:27:23 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:56556 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgQXq-0000yu-7n for 48232@debbugs.gnu.org; Tue, 11 May 2021 07:27:22 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1620732436; bh=fDbM7aLF/RtXxIqlQejwBsc+D5ZuwBIvE1HffNVAGfg=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=JuEp+zFJYtlAvmi2OkbLarTXme4yXUfxJ+8hyU9/9Dz1f/wlhH2l+Ypp3VLm1jMTp fXZ1nVBMkrLIFZIPoXN5+CgH+QnqlRbLBfp885S9xDqqgRcLAcsxt8hQTy0G9x8CKd I/OCw7KvGDQsDwKwj0orQKX1Zj5Ji98XuvQgFlvI= In-Reply-To: <87lf8l36so.fsf_-_@gnu.org> References: <87k0oecj3a.fsf@yoctocell.xyz> <87lf8l36so.fsf_-_@gnu.org> Date: Tue, 11 May 2021 13:27:15 +0200 Message-ID: <87bl9hh5nw.fsf@yoctocell.xyz> 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=1620732496; 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:dkim-signature; bh=4gcccMJFgK2N3fAAtUuqcMzPrb/aULYtHHcFC1iB0gw=; b=IWTui3pCVj2vNew/HtyEbInxtRQod2bFnp7zcobAkkIvsb7Xi8jzAsg1bg4ZjNPTBHIefu 083LAEnYCpmNuJ4huzc7xycWUdXB0Uo7jv8aBMYXK/WauUBRN7RasvG6YC71sZenXtPueh H7GEe7HNQO8d1pakCaeciwzD34KUTfjuGtodMsjsBPUtnygEvgny0g+xGnEnyQDAMZcRdJ laY0/TwR74GHZrTamXQdHaY0F1GYFeGKk+4MGYGSg0Ey6g9Lt35quwiLRwF98F2AhRe9dv WQj74ggAPU4t6Rk5fL1JVyVf03wuQi8/0u2FEeoZrRt8SP/axjNmEo2mo4UV8w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620732496; a=rsa-sha256; cv=none; b=F74Q7emrfk6wmVwGARMdn1v5xedf9Rdw/03TO9jG09W3mXnxiTNoT4ot4dkksR+4nY/OUq uBO0NNrnd5Hai9kRe3NK3GH0K99U8dP3kpbRT+O3MZWNDXGMQndeOiI/Rgb+9EfHTxAMmd 4uIBUFW+WknJk1Y2hYBvY2KfNv5v4mOK/q11muYzlo1u1w6bZAE/dDvYSnoFoSZW83aW9K bhJEzLFFsilVr59njRMqmovC4mbYzPAgvJwR7niZPfF19Z5/h6GSJjGNQ3oD00AJzCqlvL x3Zb4cBaVEzvF4aNzo8d+6tm9PDoy18L830CPY/Ey65mPYCD0UKXo2GsS0d02Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=JuEp+zFJ; 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: -1.35 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=JuEp+zFJ; 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: 373902578F X-Spam-Score: -1.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: ryqLNnnTlJ08 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/ dire= ctory already contained one file (__init__.py), and I have seen one Mercurial extension that put their Python files in a hgext3rd/ directory[1]. >> 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 PYTHONPATH = so it finds the extensions. [1]: https://foss.heptapod.net/mercurial/hg-credentials