]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-cvs.el
(isearch-update-ring): Doc fix.
[gnu-emacs] / lisp / vc-cvs.el
index 2bca3fb90b1789c5ae8e472073479c8b40ac6d13..94fd3d0acd9b19bda9a264e0cb1afb1d52a1105b 100644 (file)
@@ -1,6 +1,7 @@
 ;;; vc-cvs.el --- non-resident support for CVS version-control
 
-;; Copyright (C) 1995,98,99,2000,2001,02,2003  Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003,
+;;   2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author:      FSF (see vc.el for full credits)
 ;; Maintainer:  Andre Spiegel <spiegel@gnu.org>
@@ -21,8 +22,8 @@
 
 ;; 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:
 
@@ -42,7 +43,7 @@
                 (repeat :tag "Argument List"
                         :value ("")
                         string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-cvs-register-switches nil
@@ -106,7 +107,7 @@ by these regular expressions."
 Format is according to `format-time-string'.  Only used if
 `vc-cvs-sticky-tag-display' is t."
   :type '(string)
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-cvs-sticky-tag-display t
@@ -145,7 +146,7 @@ displayed.  Date and time is displayed for sticky dates.
 
 See also variable `vc-cvs-sticky-date-format-string'."
   :type '(choice boolean function)
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 ;;;
@@ -235,16 +236,19 @@ See also variable `vc-cvs-sticky-date-format-string'."
 
 (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.
@@ -448,7 +452,8 @@ REV is the revision to check out into WORKFILE."
        (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."
@@ -548,7 +553,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
               (append (vc-switches nil 'diff) '("/dev/null")))
        ;; Even if it's empty, it's locally modified.
        1)
-    (let* ((async (and (not vc-disable-async-diff) 
+    (let* ((async (and (not vc-disable-async-diff)
                        (vc-stay-local-p file)
                        (fboundp 'start-process)))
           (status (apply 'vc-cvs-command (or buffer "*vc-diff*")
@@ -745,7 +750,7 @@ is `local'.
 The default METHOD for a CVS root of the form
   [USER@]HOSTNAME:/path/to/repository
 is `ext'.
-For an empty string, nil is returned (illegal CVS root)."
+For an empty string, nil is returned (invalid CVS root)."
   ;; Split CVS root into colon separated fields (0-4).
   ;; The `x:' makes sure, that leading colons are not lost;
   ;; `HOST:/PATH' is then different from `:METHOD:/PATH'.