From c24b959ed37573e275acd51787f0e4c968eced49 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Thu, 27 Aug 2009 04:18:55 -0800 Subject: [PATCH] * 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] --- vc-p4.el | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/vc-p4.el b/vc-p4.el index 6e4186a..f8c7766 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -132,19 +132,22 @@ compare non-open files to the depot version." (haveRev (cdr (assoc "haveRev" alist))) (depotFile (cdr (assoc "depotFile" alist))) (action (cdr (assoc "action" alist))) - (state (if action - (let ((opened (p4-lowlevel-opened file))) - (if (string-match " by \\([^@]+\\)@" opened) - (match-string 1 opened) - (if (equal headRev haveRev) - 'edited - 'needs-merge))) - (if (and (not dont-compare-nonopened) - (p4-lowlevel-diff-s file "e")) - 'unlocked-changes - (if (equal headRev haveRev) - 'up-to-date - 'needs-patch)))) + (state + (cond + (action + (let ((opened (p4-lowlevel-opened file))) + (if (string-match " by \\([^@]+\\)@" opened) + (match-string 1 opened) + (if (equal headRev haveRev) + 'edited + 'needs-merge)))) + ((and (not dont-compare-nonopened) + (p4-lowlevel-diff-s file "e")) + 'unlocked-changes) + ((equal headRev haveRev) + 'up-to-date) + (t + 'needs-patch))) ) (vc-file-setprop file 'vc-p4-did-fstat t) (vc-file-setprop file 'vc-p4-depot-file depotFile)