# HG changeset patch # User Andr Spiegel # Date 1027085264 0 # Node ID 7fa004ccd462e866d004d279f2451b00dc599946 # Parent f8e6993503cfeac1c09e24c00b96952c43e35862 (vc-rcs-fetch-master-state): Be more careful to check if this is really an RCS master file. diff -r f8e6993503cf -r 7fa004ccd462 lisp/vc-rcs.el --- a/lisp/vc-rcs.el Fri Jul 19 13:26:11 2002 +0000 +++ b/lisp/vc-rcs.el Fri Jul 19 13:27:44 2002 +0000 @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-rcs.el,v 1.23 2002/02/25 22:04:29 spiegel Exp $ +;; $Id: vc-rcs.el,v 1.24 2002/03/18 17:17:38 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -605,7 +605,10 @@ `vc-checkout-model' to their correct values, based on the master file." (with-temp-buffer - (vc-insert-file (vc-name file) "^[0-9]") + (if (or (not (vc-insert-file (vc-name file) "^[0-9]")) + (progn (goto-char (point-min)) + (not (looking-at "^head[ \t\n]+[^;]+;$")))) + (error "File %s is not an RCS master file" (vc-name file))) (let ((workfile-is-latest nil) (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1))) (vc-file-setprop file 'vc-rcs-default-branch default-branch)