emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vc-hgcmd 2d4d185 43/87: List all unresolved files in vc


From: Stefan Monnier
Subject: [elpa] externals/vc-hgcmd 2d4d185 43/87: List all unresolved files in vc-dir
Date: Sat, 5 Jun 2021 16:11:43 -0400 (EDT)

branch: externals/vc-hgcmd
commit 2d4d1856879fc48c65531a6e742ace5bd4d60f0e
Author: muffinmad <andreyk.mad@gmail.com>
Commit: muffinmad <andreyk.mad@gmail.com>

    List all unresolved files in vc-dir
---
 vc-hgcmd.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/vc-hgcmd.el b/vc-hgcmd.el
index 32c7e2e..aa66b6a 100644
--- a/vc-hgcmd.el
+++ b/vc-hgcmd.el
@@ -478,15 +478,15 @@ Insert output to process buffer and check if amount of 
data is enought to parse
 
 (defun vc-hgcmd--dir-status-callback (update-function)
   "Call UPDATE-FUNCTION with result of status command."
-  (let ((result nil)
-        (conflicted (vc-hgcmd-conflicted-files)))
+  (let* ((conflicted (vc-hgcmd-conflicted-files))
+         (result (mapcar (lambda (file)
+                           (list file 'conflict nil))
+                         conflicted)))
     (goto-char (point-min))
     (while (not (eobp))
-      (let* ((file (buffer-substring-no-properties (+ (point) 2) 
(line-end-position)))
-             (state (if (member file conflicted)
-                        'conflict
-                      (cdr (assoc (char-after) 
vc-hgcmd--translation-status)))))
-        (push (list file state nil) result))
+      (let ((file (buffer-substring-no-properties (+ (point) 2) 
(line-end-position))))
+        (unless (member file conflicted)
+          (push (list file (cdr (assoc (char-after) 
vc-hgcmd--translation-status)) nil) result)))
       (forward-line))
     (funcall update-function result)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]