From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#63470: [PATCH] Use faster option for running vc-hg status Date: Fri, 12 May 2023 15:28:43 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36672"; mail-complaints-to="usenet@ciao.gmane.io" To: 63470@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 12 21:29:13 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 1pxYS0-0009H9-VJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 May 2023 21:29:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxYRr-00058E-O7; Fri, 12 May 2023 15:29:04 -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 1pxYRq-000584-OS for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 15:29:02 -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 1pxYRq-00075T-G8 for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 15:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxYRq-0004da-Ab for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 15:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 May 2023 19:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168391972917804 (code B ref -1); Fri, 12 May 2023 19:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 May 2023 19:28:49 +0000 Original-Received: from localhost ([127.0.0.1]:33189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxYRd-0004d5-0i for submit@debbugs.gnu.org; Fri, 12 May 2023 15:28:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxYRb-0004cx-An for submit@debbugs.gnu.org; Fri, 12 May 2023 15:28:47 -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 1pxYRa-00057O-W9 for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 15:28:47 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxYRZ-00074O-CU for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 15:28:46 -0400 Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: 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:261641 Archived-At: --=-=-= Content-Type: text/plain Tags: patch In GNU Emacs 29.0.90 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2023-05-09 built on igm-qws-u22796a Repository revision: 65c4a24aa0fc672bbf11e0c5187c6a29931b4363 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: CentOS Linux 7 (Core) Configured using: 'configure --with-x-toolkit=lucid --with-gif=ifavailable' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Use-faster-option-for-running-vc-hg-status.patch >From 6fe0d4485b40f67473cad97f1b57c702dbeb3f57 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Fri, 12 May 2023 15:28:06 -0400 Subject: [PATCH] Use faster option for running vc-hg status As the comment says, this causes us to depend on Mercurial 4.2, which was released in 2017. However, in modern Mercurial, removing the "re:" "-I" "." options provides a 10x-20x speedup (because it allows the Rust implementation of "hg status" to be used), so it's certainly worth losing this compatibility. * lisp/vc/vc-hg.el (vc-hg-dir-status-files): Use --config status.relative=1 to make paths relative --- lisp/vc/vc-hg.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 78231a0c954..2f6e5bc5e19 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1381,11 +1381,9 @@ vc-hg-dir-status-files ;; XXX: We can't pass DIR directly to 'hg status' because that ;; returns all ignored files if FILES is non-nil (bug#22481). (let ((default-directory dir)) - ;; TODO: Use "--config 'status.relative=1'" instead of "re:" - ;; when we're allowed to depend on Mercurial 4.2+ - ;; (it's a bit faster). (vc-hg-command (current-buffer) 'async files - "status" "re:" "-I" "." + "--config" "status.relative=1" + "status" (concat "-mardu" (if files "i")) "-C")) (vc-run-delayed -- 2.30.2 --=-=-=--