;;; vc-cvs.el --- non-resident support for CVS version-control
-;; Copyright (C) 1995,98,99,2000,2001,02,2003, 2005
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
(defun vc-cvs-checkout-model (file)
"CVS-specific version of `vc-checkout-model'."
- (if (or (getenv "CVSREAD")
- ;; If the file is not writable (despite CVSREAD being
- ;; undefined), this is probably because the file is being
- ;; "watched" by other developers.
- ;; (If vc-mistrust-permissions was t, we actually shouldn't
- ;; trust this, but there is no other way to learn this from CVS
- ;; at the moment (version 1.9).)
- (string-match "r-..-..-." (nth 8 (file-attributes file))))
+ (if (getenv "CVSREAD")
'announce
- 'implicit))
+ (let ((attrib (file-attributes file)))
+ (if (and attrib ;; don't check further if FILE doesn't exist
+ ;; If the file is not writable (despite CVSREAD being
+ ;; undefined), this is probably because the file is being
+ ;; "watched" by other developers.
+ ;; (If vc-mistrust-permissions was t, we actually shouldn't
+ ;; trust this, but there is no other way to learn this from CVS
+ ;; at the moment (version 1.9).)
+ (string-match "r-..-..-." (nth 8 attrib)))
+ 'announce
+ 'implicit))))
(defun vc-cvs-mode-line-string (file)
"Return string for placement into the modeline for FILE.
(message "Checking out %s...done" filename)))))
(defun vc-cvs-delete-file (file)
- (vc-cvs-command nil 0 file "remove" "-f"))
+ (vc-cvs-command nil 0 file "remove" "-f")
+ (vc-cvs-command nil 0 file "commit" "-mRemoved."))
(defun vc-cvs-revert (file &optional contents-done)
"Revert FILE to the version it was based on."