# HG changeset patch # User Andr Spiegel # Date 808664916 0 # Node ID 03d3b7d60f677af2018dac5f52035f0d46668a84 # Parent 857663042672861d155a30e52bc54f0f9dc1cb2f (vc-next-action-on-file): Query when trying to lock non-latest version. diff -r 857663042672 -r 03d3b7d60f67 lisp/vc.el --- 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.