Subject: 25.1; vc-dir for CVS repositories list all files as if from toplevel directory
From: Göktuğ Kayaalp <[email-masked]>
To: [email-masked]
Date: Tue, 26 Jul 2016 23:02:39 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

When a directory is viewed via VC (‘vc-dir’), when that directory is a
CVS directory, all files that are edited, whether in that directory or
in its subdirectories, are listed as if they were in the toplevel
directory of the repo.

Example (25.1):

,----
| VC backend : CVS
| Working dir: [deduced]
| Repository : [deduced]
| Module     : emacs.d
| 
| 
|                          ./
|     edited               eval-sexp-fu.el
|     edited               gk-org.el
|     edited               gk-utils.el
|     edited               gk.el
`----

Same directory, in 24.5:

,----
| VC backend : CVS
| Working dir: [deduced]
| Repository : [deduced]
| Module     : emacs.d
| 
| 
|                          ./
|                          gk/
|     edited               gk/gk-org.el
|     edited               gk/gk-utils.el
|     edited               gk/gk.el
|                          site/
|     edited               site/eval-sexp-fu.el
`----

Commands like vc-diff from this buffer (via ‘=’) fail, complaining it
can't find the VC backend.

Reproduction:

- Modify a tracked file in a submodule of a toplevel CVS module
- Call ‘vc-dir’ on the toplevel module
- Run a command on the modified file.

This is the stacktrace I get from ‘vc-diff’ (‘=’ in vc-dir) with
‘debug-on-error’ t:

