Subject: [PATCH] Make vc-hg-annotate-command async
From: Spencer Baugh <[email-masked]>
To: [email-masked]
Date: Thu, 27 Apr 2023 12:12:08 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

In GNU Emacs 29.0.60 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2023-03-13 built on
 igm-qws-u22796a
Repository revision: e759905d2e0828eac4c8164b09113b40f6899656
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-modules
 --with-gif=ifavailable'

From 7a9da5d6a08153e36bbf9ee3e29ef2442735d65f Mon Sep 17 00:00:00 2001
From: Spencer Baugh <[email-masked]>
Date: Thu, 27 Apr 2023 12:11:45 -0400
Subject: [PATCH] Make vc-hg-annotate-command async

There's no benefit in this running the process synchrounously, and
it's annoying for it to block the Emacs UI.

* lisp/vc/vc-hg.el (vc-hg-annotate-command):
Run asynchronously.
---
 lisp/vc/vc-hg.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index f64c342f99c..78231a0c954 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -578,7 +578,7 @@ vc-hg-revision-completion-table
 (defun vc-hg-annotate-command (file buffer &optional revision)
   "Execute \"hg annotate\" on FILE, inserting the contents in BUFFER.
 Optional arg REVISION is a revision to annotate from."
-  (apply #'vc-hg-command buffer 0 file "annotate" "-dq" "-n"
+  (apply #'vc-hg-command buffer 'async file "annotate" "-dq" "-n"
 	 (append (vc-switches 'hg 'annotate)
                  (if revision (list (concat "-r" revision))))))
 
-- 
2.30.2