diff options
| author | Richard M. Stallman | 1997-03-21 20:06:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-03-21 20:06:04 +0000 |
| commit | 4cbeb71c2a97e6b4481d2d9a72e261118b97e83e (patch) | |
| tree | 214ad09e891e2aee891b932a906a87dde1e9e95d | |
| parent | 122955bfb427ccccf33d9b4db9ef1ea9ee5ee4c8 (diff) | |
| download | emacs-4cbeb71c2a97e6b4481d2d9a72e261118b97e83e.tar.gz emacs-4cbeb71c2a97e6b4481d2d9a72e261118b97e83e.zip | |
(vc-next-action-on-file): With implicit checkout, make
sure not to lose unsaved changes.
| -rw-r--r-- | lisp/vc.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 70abb77b545..e4ffc8dcf9f 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -620,8 +620,12 @@ to an optional list of FLAGS." | |||
| 620 | (vc-resynch-buffer file t (not (buffer-modified-p buffer))))) | 620 | (vc-resynch-buffer file t (not (buffer-modified-p buffer))))) |
| 621 | (error "%s needs update" (buffer-name)))) | 621 | (error "%s needs update" (buffer-name)))) |
| 622 | 622 | ||
| 623 | ;; if there is no lock on the file, assert one and get it | 623 | ;; If there is no lock on the file, assert one and get it. |
| 624 | ((not (setq owner (vc-locking-user file))) | 624 | ;; (With implicit checkout, make sure not to lose unsaved changes.) |
| 625 | ((progn (and (eq (vc-checkout-model file) 'implicit) | ||
| 626 | (buffer-modified-p buffer) | ||
| 627 | (vc-buffer-sync)) | ||
| 628 | (not (setq owner (vc-locking-user file)))) | ||
| 625 | (if (and vc-checkout-carefully | 629 | (if (and vc-checkout-carefully |
| 626 | (not (vc-workfile-unchanged-p file t))) | 630 | (not (vc-workfile-unchanged-p file t))) |
| 627 | (if (save-window-excursion | 631 | (if (save-window-excursion |