* 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:
parent
d4562f9ba7
commit
2d9b785e7c
1 changed files with 38 additions and 36 deletions
6
vc-p4.el
6
vc-p4.el
|
@ -126,8 +126,10 @@ previously fetched. If DONT-COMPARE-NONOPENED is non-nil, don't
|
||||||
compare non-open files to the depot version."
|
compare non-open files to the depot version."
|
||||||
(if (and (not force) (vc-file-getprop file 'vc-p4-did-fstat))
|
(if (and (not force) (vc-file-getprop file 'vc-p4-did-fstat))
|
||||||
(vc-file-getprop file 'vc-state)
|
(vc-file-getprop file 'vc-state)
|
||||||
|
(let ((alist (or fstat-list (p4-lowlevel-fstat file nil t))))
|
||||||
|
(if (null alist)
|
||||||
|
'unregistered
|
||||||
(let* (
|
(let* (
|
||||||
(alist (or fstat-list (p4-lowlevel-fstat file nil)))
|
|
||||||
(headRev (cdr (assoc "headRev" alist)))
|
(headRev (cdr (assoc "headRev" alist)))
|
||||||
(haveRev (cdr (assoc "haveRev" alist)))
|
(haveRev (cdr (assoc "haveRev" alist)))
|
||||||
(depotFile (cdr (assoc "depotFile" 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-name file)
|
||||||
(vc-file-setprop file 'vc-state state)
|
(vc-file-setprop file 'vc-state state)
|
||||||
(vc-file-setprop file 'vc-workfile-version haveRev)
|
(vc-file-setprop file 'vc-workfile-version haveRev)
|
||||||
state)))
|
state)))))
|
||||||
|
|
||||||
(defun vc-p4-dir-status (dir update-function)
|
(defun vc-p4-dir-status (dir update-function)
|
||||||
"Find information for `vc-dir'."
|
"Find information for `vc-dir'."
|
||||||
|
|
Loading…
Reference in a new issue