unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63123: [PATCH] Make vc-hg-annotate-command async
@ 2023-04-27 16:12 Spencer Baugh
  2023-05-01  7:17 ` Philip Kaludercic
  2023-05-03 23:03 ` Dmitry Gutov
  0 siblings, 2 replies; 6+ messages in thread
From: Spencer Baugh @ 2023-04-27 16:12 UTC (permalink / raw)
  To: 63123

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

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'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-vc-hg-annotate-command-async.patch --]
[-- Type: text/patch, Size: 1082 bytes --]

From 7a9da5d6a08153e36bbf9ee3e29ef2442735d65f Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@janestreet.com>
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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#63123: [PATCH] Make vc-hg-annotate-command async
  2023-04-27 16:12 bug#63123: [PATCH] Make vc-hg-annotate-command async Spencer Baugh
@ 2023-05-01  7:17 ` Philip Kaludercic
  2023-05-02 13:48   ` sbaugh
  2023-05-03 23:03 ` Dmitry Gutov
  1 sibling, 1 reply; 6+ messages in thread
From: Philip Kaludercic @ 2023-05-01  7:17 UTC (permalink / raw)
  To: Spencer Baugh; +Cc: 63123


This should be fine, do you have any larger  mercurial repositories that
could be used to test the async behaviour?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#63123: [PATCH] Make vc-hg-annotate-command async
  2023-05-01  7:17 ` Philip Kaludercic
@ 2023-05-02 13:48   ` sbaugh
  0 siblings, 0 replies; 6+ messages in thread
From: sbaugh @ 2023-05-02 13:48 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: 63123, Spencer Baugh

Philip Kaludercic <philipk@posteo.net> writes:
> This should be fine, do you have any larger  mercurial repositories that
> could be used to test the async behaviour?

I don't, but at least running C-x v g on setup.py in
https://www.mercurial-scm.org/repo/hg there's a perceptible delay which
is no longer present when it's async.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#63123: [PATCH] Make vc-hg-annotate-command async
  2023-04-27 16:12 bug#63123: [PATCH] Make vc-hg-annotate-command async Spencer Baugh
  2023-05-01  7:17 ` Philip Kaludercic
@ 2023-05-03 23:03 ` Dmitry Gutov
  2023-05-04  5:39   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2023-05-03 23:03 UTC (permalink / raw)
  To: Spencer Baugh, 63123, Eli Zaretskii

Hi!

On 27/04/2023 19:12, Spencer Baugh wrote:
> -  (apply #'vc-hg-command buffer 0 file "annotate" "-dq" "-n"
> +  (apply #'vc-hg-command buffer 'async file "annotate" "-dq" "-n"

Looking good, thanks.

Eli, is this for master only?

It might not really be a "fix" (an improvement rather), but it seems 
obviously correct: vc-git-annotate-command does this already.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#63123: [PATCH] Make vc-hg-annotate-command async
  2023-05-03 23:03 ` Dmitry Gutov
@ 2023-05-04  5:39   ` Eli Zaretskii
  2023-05-04 23:43     ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-05-04  5:39 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 63123, sbaugh

> Date: Thu, 4 May 2023 02:03:03 +0300
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 27/04/2023 19:12, Spencer Baugh wrote:
> > -  (apply #'vc-hg-command buffer 0 file "annotate" "-dq" "-n"
> > +  (apply #'vc-hg-command buffer 'async file "annotate" "-dq" "-n"
> 
> Looking good, thanks.
> 
> Eli, is this for master only?

Yes, it's a new feature.

> It might not really be a "fix" (an improvement rather), but it seems 
> obviously correct: vc-git-annotate-command does this already.

Is it really awfully important to do this ASAP for Mercurial?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#63123: [PATCH] Make vc-hg-annotate-command async
  2023-05-04  5:39   ` Eli Zaretskii
@ 2023-05-04 23:43     ` Dmitry Gutov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2023-05-04 23:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 63123-done, sbaugh

On 04/05/2023 08:39, Eli Zaretskii wrote:
>> Date: Thu, 4 May 2023 02:03:03 +0300
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>> On 27/04/2023 19:12, Spencer Baugh wrote:
>>> -  (apply #'vc-hg-command buffer 0 file "annotate" "-dq" "-n"
>>> +  (apply #'vc-hg-command buffer 'async file "annotate" "-dq" "-n"
>>
>> Looking good, thanks.
>>
>> Eli, is this for master only?
> 
> Yes, it's a new feature.

All right.

>> It might not really be a "fix" (an improvement rather), but it seems
>> obviously correct: vc-git-annotate-command does this already.
> 
> Is it really awfully important to do this ASAP for Mercurial?

No, probably not.

Pushed to master and closing. Thanks all!





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-04 23:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27 16:12 bug#63123: [PATCH] Make vc-hg-annotate-command async Spencer Baugh
2023-05-01  7:17 ` Philip Kaludercic
2023-05-02 13:48   ` sbaugh
2023-05-03 23:03 ` Dmitry Gutov
2023-05-04  5:39   ` Eli Zaretskii
2023-05-04 23:43     ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).