emacs-diffs
[Top][All Lists]
Advanced

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

master 648f58294bb 2/3: VC: CVS: Fix parsing of 'cvs -qn update' for mis


From: Dmitry Gutov
Subject: master 648f58294bb 2/3: VC: CVS: Fix parsing of 'cvs -qn update' for missing files for 1.12
Date: Tue, 18 Apr 2023 20:47:37 -0400 (EDT)

branch: master
commit 648f58294bbbcd2b439019e93c1dccac5d9cac9d
Author: Olivier Certner <olce.emacs@certner.fr>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    VC: CVS: Fix parsing of 'cvs -qn update' for missing files for 1.12
    
    * lisp/vc/vc-cvs.el (vc-cvs-after-dir-status): Fix the name reported
    for missing files in the case of CVS 1.12.3+ where name is quoted in
    the warning line (it was not before this version).  Use instead the
    following U line, where the name is never quoted on all versions.
---
 lisp/vc/vc-cvs.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index b826390a034..c6056c1e5bd 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -1029,13 +1029,16 @@ state."
                       (cdr (assoc (char-after) translation)))
                 result)
         (cond
-         ((looking-at "cvs update: warning: \\(.*\\) was lost")
+         ((looking-at "cvs update: warning: .* was lost")
           ;; Format is:
           ;; cvs update: warning: FILENAME was lost
           ;; U FILENAME
-          (push (list (match-string 1) 'missing) result)
-          ;; Skip the "U" line
-          (forward-line 1))
+          ;; with FILENAME in the first line possibly enclosed in
+          ;; quotes (since CVS 1.12.3). To avoid problems, use the U
+          ;; line where name is never quoted.
+          (forward-line 1)
+          (when (looking-at "^U \\(.*\\)$")
+            (push (list (match-string 1) 'missing) result)))
          ((looking-at "cvs update: New directory `\\(.*\\)' -- ignored")
           (push (list (match-string 1) 'unregistered) result))))
       (forward-line 1))



reply via email to

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