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