Mercurial > emacs
comparison lisp/vc-rcs.el @ 32053:0216f8dcf1d4
(vc-rcs-receive-file): Call comment-history unconditionally. Use the
comments as initial contents of the log entry buffer. Document the
trick to force branch creation with no changes.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Sun, 01 Oct 2000 11:17:42 +0000 |
parents | a05558c54226 |
children | 4196f89984ce |
comparison
equal
deleted
inserted
replaced
32052:dd3bf5d37fe2 | 32053:0216f8dcf1d4 |
---|---|
3 ;; Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc. |
4 | 4 |
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.6 2000/09/22 07:48:08 spiegel Exp $ | 8 ;; $Id: vc-rcs.el,v 1.7 2000/09/22 11:57:30 gerd Exp $ |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
730 "Implementation of receive-file for RCS." | 730 "Implementation of receive-file for RCS." |
731 (let ((old-backend (vc-backend file)) | 731 (let ((old-backend (vc-backend file)) |
732 (rev (vc-workfile-version file)) | 732 (rev (vc-workfile-version file)) |
733 (state (vc-state file)) | 733 (state (vc-state file)) |
734 (checkout-model (vc-checkout-model file)) | 734 (checkout-model (vc-checkout-model file)) |
735 (comment (and move | 735 (comment (and move (vc-call comment-history file)))) |
736 (vc-find-backend-function old-backend 'comment-history) | |
737 (vc-call 'comment-history file)))) | |
738 (if move (vc-unregister file old-backend)) | 736 (if move (vc-unregister file old-backend)) |
739 (vc-file-clearprops file) | 737 (vc-file-clearprops file) |
740 (if (not (vc-rcs-registered file)) | 738 (if (not (vc-rcs-registered file)) |
741 (progn | 739 (progn |
742 (with-vc-properties | 740 (with-vc-properties |
754 (vc-file-setprop file 'vc-state 'edited) | 752 (vc-file-setprop file 'vc-state 'edited) |
755 (set-file-modes file | 753 (set-file-modes file |
756 (logior (file-modes file) 128))) | 754 (logior (file-modes file) 128))) |
757 (when (or move (eq state 'edited)) | 755 (when (or move (eq state 'edited)) |
758 (vc-file-setprop file 'vc-state 'edited) | 756 (vc-file-setprop file 'vc-state 'edited) |
759 ;; TODO: The comment history should actually become the | 757 ;; Explicit branch revision number will cause vc-rcs-checkin |
760 ;; initial contents of the log entry buffer. | 758 ;; to use "ci -f". This is a trick to force creation of |
761 (and comment (ring-insert vc-comment-ring comment)) | 759 ;; the branch, even if we couldn't use the unmodified base |
762 (vc-checkin file (concat rev ".1.1"))))) | 760 ;; version for registration above. |
761 (vc-checkin file (concat rev ".1.1") comment (stringp comment))))) | |
763 | 762 |
764 (defun vc-rcs-set-non-strict-locking (file) | 763 (defun vc-rcs-set-non-strict-locking (file) |
765 (vc-do-command nil 0 "rcs" file "-U") | 764 (vc-do-command nil 0 "rcs" file "-U") |
766 (vc-file-setprop file 'vc-checkout-model 'implicit) | 765 (vc-file-setprop file 'vc-checkout-model 'implicit) |
767 (set-file-modes file (logior (file-modes file) 128))) | 766 (set-file-modes file (logior (file-modes file) 128))) |