diff options
author | André Spiegel <spiegel@gnu.org> | 2000-10-03 12:08:40 +0000 |
---|---|---|
committer | André Spiegel <spiegel@gnu.org> | 2000-10-03 12:08:40 +0000 |
commit | fb0d6a7904bd5e641b586564be25037d2bbd66ec (patch) | |
tree | 9bda2a072b6e0c046d056c353bd3d9d3821d6511 /lisp/vc-rcs.el | |
parent | 0e41e1d66c679ccb5c4e4204d44d4e18c4776025 (diff) | |
download | emacs-fb0d6a7904bd5e641b586564be25037d2bbd66ec.tar.gz |
(vc-rcs-receive-file): Rewritten to contain only backend-specific
code.
Diffstat (limited to 'lisp/vc-rcs.el')
-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 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> -;; $Id: vc-rcs.el,v 1.9 2000/10/01 19:35:24 monnier Exp $ +;; $Id: vc-rcs.el,v 1.10 2000/10/03 11:33:59 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -735,37 +735,13 @@ whether to remove it." (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) (delete-directory dir)))) -(defun vc-rcs-receive-file (file move) +(defun vc-rcs-receive-file (file rev) "Implementation of receive-file for RCS." - (let ((old-backend (vc-backend file)) - (rev (vc-workfile-version file)) - (state (vc-state file)) - (checkout-model (vc-checkout-model file)) - (comment (and move (vc-call comment-history file)))) - (if move (vc-unregister file)) - (vc-file-clearprops file) - (if (not (vc-rcs-registered file)) - (progn - ;; TODO: If the file was 'edited under the old backend, - ;; this should actually register the version - ;; it was based on. - (vc-rcs-register file rev "") - (vc-file-setprop file 'vc-backend 'RCS) - (if (eq checkout-model 'implicit) - (vc-rcs-set-non-strict-locking file)) - (if (not move) - (vc-do-command nil 0 "rcs" file (concat "-b" rev ".1")))) - (vc-file-setprop file 'vc-backend 'RCS) - (vc-file-setprop file 'vc-state 'edited) - (set-file-modes file - (logior (file-modes file) 128))) - (when (or move (eq state 'edited)) - (vc-file-setprop file 'vc-state 'edited) - ;; Explicit branch revision number will cause vc-rcs-checkin - ;; to use "ci -f". This is a trick to force creation of - ;; the branch, even if we couldn't use the unmodified base - ;; version for registration above. - (vc-checkin file (concat rev ".1.1") comment (stringp comment))))) + (let ((checkout-model (vc-checkout-model file))) + (vc-rcs-register file rev "") + (when (eq checkout-model 'implicit) + (vc-rcs-set-non-strict-locking file)) + (vc-rcs-set-default-branch file (concat rev ".1")))) (defun vc-rcs-set-non-strict-locking (file) (vc-do-command nil 0 "rcs" file "-U") |