GNU bug report logs - #79024
31.0.50; Multiple working trees support for VC

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Tue, 15 Jul 2025 11:51:02 UTC

Severity: normal

Merged with 79104

Found in version 31.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dmitry <at> gutov.dev, 79024 <at> debbugs.gnu.org
Subject: bug#79024: 31.0.50; Multiple working trees support for VC
Date: Sat, 26 Jul 2025 13:19:29 +0100
Hello,

On Sat 26 Jul 2025 at 10:02am +03, Eli Zaretskii wrote:

> The new VC tests added under this discussion have 2 problems:
>
> . Compiling the test file produces a warning:
>
>   In vc-test--other-working-trees:
>   lisp/vc/vc-tests/vc-tests.el:665:28: Warning: Unused lexical variable `tempdir'

Thanks.  Is it deliberate that these files aren't compiled during a
regular build?  I didn't know that files in test/lisp/ need to be
manually tested for problems like these.

> . The new test fails for Git:
>
>   Test vc-test-git07-other-working-trees condition:
>       (error
>        "Failed (status 128): git --no-pager commit -F c:/Users/EliZ/AppData/Local/Temp/git-msg5fr19l --only -- foo")
>      FAILED  24/56  vc-test-git07-other-working-trees (0.337804 sec) at lisp/vc/vc-tests/vc-tests.el:1
>
> Is the new feature supposed to work on MS-Windows, where committing
> specifies the message through a temporary file, rather than the
> command line?

It should work fine, this isn't about the new features, but just about
how I wrote the test setup.  This is the relevant code:

--8<---------------cut here---------------start------------->8---
  ;; Set up the first working tree.
  (make-directory first t)
  (let ((default-directory first))
    (vc-test--create-repo-function backend)
    (write-region "foo" nil tmp-name nil 'nomessage)
    (vc-register `(,backend (,(file-name-nondirectory tmp-name)))))
  (with-current-buffer (find-file-noselect tmp-name)
    (vc-checkin (list (file-name-nondirectory tmp-name)) backend)
    (insert "Testing other working trees")
    (let (vc-async-checkin)
      (log-edit-done))
--8<---------------cut here---------------end--------------->8---

I tried to just copy what vc-test--version-diff did to create and
checkin a sample file.  Does vc-test-git06-version-diff work for you?

> (The vc-test-hg07-other-working-trees test is skipped, perhaps the
> version of Mercurial I have here is 4.7.1 or maybe "share" is an
> add-on one should install and I didn't.)

You don't have to install it but you do have to enable it in your
personal ~/.hgrc runtime configuration file.  Add this to that file:

    [extensions]
    share =

-- 
Sean Whitton




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.