diff options
| author | André Spiegel | 2000-10-03 12:08:40 +0000 |
|---|---|---|
| committer | André Spiegel | 2000-10-03 12:08:40 +0000 |
| commit | fb0d6a7904bd5e641b586564be25037d2bbd66ec (patch) | |
| tree | 9bda2a072b6e0c046d056c353bd3d9d3821d6511 | |
| parent | 0e41e1d66c679ccb5c4e4204d44d4e18c4776025 (diff) | |
| download | emacs-fb0d6a7904bd5e641b586564be25037d2bbd66ec.tar.gz emacs-fb0d6a7904bd5e641b586564be25037d2bbd66ec.zip | |
(vc-rcs-receive-file): Rewritten to contain only backend-specific
code.
| -rw-r--r-- | lisp/vc-rcs.el | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index 3708ab23d6a..920fc4c1360 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: FSF (see vc.el for full credits) | 5 | ;; Author: FSF (see vc.el for full credits) |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 7 | 7 | ||
| 8 | ;; $Id: vc-rcs.el,v 1.9 2000/10/01 19:35:24 monnier Exp $ | 8 | ;; $Id: vc-rcs.el,v 1.10 2000/10/03 11:33:59 spiegel Exp $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -735,37 +735,13 @@ whether to remove it." | |||
| 735 | (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) | 735 | (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) |
| 736 | (delete-directory dir)))) | 736 | (delete-directory dir)))) |
| 737 | 737 | ||
| 738 | (defun vc-rcs-receive-file (file move) | 738 | (defun vc-rcs-receive-file (file rev) |
| 739 | "Implementation of receive-file for RCS." | 739 | "Implementation of receive-file for RCS." |
| 740 | (let ((old-backend (vc-backend file)) | 740 | (let ((checkout-model (vc-checkout-model file))) |
| 741 | (rev (vc-workfile-version file)) | 741 | (vc-rcs-register file rev "") |
| 742 | (state (vc-state file)) | 742 | (when (eq checkout-model 'implicit) |
| 743 | (checkout-model (vc-checkout-model file)) | 743 | (vc-rcs-set-non-strict-locking file)) |
| 744 | (comment (and move (vc-call comment-history file)))) | 744 | (vc-rcs-set-default-branch file (concat rev ".1")))) |
| 745 | (if move (vc-unregister file)) | ||
| 746 | (vc-file-clearprops file) | ||
| 747 | (if (not (vc-rcs-registered file)) | ||
| 748 | (progn | ||
| 749 | ;; TODO: If the file was 'edited under the old backend, | ||
| 750 | ;; this should actually register the version | ||
| 751 | ;; it was based on. | ||
| 752 | (vc-rcs-register file rev "") | ||
| 753 | (vc-file-setprop file 'vc-backend 'RCS) | ||
| 754 | (if (eq checkout-model 'implicit) | ||
| 755 | (vc-rcs-set-non-strict-locking file)) | ||
| 756 | (if (not move) | ||
| 757 | (vc-do-command nil 0 "rcs" file (concat "-b" rev ".1")))) | ||
| 758 | (vc-file-setprop file 'vc-backend 'RCS) | ||
| 759 | (vc-file-setprop file 'vc-state 'edited) | ||
| 760 | (set-file-modes file | ||
| 761 | (logior (file-modes file) 128))) | ||
| 762 | (when (or move (eq state 'edited)) | ||
| 763 | (vc-file-setprop file 'vc-state 'edited) | ||
| 764 | ;; Explicit branch revision number will cause vc-rcs-checkin | ||
| 765 | ;; to use "ci -f". This is a trick to force creation of | ||
| 766 | ;; the branch, even if we couldn't use the unmodified base | ||
| 767 | ;; version for registration above. | ||
| 768 | (vc-checkin file (concat rev ".1.1") comment (stringp comment))))) | ||
| 769 | 745 | ||
| 770 | (defun vc-rcs-set-non-strict-locking (file) | 746 | (defun vc-rcs-set-non-strict-locking (file) |
| 771 | (vc-do-command nil 0 "rcs" file "-U") | 747 | (vc-do-command nil 0 "rcs" file "-U") |