From 2beff7d468e991caac8f0e325cc194eeec32ef05 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 14 Mar 2022 23:47:29 -0700 Subject: [PATCH] Fix issue with files showing as needs-update in vc-dir Files that have move/delete as their head action would show up as needing updates in vc-dir. --- CHANGELOG.org | 4 ++++ vc-p4.el | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 714a64a..616a49c 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -32,6 +32,10 @@ Specifically the Server, root directory, client, and stream are shown in the hea This shows whether the file is binary, or text, and whether it has the lock, modification time, etc. modifiers enabled. +** FIXED An issue with files with move/delete as their head action showing in vc-dir + +vc-p4 didn't understand that move/delete was a thing, so it assumed that it meant the same as needs-update + * 0.2.1 -- 2020-05-27 ** FIXED Recognition of sub-directories of Perforce repos diff --git a/vc-p4.el b/vc-p4.el index b244949..ef85180 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -165,7 +165,9 @@ compare non-open files to the depot version." 'unlocked-changes) ((or (equal headRev haveRev) - (and (null haveRev) (string= headAction "delete"))) + (and (null haveRev) + (or (string= headAction "delete") + (string= headAction "move/delete")))) 'up-to-date) (t 'needs-update))))