mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-31 01:32:00 -07:00
vc-dir-resynch-file: Pass down non-truename'd FILE
* lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Delete recently introduced TRUENAME parameter. (vc-dir-resynch-file): Pass the file name from before calling file-truename to vc-dir-recompute-file-state.
This commit is contained in:
parent
a8f67a1f06
commit
07f2bbc905
1 changed files with 11 additions and 15 deletions
|
|
@ -1261,12 +1261,9 @@ that file."
|
||||||
(vc-dir-fileinfo->state crt-data)) result))
|
(vc-dir-fileinfo->state crt-data)) result))
|
||||||
(nreverse result)))
|
(nreverse result)))
|
||||||
|
|
||||||
(defun vc-dir-recompute-file-state (fname def-dir &optional truename)
|
(defun vc-dir-recompute-file-state (fname def-dir)
|
||||||
"Compute state of FNAME known to live inside DEF-DIR.
|
"Compute state of FNAME known to live inside DEF-DIR."
|
||||||
If TRUENAME is non-nil, FNAME is a truename, DEF-DIR not necessarily."
|
(let* ((file-short (file-relative-name fname def-dir))
|
||||||
(let* ((file-short (file-relative-name
|
|
||||||
fname (if truename (file-truename def-dir) def-dir)))
|
|
||||||
(fname (if truename (expand-file-name file-short def-dir) fname))
|
|
||||||
(_remove-me-when-CVS-works
|
(_remove-me-when-CVS-works
|
||||||
(when (eq vc-dir-backend 'CVS)
|
(when (eq vc-dir-backend 'CVS)
|
||||||
;; FIXME: Warning: UGLY HACK. The CVS backend caches the state
|
;; FIXME: Warning: UGLY HACK. The CVS backend caches the state
|
||||||
|
|
@ -1309,8 +1306,9 @@ If TRUENAME is non-nil, FNAME is a truename, DEF-DIR not necessarily."
|
||||||
|
|
||||||
(defun vc-dir-resynch-file (&optional fname)
|
(defun vc-dir-resynch-file (&optional fname)
|
||||||
"Update the entries for FNAME in any directory buffers that list it."
|
"Update the entries for FNAME in any directory buffers that list it."
|
||||||
(let ((file (file-truename (or fname buffer-file-name)))
|
(let* ((file (or fname buffer-file-name))
|
||||||
(drop '()))
|
(file-tn (file-truename file))
|
||||||
|
(drop '()))
|
||||||
(save-current-buffer
|
(save-current-buffer
|
||||||
;; look for a vc-dir buffer that might show this file.
|
;; look for a vc-dir buffer that might show this file.
|
||||||
(dolist (status-buf vc-dir-buffers)
|
(dolist (status-buf vc-dir-buffers)
|
||||||
|
|
@ -1328,17 +1326,15 @@ If TRUENAME is non-nil, FNAME is a truename, DEF-DIR not necessarily."
|
||||||
;; `default-directory' in order to do its work,
|
;; `default-directory' in order to do its work,
|
||||||
;; but that's irrelevant to us here.
|
;; but that's irrelevant to us here.
|
||||||
(buffer-local-toplevel-value 'default-directory))))
|
(buffer-local-toplevel-value 'default-directory))))
|
||||||
(when (file-in-directory-p file ddir)
|
(when (file-in-directory-p file-tn ddir)
|
||||||
(if (file-directory-p file)
|
(if (file-directory-p file-tn)
|
||||||
(progn
|
(progn
|
||||||
(vc-dir-resync-directory-files file)
|
(vc-dir-resync-directory-files file-tn)
|
||||||
(ewoc-set-hf vc-ewoc
|
(ewoc-set-hf vc-ewoc
|
||||||
(vc-dir-headers vc-dir-backend ddir) ""))
|
(vc-dir-headers vc-dir-backend ddir) ""))
|
||||||
(let* ((complete-state
|
(let* ((complete-state
|
||||||
;; Make sure 'vc-dir-recompute-file-state'
|
;; Pass FILE not FILE-TN here. See bug#80967.
|
||||||
;; knows about the truename nature of 'file'
|
(vc-dir-recompute-file-state file ddir))
|
||||||
;; (bug#80967).
|
|
||||||
(vc-dir-recompute-file-state file ddir t))
|
|
||||||
(state (cadr complete-state)))
|
(state (cadr complete-state)))
|
||||||
(vc-dir-update
|
(vc-dir-update
|
||||||
(list complete-state)
|
(list complete-state)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue