bug#81453: 31.0.90; VC reverts unsaved buffer after async checkin

Aaron Zeng via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]> Wed, 5 Aug 2026 12:25:54 -0400
Newsgroups gmane.emacs.bugs
Message-ID <CAB7SQMGxxBBpbtQM3izcsiMvNAdKK5nj+AschuZ4RDsSuGameg@mail.gmail.com>
On Thu, Jul 23, 2026 at 10:33 AM Sean Whitton <[email protected]> wrote:
> I've now installed a fix on the emacs-31 branch.

Thank you, I've tested and it seems to be fixed.
> > 4. If auto-save runs, the auto-save file ".#foo.txt" is unexpectedly
> >    registered and committed, even though it did not appear in the VC-Dir
> >    buffer.
> >
> > I suppose (4) is a natural consequence of passing the whole directory
> > as an argument to "hg commit", but the behavior is somewhat surprising
> > for auto-save at least.  (It can also be easily worked around by
> > hgignoring auto-save files, so maybe it's not worth doing anything about
> > this).
>
> I think it's unrelated, and I'm not sure what Emacs ought to do instead.
> Possibly we could pass in some command line flags to Hg that would mean
> our autosaves always get ignored?  We'd have to do that separately for
> each backend.

Yeah, it's unclear to me too.  I'm fine if you think it would
appropriate to close
this bug because the original issue is fixed, as it's not clear to me
that this second
thing is really a bug *in Emacs*.

(If you ran `hg commit .` in a terminal and it was slow and then you continued
editing files in Emacs, you might get the same behavior.  Or, maybe my
~/bin/slow-hg
script is too artificial to say anything about Mercurial's actual
behavior in this case.)