From 648f58294bbbcd2b439019e93c1dccac5d9cac9d Mon Sep 17 00:00:00 2001 From: Olivier Certner Date: Thu, 6 Apr 2023 10:52:23 +0200 Subject: [PATCH] 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)) -- 2.39.2