From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#63470: [PATCH] Use faster option for running vc-hg status Date: Fri, 12 May 2023 23:10:05 +0300 Message-ID: References: <83h6shbaiv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38508"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: 63470@debbugs.gnu.org To: Spencer Baugh , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 12 22:11:29 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pxZ6u-0009nx-LG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 May 2023 22:11:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxZ6b-0002dU-OV; Fri, 12 May 2023 16:11:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxZ6U-0002Zl-Kg for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 16:11:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxZ6U-0000OB-C4 for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 16:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxZ6U-00064f-7U for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 16:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 May 2023 20:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63470-submit@debbugs.gnu.org id=B63470.168392221923288 (code B ref 63470); Fri, 12 May 2023 20:11:02 +0000 Original-Received: (at 63470) by debbugs.gnu.org; 12 May 2023 20:10:19 +0000 Original-Received: from localhost ([127.0.0.1]:33498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxZ5n-00063X-0D for submit@debbugs.gnu.org; Fri, 12 May 2023 16:10:19 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:42699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxZ5h-000634-J0 for 63470@debbugs.gnu.org; Fri, 12 May 2023 16:10:17 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 856EF5C02E4; Fri, 12 May 2023 16:10:08 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 12 May 2023 16:10:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1683922208; x=1684008608; bh=HyAfsZzl477Bj1RMUEqOcSI44RsFwaM+/YM zsRIttAM=; b=JbDhln8Y5X8EtLdUCxCpnwrriL5l3Lj9FvMUolgUmfO6ZLKfoL1 wwClX6EKM96JKd4HYnSxJOdossPXYOKUyZ/Fy8ip/reyUdSTJ1VN5wo2R7fE3LyN F+xdZelDP0+H8hMWjraMFsJVM7fV1J+KORtQoyG/FgGEIEz+9q9THF1D2xvsQqs6 Fqk43cry8OjpMg1EpEC5zic9w8+L/M6rmBoFgVuebtYBHPG909mSbVlXawZfzMnj dGAchT0kt+XI51Z2pEl0lnwOyuruunHocF9Hvt36sgct+OXIZBOi+dN5HLpkorA9 soc195vouSwZILGrDt13QO4mMoHrw5vCLiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1683922208; x=1684008608; bh=HyAfsZzl477Bj1RMUEqOcSI44RsFwaM+/YM zsRIttAM=; b=ry5FHzQ7//kXNBl5DePA9VMBsnGYLEt8PI9LK/ApQ41X83pHbo1 EsGv3Eet1m7f2IGqBx1uWjP/GdPPzDgJjr7rE8cDcpvtSBSJwbZ5SazLoWc6vNLh 7tntAQ5t2sSF9Pyx8CNkcajji1Cn8pcwMQ543v86ZzibtPuLBTJ5RgpRbaqcD0oK CCRdzR+0veMqDZTEFrwVmJK95EpWC3OeSZG5DopnExxEvqk+bcbjlBmf7HXaTbMn jxyn/ZikhORIlB9GDQX8Zk6MGuSZzIul1PO2TuAXjs0aAXXaeh7qtsaHkmIdocHX R/y66d26rPosGIX2ZCzOU7M7ie6YfQm9oAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeehtddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 12 May 2023 16:10:07 -0400 (EDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261645 Archived-At: On 12/05/2023 22:57, Spencer Baugh wrote: >> And why cannot we detect the version and dispatch on that, instead of >> doing this unconditionally? > hg --version takes a quarter of a second on my machine, which itself > wipes out a lot of the performance benefit. We could cache it, but it's > not clear to me how to do that correctly: there could be different hg > binaries in different directories, or over TRAMP, or other such things. > > I could add a user option to revert to the old behavior, if you want. We could cache it like we do with vc-git--program-version. That's a simple memoization that doesn't take the host into account (though that could be implemented, too). But it'd really make things easier if we're just allowed to rely on some new enough versions of Git and Hg. > (It would be nice if vc was available on ELPA, then maybe we could just > tell users of old mercurial versions to downgrade to an old version...) I don't think so: "ELPA core" packages come from the master branch. Emacs 30 will come from it too. The only downgrade that will be available to the users of Emacs 30 is to revert to what they have bundled. And as soon as we make that change on master, that code will be gone.