From e07adf40d3fedeb5e410a1085d7abdf7d9275204 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Spiegel?= Date: Fri, 22 Sep 2000 07:49:19 +0000 Subject: [PATCH] (vc-switch-backend): Signal an error if the file is not registered under the new backend. --- lisp/vc.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/vc.el b/lisp/vc.el index b298831cb1b..4dba0fea2ae 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -2190,6 +2190,8 @@ VC's perspective on FILE, it does not register or unregister it." (list buffer-file-name (intern (upcase (read-string "Switch to backend: "))))) + (unless (vc-call-backend backend 'registered file) + (error "%s is not registered in %s" file backend)) (vc-file-clearprops file) (vc-file-setprop file 'vc-backend backend) (vc-resynch-buffer file t t)) -- 2.39.2