diff options
author | André Spiegel <spiegel@gnu.org> | 1995-08-17 13:08:36 +0000 |
---|---|---|
committer | André Spiegel <spiegel@gnu.org> | 1995-08-17 13:08:36 +0000 |
commit | b17402f66749f8beae4689de0cc9e00bb28a5331 (patch) | |
tree | c46478d9f85737d63f23664688d3ce31e41b3b3c /lisp/vc.el | |
parent | de4b999017a613aa2a24a4cc501149edee149d4a (diff) | |
download | emacs-b17402f66749f8beae4689de0cc9e00bb28a5331.tar.gz |
(vc-next-action-on-file): Query when trying to lock non-latest
version.
Diffstat (limited to 'lisp/vc.el')
-rw-r--r-- | lisp/vc.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index b22cd6fcdb6..01d2f993cfb 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -531,7 +531,15 @@ to an optional list of FLAGS." (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. |