Subject: 31.0.50; Async checkin for Mercurial isn't async enough when checking in a patch
From: Sean Whitton <[email-masked]>
To: [email-masked]
Date: Thu, 14 Aug 2025 13:15:18 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

X-debbugs-cc: [email-masked], [email-masked], [email-masked], [email-masked]

Hello,

vc-hg-checkin-patch runs two commands to effect committing the patch,
'hg import' to create the commit artefact, and 'hg update' to
fast-forward the working tree up to the new commit.
But currently when vc-async-checkin is non-nil, only the 'hg update'
command is run asynchronously.

This might be okay if the 'hg import' is always fast and 'hg update' can
be slow.  But I doubt that's the case in reality.  I would assume that
they could both be slow in certain repositories.

If we want to both commands asynchronously then we need to extend the
way async checkins are done to support multiple processes or write out a
tiny shell script to chain the two commands together.  I think I prefer
the latter.

But why are we using 'hg import --bypass' in the first place?  If we
didn't use --bypass then it would just be a single 'hg import' command,
I think, and that could easily be made asynchronous.

I looked at the thread from Dmitry was first working on this feature and
I couldn't see a definitive reason to by passing --bypass.
Dmitry, do you know why you did it in that way?

[1]  https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01533.html

-- 
Sean Whitton