]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/vc-sccs.el
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
[gnu-emacs] / lisp / vc / vc-sccs.el
index 1b959e22e2325aaf85ed08ac7f2a4c382dc5ec03..8d8d9e844edd3214affccfb46fcef3cd8b8b7944 100644 (file)
@@ -149,13 +149,14 @@ For a description of possible values, see `vc-check-master-templates'."
 
 (defun vc-sccs-working-revision (file)
   "SCCS-specific version of `vc-working-revision'."
-  (with-temp-buffer
-    ;; The working revision is always the latest revision number.
-    ;; To find this number, search the entire delta table,
-    ;; rather than just the first entry, because the
-    ;; first entry might be a deleted ("R") revision.
-    (vc-insert-file (vc-master-name file) "^\001e\n\001[^s]")
-    (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
+  (when (and (file-regular-p file) (vc-master-name file))
+    (with-temp-buffer
+      ;; The working revision is always the latest revision number.
+      ;; To find this number, search the entire delta table,
+      ;; rather than just the first entry, because the
+      ;; first entry might be a deleted ("R") revision.
+      (vc-insert-file (vc-master-name file) "^\001e\n\001[^s]")
+      (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1))))
 
 ;; Cf vc-sccs-find-revision.
 (defun vc-sccs-write-revision (file outfile &optional rev)