From: André Spiegel Date: Sat, 20 Jul 2002 17:29:58 +0000 (+0000) Subject: (vc-rcs-fetch-master-state): Be more careful to check X-Git-Tag: emacs-pretest-21.2.91~153 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b8db4cb360be100158f8c1b287099cbc1602bfd7;p=emacs.git (vc-rcs-fetch-master-state): Be more careful to check if this is really an RCS master file. --- diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index f703b680482..6e4c6c99603 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-rcs.el,v 1.20 2001/07/16 12:22:59 pj Exp $ +;; $Id: vc-rcs.el,v 1.21 2001/08/28 17:05:12 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -657,7 +657,10 @@ This function sets the properties `vc-workfile-version' and `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)