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!)