GNU bug report logs - #62663
28.2; vc-hg-state returns incorrect results on directories in some repos

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 4 Apr 2023 14:06:02 UTC

Severity: normal

Tags: moreinfo

Found in version 28.2

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Spencer Baugh <sbaugh <at> janestreet.com>, 62663 <at> debbugs.gnu.org, Daniel Colascione <dancol <at> dancol.org>
Subject: bug#62663: 28.2; vc-hg-state returns incorrect results on directories in some repos
Date: Thu, 13 Apr 2023 03:44:30 +0300
Hi! Thanks for the report.

On 04/04/2023 17:05, Spencer Baugh wrote:
> The problem is with vc-hg-state-fast, which parses Mercurial data
> structures instead of shelling out to hg.  This is a great idea but our
> parsing seems to be wrong right now in some way.
> 
> 1. Create a new hg repo with:
> 
> hg init
>    --config format.use_share_safe=false
>    --config format.use-persistent-nodemap=false
>    --config format.sparse-revlog=false
>    --config format.revlog-compression=zlib
> 
> (This is disabling some recent hg features which make vc-hg-state use
> the slow path.  You can verify that vc-hg-state-fast is going to run by
> checking that .hg/requirements is a subset of
> vc-hg-supported-requirements)
> 
> 2. touch foo && hg add foo && hg commit -m.
> 3. (vc-hg-state-slow ".")
> Returns 'up-to-date which is correct (because it shells out to hg)
> 4. (vc-hg-state ".")
> Returns 'unregistered which is wrong
> 
> To a user, this manifests as various hg commands failing with errors,
> often something like
> "vc-find-backend-function: Cannot open load file: No such file or directory, vc-nil"
> 
> This also happens on Emacs 29.
> 
> (Note that this is independent of my other bug about lack of support for
> certain repo requirements.  That bug is about expanding vc-hg-state-fast
> support to new repos; this bug is showing that the already existing
> support is buggy!)

Patches are welcome, of course.

I'm going to Cc the original author of that code, but that's just for 
courtesy.




This bug report was last modified 103 days ago.

Previous Next


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