From: Olivier Certner Date: Thu, 6 Apr 2023 08:52:23 +0000 (+0200) Subject: VC: CVS: Fix parsing of 'cvs -qn update' for missing files for 1.12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=648f58294bbbcd2b439019e93c1dccac5d9cac9d;p=emacs.git 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. --- 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))