From 64fa9e81277663581e88e6093a8833c4038b170f Mon Sep 17 00:00:00 2001 From: Olivier Certner Date: Thu, 6 Apr 2023 10:52:23 +0200 Subject: [PATCH 2/3] 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 695442b98d4..039015a50b7 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -953,13 +953,16 @@ vc-cvs-after-dir-status (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