summaryrefslogtreecommitdiff
path: root/lisp/vc-rcs.el
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2002-07-19 13:27:44 +0000
committerAndré Spiegel <spiegel@gnu.org>2002-07-19 13:27:44 +0000
commitea28aa358e4ce4420b4826b353dfba2f0b08fdd5 (patch)
treee30402351b5087fc1d869a7843c4b5e37066d95d /lisp/vc-rcs.el
parente30140cebbd4e67a913ffd320c0346ea74e6185d (diff)
downloademacs-ea28aa358e4ce4420b4826b353dfba2f0b08fdd5.tar.gz
(vc-rcs-fetch-master-state): Be more careful to check
if this is really an RCS master file.
Diffstat (limited to 'lisp/vc-rcs.el')
-rw-r--r--lisp/vc-rcs.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index 58e34bf5abd..73541ff9cab 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 <spiegel@gnu.org>
-;; $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 @@ 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)