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

From: Dmitry Gutov <[email-masked]>
Date: Fri, 15 Aug 2025 01:23:40 +0300

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).