* vc-p4.el (vc-p4-state): Change if' mess to cond'.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7361]
This commit is contained in:
Magnus Henoch 2009-08-27 04:18:55 -08:00
parent 7292914d99
commit c24b959ed3

View file

@ -132,19 +132,22 @@ compare non-open files to the depot version."
(haveRev (cdr (assoc "haveRev" alist))) (haveRev (cdr (assoc "haveRev" alist)))
(depotFile (cdr (assoc "depotFile" alist))) (depotFile (cdr (assoc "depotFile" alist)))
(action (cdr (assoc "action" alist))) (action (cdr (assoc "action" alist)))
(state (if action (state
(let ((opened (p4-lowlevel-opened file))) (cond
(if (string-match " by \\([^@]+\\)@" opened) (action
(match-string 1 opened) (let ((opened (p4-lowlevel-opened file)))
(if (equal headRev haveRev) (if (string-match " by \\([^@]+\\)@" opened)
'edited (match-string 1 opened)
'needs-merge))) (if (equal headRev haveRev)
(if (and (not dont-compare-nonopened) 'edited
(p4-lowlevel-diff-s file "e")) 'needs-merge))))
'unlocked-changes ((and (not dont-compare-nonopened)
(if (equal headRev haveRev) (p4-lowlevel-diff-s file "e"))
'up-to-date 'unlocked-changes)
'needs-patch)))) ((equal headRev haveRev)
'up-to-date)
(t
'needs-patch)))
) )
(vc-file-setprop file 'vc-p4-did-fstat t) (vc-file-setprop file 'vc-p4-did-fstat t)
(vc-file-setprop file 'vc-p4-depot-file depotFile) (vc-file-setprop file 'vc-p4-depot-file depotFile)