From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mLqzK0Gem2D2GAEAgWs5BA (envelope-from ) for ; Wed, 12 May 2021 11:22:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2LtTJ0Gem2BiRQAAbx9fmQ (envelope-from ) for ; Wed, 12 May 2021 09:22:09 +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 6430D26840 for ; Wed, 12 May 2021 11:22:09 +0200 (CEST) Received: from localhost ([::1]:41566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgl4C-0000S6-FZ for larch@yhetil.org; Wed, 12 May 2021 05:22:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgl46-0000Rq-Ah for guix-patches@gnu.org; Wed, 12 May 2021 05:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgl46-0001iw-3L for guix-patches@gnu.org; Wed, 12 May 2021 05:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgl45-0002d5-TP for guix-patches@gnu.org; Wed, 12 May 2021 05:22:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48232] [PATCH 0/2] Add mercurial-commitsigs and some changes to Mercurial. References: <87k0oecj3a.fsf@yoctocell.xyz> Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 May 2021 09:22: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.162081131710097 (code B ref 48232); Wed, 12 May 2021 09:22:01 +0000 Received: (at 48232) by debbugs.gnu.org; 12 May 2021 09:21:57 +0000 Received: from localhost ([127.0.0.1]:38175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgl41-0002cn-Gq for submit@debbugs.gnu.org; Wed, 12 May 2021 05:21:57 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:56270 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgl3z-0002cO-5R for 48232@debbugs.gnu.org; Wed, 12 May 2021 05:21:56 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1620811304; bh=4aeCUzwQ4NS+IMWblhKrIuhY6ms4FekX//3t7BCc1GI=; h=From:To:Cc:Subject:In-Reply-To:Date; b=IaULm6UhHBBIKfywMstiLmbKC9qT79GLx1WHCpWaAnAexLZ0u7g+2WppXg/eV2EO5 f9xgJEpiZ0+BOzcylm7qVtAY250nXJe3pKoO22HjlprYlkEwGbatnhLPUHcvK0W2rh UcPoJuhWh1UTZ7OpqAmSa0UG6QmJles1FpWbl69U= In-Reply-To: <877dk5h0kg.fsf@yoctocell.xyz> Date: Wed, 12 May 2021 11:21:43 +0200 Message-ID: <874kf8cno8.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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=1620811329; 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: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=lRzv6ly5ZhnyEaLATqjgPOXxL3ZBvq881InFZF31WmA=; b=f8N9ZoZjIQnXRu0lPKHvZ7E5BxAYyJUZdqUSHod48WTbnMt3rSWAvPmmpJ/W08BUb4Pi36 R7M8H3yhEP3Miugo3+8Z7KVfIvPF8s1a+E3602SZGVcaPnoftu9doxB9VOhgQlPZZpUKyz fJg+Ax+fiwcY/zcDKouIdldtarcXsqzlzjUltBk5EQbMr6P6vCeBUljs6wHUInOu8yhhrC vmjonDC9tge7oXMciCoN4xLn9KbnA19sqR1rhBvumQ966eyuLQSs2Wm7GlGN+ZoDmysC+k ydSHMHytcw2uSz6UvYNOkmNZxSwRcOYiwNtlyIfZgtxBU13kCnGWF9qc4jViJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620811329; a=rsa-sha256; cv=none; b=ugBFWCjyH44ZNpzZ90uHPXqkp+jc7wY03mbCEIpDrhO/7uJVs9KJELGUd/xigmR/kaL015 JAT2UiQ+vQxjyhEocUR4l6hr4BZIjq7YlzSKcPFenmSn1uc7DtA1EA4ekEjkR3BhF0OOaa Aomq2kzlv2mS2h6SPYsrjiU3DreBGc1XJ/IHnYt7WgdF0OTdge4eGbQ7Gx5zhfwz7YMXQT BgUwijdRQg2o6Q2YEixdr5jyoRCsV3YGHyfwwSmrN2Ssjb2L2e0WXed9jUMXvyZ98CWNU+ zvT1Zqr/eTYOX1ql6BFGdDcqec0ZAUKTYtZBm1MmjtKjQmYIE+LeheY6NeAGhQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=IaULm6Uh; 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=IaULm6Uh; 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: 6430D26840 X-Spam-Score: -1.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: m3vtS7BCvalC --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, May 11 2021, Xinglu Chen wrote: >> Let=E2=80=99s see if you can adjust hg to honor a new environment variab= le, >> and if not, we=E2=80=99ll see=E2=80=A6 > > Hmm, I will try to see what I can do. I am no Python expert, but Mercurial is able to load the commitsigs.py module when I applying the attached patch and putting the following in ~/.config/hg/hgrc. [extensions] commitsigs =3D=20 However, two of the tests are failing, they are related to multiple people trying to push to the same repo at the same time. I don=E2=80=99t k= now why they would fail, and I don=E2=80=99t know if my patch will break things= in the =E2=80=9Creal world=E2=80=9D. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=mercurial-hg-extension-path.patch Content-Description: hg-extension-path-patch This is needed to make Mercurial read the HGEXTENSIONPATH to detect third-party extensions. It is called HGEXTENSIONPATH and not HG_EXTENSION_PATH to keep it consistent with other environment variables for Mercurial, e.g. HGENCODINGAMBIGUOUS, HGEDITOR ... Hopefully I or someone else will get this into Mercurial proper. diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -13,6 +13,7 @@ import imp import inspect import os +import sys from .i18n import ( _, @@ -108,6 +109,8 @@ def _importh(name): """import and return the module""" + # Read HGEXTENSIONPATH environment variable when import extensions. + sys.path.append(os.getenv("HGEXTENSIONPATH")) mod = __import__(pycompat.sysstr(name)) components = name.split(b'.') for comp in components[1:]: --=-=-=--