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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 28 Jul 2025 15:30:50 +0300

> From: Sean Whitton <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sun, 27 Jul 2025 20:46:56 +0100
> 
> > Since the entire test suite takes quite some time to run, I usually
> > run only the relevant test(s), like this:
> >
> >   make -C test lisp/some-tests
> >
> > (assuming the test file is test/lisp/some-tests.el).  Some changes
> > need to run more than one test file.
> 
> Right.  But other projects I've worked with often always build the tests
> even if they don't run them.

Some do, some don't.

> I pushed a fix just now which makes all the tests pass for me on
> GNU/Linux.

It still fails on GNU/Linux for me:

  Test vc-test-git07-other-working-trees condition:
      (error
       "Failed (status 129): git --no-pager worktree list --porcelain -z")
     FAILED  24/56  vc-test-git07-other-working-trees (0.145203 sec) at lisp/vc/vc-tests/vc-tests.el:1

> If that doesn't also fix the Git tests for you on Windows,
> then I'm not sure what else could be wrong.

Yes, it still faisl on Windows, with the same error as previously:

  Test vc-test-git07-other-working-trees condition:
      (error
       "Failed (status 128): git --no-pager commit -F c:/Users/EliZ/AppData/Local/Temp/git-msgLSkxp8 --only -- foo")
     FAILED  24/56  vc-test-git07-other-working-trees (0.343783 sec) at lisp/vc/vc-tests/vc-tests.el:1

Please show the Git commands we issue during this test, and I will try
running them from the shell to see what's going on and why.

> As for Mercurial, I can implement the temporary file thing again, but
> I'd like to know about line endings first.
> 
> If you do 'hg init' in a temporary directory, 'echo foo >bar', put a
> commit message containing DOS line breaks in a temporary file, and do
> 'hg commit bar --logfile=temp', does the commit message that gets
> recorded look correct?

How do I determine whether the recorded log message "looks correct"?

> With Git we have to switch back to Unix line endings while writing out
> the temporary file because Git expects that; I would assume Mercurial
> does not, but I'm not sure.

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?