Subject: Re: bug#79235: 31.0.50; Async checkin for Mercurial isn't async enough when checking in a patch

From: Sean Whitton <[email-masked]>
Date: Sat, 16 Aug 2025 13:04:20 +0100

Hello,

On Fri 15 Aug 2025 at 01:23am +03, Dmitry Gutov wrote:

> Hi!
>
> On 14/08/2025 15:15, Sean Whitton wrote:
>> 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
>
> The idea was to have the same behavior that we have with Git when using the
> checkin-patch feature: creating a commit on top of the tip without affecting
> the current directory tree.
>
> So for example if you edited the 'vc-diff' buffer before checking it in, and
> the alterations intersect with the current changes in the working directory
> (current file, etc), there is no need to resolve any conflicts - they will
> just show up as differences when you call 'vc-diff' later.
>
> And I'm not even sure you can 'hg import' without '--bypass' unless you stash
> all changes first - which means calling another hg command anyway (or doing it
> manually, which probably will be more work).

Thanks.  That's behaviour worth preserving.

How does the following plan seem to you:

- make the import command be the one that's done async, not the update

- leave a note saying if they are both potentially slow, we should do
  some messing about to make them both done asynchronously.  But don't
  do that yet in the absence of evidence.

-- 
Sean Whitton