Subject: bug#79024: 31.0.50; Multiple working trees support for VC

From: Eli Zaretskii <[email-masked]>
Date: Tue, 12 Aug 2025 16:22:07 +0300

> From: Sean Whitton <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Tue, 12 Aug 2025 14:15:17 +0100
> 
> The remaining thing for this bug is fixing Mercurial committing.
> 
> You wrote:
> 
> > I don't think it matters with Mercurial, and it can never do any harm
> > to use Unix EOLs, I think.
> >
> > A more important question is the encoding: does hg expect the commit
> > log messages to be in UTF-8, or does it not care, or something else?
> 
> I wrote:
> 
> > <https://wiki.mercurial-scm.org/EncodingStrategy#UTF-8_strings> makes it
> > sound like the file is assumed to be in the local encoding and then gets
> > converted.  However, that page has not been updated for ten years.
> >
> > There is an option --encoding that one can pass.  It defaults to utf-8.
> > That makes it seem like we could write out the commit message in UTF-8
> > and know it'll be okay.
> 
> Do you agree with the plan?  That is, always use Unix line endings,
> write out the commit message in UTF-8.  So the only thing that changes
> is going via a file.  I should be able to write some tests to assert
> this is fine on Windows, which you can run.

Yes, agreed.  My only comment is that perhaps we should introduce
vc-hg-commits-coding-system, similar to vc-git-commits-coding-system,
by default 'utf-8', and use it with the --encoding switch.  But that
could be added later.