(vc-p4-dir-status): Initial implementation.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7232]
This commit is contained in:
Magnus Henoch 2009-05-27 05:53:57 -08:00
parent b52aaa3e2c
commit 1391eebeb5

View file

@ -310,6 +310,23 @@ Perforce and sets the appropriate VC properties."
(not (string= this-action "delete")))
(vc-p4-state this-file this-list)))))
(defun vc-p4-dir-status (dir update-function)
"Find information for `vc-dir'."
;; XXX: this should be asynchronous.
(let ((lists (p4-lowlevel-fstat (format "%s/*" (expand-file-name dir)) nil t)))
(when (stringp (caar lists))
(setq lists (list lists)))
(dolist (this-list lists)
(let ((this-file (cdr (assoc "clientFile" this-list)))
(this-action (cdr (assoc "action" this-list))))
(when this-action
(funcall update-function
(list
(list (file-relative-name this-file dir)
(intern this-action)))
t))))
(funcall update-function nil nil)))
(defun vc-p4-workfile-version (file)
"Returns the Perforce version of FILE."
(vc-p4-state file)