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: Spencer Baugh <sbaugh <at> janestreet.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 79024 <at> debbugs.gnu.org
Subject: bug#79024: 31.0.50; Multiple working trees support for VC
Date: Wed, 23 Jul 2025 13:08:28 -0400
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Hello,
>
> On Fri 18 Jul 2025 at 10:36am +01, Sean Whitton wrote:
>
>> Dmitry, what do you think about a new project-prompter-predicate which
>> project prompters should use to filter the list of projects offered?  VC
>> could bind that to something which only lets through related worktrees.
>
> I've got a second extension of project.el to ask about.
>
> Mercurial doesn't maintain records of shared repositories.
> The first repository knows nothing about shares created from it, and
> each share only has a reference back to the first repository.
>
> Therefore, to support the VC API for other working trees, Emacs needs to
> maintain records of its own about other working trees for Mercurial
> repositories.
>
> Initially I'll implement this by just looking it up each time but that
> will get slow.  project--list's docstring talks about storing metadata
> there.  Could I perhaps treat the entries in project--list as plists or
> alists, and push some entries there?  I could use symbols with a vc--
> prefix as the keys into the lists, indicating this is not data that
> project.el itself should have much to do with?  Or what do you think?

IMO it would be fine to just look this up each time.

The predicate passed to project-prompter would take the root directory
of the project and decide whether that should be included in the prompt;
and for hg shares, that would just be looking at .hg/sharedpath and
checking if it has the right contents.  I think that one filesystem
access is an acceptable cost, I don't think Emacs will need to maintain
records of its own beyond the existing project--list.




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.