Subject: bug#43464: 28.0.50; vc: Error calling vc-revert for repo root

From: Andrii Kolomoiets <[email-masked]>
Date: Thu, 17 Sep 2020 10:29:08 +0300

1. Create repo with modified file:
   mkdir gittest
   cd gittest
   git init
   touch foo.txt
   git add .
   git commit -m "foo"
   echo "bar" > foo.txt
2. emacs -Q
3. C-x v d
4. C-x v u
5. Confirm discarding changes

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "vc-nil")
  require(vc-nil)
  vc-find-backend-function(nil make-version-backups-p)
  vc-call-backend(nil make-version-backups-p "/private/tmp/gittest/")
  vc-version-backup-file("/private/tmp/gittest/")
  vc-revert-file("/private/tmp/gittest/")
  vc-revert()
  funcall-interactively(vc-revert)
  call-interactively(vc-revert nil nil)
  command-execute(vc-revert)

At least for `hg` and `git` backends.  Maybe because `vc-registered` for
repo root is nil.

Same error in Emacs 26 and 27.