,----
| Debugger entered--Lisp error: (file-error "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 "[deduced]/emacs.d/gk-org.el")
|   vc-version-backup-file("[deduced]/emacs.d/gk-org.el" nil)
|   vc-cvs-diff(("[deduced]/emacs.d/gk-org.el") nil nil "*vc-diff*" t)
|   apply(vc-cvs-diff (("[deduced]/emacs.d/gk-org.el") nil nil "*vc-diff*" t))
|   vc-call-backend(CVS diff ("[deduced]/emacs.d/gk-org.el") nil nil "*vc-diff*" t)
|   vc-diff-internal(t (CVS ("[deduced]/emacs.d/gk-org.el") nil nil nil) nil nil t)
|   vc-diff(nil t)
|   funcall-interactively(vc-diff nil t)
|   call-interactively(vc-diff nil nil)
|   command-execute(vc-diff)
`----

If I try to see the version log, via ‘l’ in the *vc-dir* buffer,  I get
the ‘*vc-change-log*’ buffer with these contents:

,----
| cvs log: nothing known about gk-org.el
`----

In GNU Emacs 25.1.1 (x86_64-unknown-freebsd10.3, X toolkit, Xaw scroll bars)
 of 2016-07-26 built on xi.bootis
Windowing system distributor 'The X.Org Foundation', version 11.0.11704000
Configured using:
 'configure -C --enable-silent-rules --disable-dependency-tracking
 --without-pop --with-x-toolkit=athena --without-gpm --without-dbus
 --without-gconf --without-gsettings --without-selinux --with-modules
 --with-file-notification=yes --with-x
 --prefix=[deduced]'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2
FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES

Important settings:
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LANG: tr_TR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: VC dir

Minor modes in effect:
  diff-auto-refine-mode: t
  show-paren-mode: t
  auto-insert-mode: t
  change-cursor-mode: t
  winner-mode: t
  auto-image-file-mode: t
  which-key-mode: t
  smooth-scroll-mode: t
  save-place-mode: t
  savehist-mode: t
  global-paren-face-mode: t
  eval-sexp-fu-flash-mode: t
  global-gk-minor-mode: t
  gk-minor-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  gk-utf8-entry-mode: t
  pdf-occur-global-minor-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Traversing directory [deduced]/emacs.d/lisp...
Traversing directory [deduced]/emacs.d/packages...
Traversing directory [deduced]/emacs.d/packages/bbdb-20150523.1239...
Traversing directory [deduced]/emacs.d/packages/elfeed-git...
Traversing directory [deduced]/emacs.d/packages/pdf-tools-0.70...
Traversing directory [deduced]/emacs.d/site...
Traversing directory [deduced]/emacs.d/themes...
Traversing directory [deduced]/emacs.d/...done
Finding changes in [deduced]/emacs.d/eval-sexp-fu.el...
Entering debugger...

Load-path shadows:
[deduced]/co/Exwm/gk-wm hides [deduced]/.emacs.d/gk/gk-wm
[deduced]/co/Exwm/cl-generic hides [deduced]/Local/emacs25.1/share/emacs/25.1/lisp/emacs-lisp/cl-generic
[deduced]/.emacs.d/site/let-alist hides [deduced]/Local/emacs25.1/share/emacs/25.1/lisp/emacs-lisp/let-alist

Features:
(conf-mode shadow mailalias mail-extr emacsbug make-mode vc-git
diff-mode vc-bzr vc-src vc-sccs vc-svn eieio-opt speedbar sb-image
ezimage dframe debug dabbrev sort tabify two-column iso-transl dired-aux
org-colview shr-color color qp goto-addr rmailmm exim xcb-xim xcb-xlib
exwm-systemtray xcb-systemtray xcb-xembed exwm-config ido exwm
exwm-input xcb-keysyms exwm-manage exwm-floating xcb-cursor xcb-render
exwm-layout exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto
xcb-types tls gnutls ibuf-macs supercite regi rmailsum mh-e mh-compat
mh-acros mh-buffers mh-loaddefs ispell bbdb-mua diary-lib diary-loaddefs
misearch multi-isearch grep executable pcmpl-cvs vc-dir ewoc pcmpl-unix
parse-time disp-table org-rmail org-mhe org-irc org-info org-gnus
org-docview org-bibtex bibtex org-bbdb org-w3m paren autoinsert init
server gk thinks analog-clock artist picture reporter boxquote gk-www
twittering-mode gk-feeds gk-urls elfeed-show elfeed-db elfeed-lib
avl-tree elfeed-search elfeed xml-query xml gk-vc vc-rcs vc-cvs vc
vc-dispatcher log-edit pcvs-util add-log gk-ui cursor-chg winner
gk-system man gk-servers simple-httpd gk-multimedia image+ image-file
gk-mail sendmail rmail message idna rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
gmm-utils mailheader f dash epa-mail bbdb-vcard bbdb-com crm mailabbrev
vcard mairix gk-ibuffer ibuffer-vc tramp-cache tramp tramp-compat
tramp-loaddefs trampver bbdb bbdb-site timezone gk-globals forecast
which-key smooth-scroll saveplace savehist paren-face gk-keys windmove
gk-programming sass-mode haml-mode css-mode ruby-mode smie js sgml-mode
thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs gk-outline eval-sexp-fu warnings rx highlight
inf-lisp highlight-parentheses paredit edmacro kmacro gk-org ob-sh
latexenc ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-beamer
ox-latex ox-icalendar ox-html ox-ascii ox-publish ox org-element
org-mobile org-location-google-maps org-capture org-agenda interleave
doc-view google-maps google-maps-static google-maps-geocode
google-maps-base json map gk-org-cite gk-fonts gk-alist gk-lingua
gk-minor-mode ace-jump-mode face-remap apropos gk-file gk-editing
zencoding-mode cl writeroom-mode visual-fill-column undo-tree diff typo
lorem-ipsum gk-utf8 gk-input-methods gk-unilat gk-greek gk-armenian
quail gk-global-modes diminish gk-edit rect gk-documents gk-utils epa
derived whole-line-or-region s ucs-normalize org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
easy-mmode org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs cal-menu calendar cal-loaddefs etags xref project eww
mm-url gnus gnus-ems nnheader mail-utils url-queue url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source cl-seq gnus-util mm-util help-fns
mail-prsvr password-cache url-vars mailcap shr seq dom subr-x browse-url
pdf-links pdf-occur ibuf-ext ibuffer tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw eieio byte-opt bytecomp byte-compile cl-extra help-mode
cconv eieio-core cl-macs gv mode-local find-func cedet pdf-isearch
let-alist pdf-misc imenu pdf-tools compile cus-edit cus-start cus-load
wid-edit pdf-view bookmark pp jka-compr pdf-cache pdf-info tq pdf-util
advice image-mode gk-dired ls-lisp wdired image-dired format-spec
dired-x dired gk-crypt gk-mac epg epg-config gk-comint shell pcomplete
comint ansi-color ring info easymenu cl-loaddefs pcase cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue dynamic-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 723191 648769)
 (symbols 48 77111 0)
 (miscs 40 2748 5673)
 (strings 32 158878 311981)
 (string-bytes 1 5053215)
 (vectors 16 96985)
 (vector-slots 8 2335188 485593)
 (floats 8 2069 3651)
 (intervals 56 21909 2441)
 (buffers 976 119))

-- 
İ. Göktuğ Kayaalp.
http://gkayaalp.com/