Mercurial > emacs
diff lisp/vc.el @ 17201:ac40292bd898
(vc-next-action-on-file): With implicit checkout, make
sure not to lose unsaved changes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 21 Mar 1997 20:06:04 +0000 |
parents | 1814adcc2648 |
children | c8228f461dda |
line wrap: on
line diff
--- a/lisp/vc.el Fri Mar 21 07:45:24 1997 +0000 +++ b/lisp/vc.el Fri Mar 21 20:06:04 1997 +0000 @@ -620,8 +620,12 @@ (vc-resynch-buffer file t (not (buffer-modified-p buffer))))) (error "%s needs update" (buffer-name)))) - ;; if there is no lock on the file, assert one and get it - ((not (setq owner (vc-locking-user file))) + ;; If there is no lock on the file, assert one and get it. + ;; (With implicit checkout, make sure not to lose unsaved changes.) + ((progn (and (eq (vc-checkout-model file) 'implicit) + (buffer-modified-p buffer) + (vc-buffer-sync)) + (not (setq owner (vc-locking-user file)))) (if (and vc-checkout-carefully (not (vc-workfile-unchanged-p file t))) (if (save-window-excursion