* vc-p4.el (vc-p4-state): Avoid error when saving non-Perforce

file inside Perforce working directory.  Still gives incorrect
'up-to-date' status in vc-dir sometimes.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7377]
This commit is contained in:
Magnus Henoch 2009-09-09 06:16:58 -08:00
parent d4562f9ba7
commit 2d9b785e7c

View file

@ -126,8 +126,10 @@ previously fetched. If DONT-COMPARE-NONOPENED is non-nil, don't
compare non-open files to the depot version."
(if (and (not force) (vc-file-getprop file 'vc-p4-did-fstat))
(vc-file-getprop file 'vc-state)
(let ((alist (or fstat-list (p4-lowlevel-fstat file nil t))))
(if (null alist)
'unregistered
(let* (
(alist (or fstat-list (p4-lowlevel-fstat file nil)))
(headRev (cdr (assoc "headRev" alist)))
(haveRev (cdr (assoc "haveRev" alist)))
(depotFile (cdr (assoc "depotFile" alist)))
@ -161,7 +163,7 @@ compare non-open files to the depot version."
(vc-file-setprop file 'vc-name file)
(vc-file-setprop file 'vc-state state)
(vc-file-setprop file 'vc-workfile-version haveRev)
state)))
state)))))
(defun vc-p4-dir-status (dir update-function)
"Find information for `vc-dir'."