changeset 12873:03d3b7d60f67

(vc-next-action-on-file): Query when trying to lock non-latest version.
author André Spiegel <spiegel@gnu.org>
date Thu, 17 Aug 1995 13:08:36 +0000
parents 857663042672
children 3afd71d56015
files lisp/vc.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc.el	Thu Aug 17 12:40:03 1995 +0000
+++ b/lisp/vc.el	Thu Aug 17 13:08:36 1995 +0000
@@ -531,7 +531,15 @@
 				     (concat "-b" rev)))
 		  (vc-checkout file nil rev))
 	      (error "Sorry, this is not implemented for SCCS."))
-	  (vc-checkout-writable-buffer file))))
+	  (if (vc-latest-on-branch-p file)
+	      (vc-checkout-writable-buffer file)
+	    (if (yes-or-no-p 
+		 "This is not the latest version.  Really lock it?  ")
+		(vc-checkout-writable-buffer file)
+	      (if (yes-or-no-p "Lock the latest version instead? ")
+		  (vc-checkout-writable-buffer file
+		     (vc-branch-part (vc-workfile-version file))))))
+	  )))
 
      ;; a checked-out version exists, but the user may not own the lock
      ((and (not (eq vc-type 'CVS))	;There are no locks in CVS.