# HG changeset patch # User Karl Heuer # Date 802660878 0 # Node ID 69c24a37a560034b182aad4d16037da8b6176528 # Parent 19ced24c296380fd61d2512dfb76f066446697b3 (vc-backend-checkin): Handle RCS `co'-output in the event that a check-in only results in reverting to the previous version. Also be more robust if the new version number cannot be told from what `co' says. diff -r 19ced24c2963 -r 69c24a37a560 lisp/vc.el --- a/lisp/vc.el Fri Jun 09 01:17:59 1995 +0000 +++ b/lisp/vc.el Fri Jun 09 01:21:18 1995 +0000 @@ -1683,14 +1683,16 @@ (progn (set-buffer "*vc*") (goto-char (point-min)) - (if (re-search-forward "new revision: \\([0-9.]+\\);" nil t) + (if (or (re-search-forward + "new revision: \\([0-9.]+\\);" nil t) + (re-search-forward + "reverting to previous revision \\([0-9.]+\\)" nil t)) (progn (setq rev (buffer-substring (match-beginning 1) (match-end 1))) (vc-file-setprop file 'vc-workfile-version rev))) - (if (vc-trunk-p rev) - (vc-do-command 0 "rcs" file 'MASTER "-b") - (vc-do-command 0 "rcs" file 'MASTER - (concat "-b" (vc-branch-part rev)))) + (if rev (vc-do-command 0 "rcs" file 'MASTER + (if (vc-trunk-p rev) "-b" + (concat "-b" (vc-branch-part rev))))) (if lock-version ;; exit status of 1 is also accepted. ;; It means that the lock was removed before.